diff --git a/sdk/appplatform/azure-mgmt-appplatform/_meta.json b/sdk/appplatform/azure-mgmt-appplatform/_meta.json
index c545f9050926..0258c6fc09dc 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/_meta.json
+++ b/sdk/appplatform/azure-mgmt-appplatform/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "71341bf84d11e4cf6c3d3c6aa9d1615238b20e90",
+ "commit": "c94980e05045e33fc8ffd42c0797bcbc2ab2ff99",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
- "@autorest/python@6.19.0",
+ "@autorest/python@6.27.4",
"@autorest/modelerfour@4.27.0"
],
- "autorest_command": "autorest specification/appplatform/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2023-12 --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
+ "autorest_command": "autorest specification/appplatform/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/appplatform/resource-manager/readme.md"
}
\ No newline at end of file
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/__init__.py
index d0d782a6deec..4e825e679f97 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/__init__.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/__init__.py
@@ -5,15 +5,21 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._app_platform_management_client import AppPlatformManagementClient
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._app_platform_management_client import AppPlatformManagementClient # type: ignore
from ._version import VERSION
__version__ = VERSION
try:
from ._patch import __all__ as _patch_all
- from ._patch import * # pylint: disable=unused-wildcard-import
+ from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
@@ -21,6 +27,6 @@
__all__ = [
"AppPlatformManagementClient",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
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 ee7d0d515466..3a7c0ad94d6e 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
@@ -38,9 +38,14 @@
CustomizedAcceleratorsOperations,
DeploymentsOperations,
DevToolPortalsOperations,
+ EurekaServersOperations,
GatewayCustomDomainsOperations,
GatewayRouteConfigsOperations,
GatewaysOperations,
+ JobExecutionOperations,
+ JobExecutionsOperations,
+ JobOperations,
+ JobsOperations,
MonitoringSettingsOperations,
Operations,
PredefinedAcceleratorsOperations,
@@ -52,17 +57,18 @@
)
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
-class AppPlatformManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
+class AppPlatformManagementClient: # pylint: disable=too-many-instance-attributes
"""REST API for Azure Spring Apps.
:ivar services: ServicesOperations operations
:vartype services: azure.mgmt.appplatform.operations.ServicesOperations
:ivar apms: ApmsOperations operations
:vartype apms: azure.mgmt.appplatform.operations.ApmsOperations
+ :ivar eureka_servers: EurekaServersOperations operations
+ :vartype eureka_servers: azure.mgmt.appplatform.operations.EurekaServersOperations
:ivar config_servers: ConfigServersOperations operations
:vartype config_servers: azure.mgmt.appplatform.operations.ConfigServersOperations
:ivar configuration_services: ConfigurationServicesOperations operations
@@ -127,6 +133,14 @@ class AppPlatformManagementClient: # pylint: disable=client-accepts-api-version
:ivar predefined_accelerators: PredefinedAcceleratorsOperations operations
:vartype predefined_accelerators:
azure.mgmt.appplatform.operations.PredefinedAcceleratorsOperations
+ :ivar jobs: JobsOperations operations
+ :vartype jobs: azure.mgmt.appplatform.operations.JobsOperations
+ :ivar job: JobOperations operations
+ :vartype job: azure.mgmt.appplatform.operations.JobOperations
+ :ivar job_execution: JobExecutionOperations operations
+ :vartype job_execution: azure.mgmt.appplatform.operations.JobExecutionOperations
+ :ivar job_executions: JobExecutionsOperations operations
+ :vartype job_executions: azure.mgmt.appplatform.operations.JobExecutionsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
@@ -134,8 +148,8 @@ class AppPlatformManagementClient: # pylint: disable=client-accepts-api-version
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
- :keyword api_version: Api Version. Default value is "2023-12-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2024-05-01-preview". Note that overriding
+ this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
@@ -177,6 +191,7 @@ def __init__(
self._serialize.client_side_validation = False
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.apms = ApmsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.eureka_servers = EurekaServersOperations(self._client, self._config, self._serialize, self._deserialize)
self.config_servers = ConfigServersOperations(self._client, self._config, self._serialize, self._deserialize)
self.configuration_services = ConfigurationServicesOperations(
self._client, self._config, self._serialize, self._deserialize
@@ -235,6 +250,10 @@ def __init__(
self.predefined_accelerators = PredefinedAcceleratorsOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.job = JobOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.job_execution = JobExecutionOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.job_executions = JobExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_configuration.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_configuration.py
index 2bcd7fc34af6..b15d5907d575 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_configuration.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_configuration.py
@@ -14,11 +14,10 @@
from ._version import VERSION
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
-class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
+class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AppPlatformManagementClient.
Note that all parameters used to create this instance are saved as instance
@@ -29,13 +28,13 @@ class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-inst
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:type subscription_id: str
- :keyword api_version: Api Version. Default value is "2023-12-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2024-05-01-preview". Note that overriding
+ this default value may result in unsupported behavior.
:paramtype api_version: str
"""
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
- api_version: str = kwargs.pop("api_version", "2023-12-01")
+ api_version: str = kwargs.pop("api_version", "2024-05-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_serialization.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_serialization.py
index 8139854b97bb..b24ab2885450 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_serialization.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_serialization.py
@@ -1,3 +1,4 @@
+# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -24,7 +25,6 @@
#
# --------------------------------------------------------------------------
-# pylint: skip-file
# pyright: reportUnnecessaryTypeIgnoreComment=false
from base64 import b64decode, b64encode
@@ -52,7 +52,6 @@
MutableMapping,
Type,
List,
- Mapping,
)
try:
@@ -91,6 +90,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type:
:param data: Input, could be bytes or stream (will be decoded with UTF8) or text
:type data: str or bytes or IO
:param str content_type: The content type.
+ :return: The deserialized data.
+ :rtype: object
"""
if hasattr(data, "read"):
# Assume a stream
@@ -112,7 +113,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type:
try:
return json.loads(data_as_str)
except ValueError as err:
- raise DeserializationError("JSON is invalid: {}".format(err), err)
+ raise DeserializationError("JSON is invalid: {}".format(err), err) from err
elif "xml" in (content_type or []):
try:
@@ -155,6 +156,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]],
Use bytes and headers to NOT use any requests/aiohttp or whatever
specific implementation.
Headers will tested for "content-type"
+
+ :param bytes body_bytes: The body of the response.
+ :param dict headers: The headers of the response.
+ :returns: The deserialized data.
+ :rtype: object
"""
# Try to use content-type from headers if available
content_type = None
@@ -184,15 +190,30 @@ class UTC(datetime.tzinfo):
"""Time Zone info for handling UTC"""
def utcoffset(self, dt):
- """UTF offset for UTC is 0."""
+ """UTF offset for UTC is 0.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The offset
+ :rtype: datetime.timedelta
+ """
return datetime.timedelta(0)
def tzname(self, dt):
- """Timestamp representation."""
+ """Timestamp representation.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The timestamp representation
+ :rtype: str
+ """
return "Z"
def dst(self, dt):
- """No daylight saving for UTC."""
+ """No daylight saving for UTC.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The daylight saving time
+ :rtype: datetime.timedelta
+ """
return datetime.timedelta(hours=1)
@@ -206,7 +227,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore
:param datetime.timedelta offset: offset in timedelta format
"""
- def __init__(self, offset):
+ def __init__(self, offset) -> None:
self.__offset = offset
def utcoffset(self, dt):
@@ -235,24 +256,26 @@ def __getinitargs__(self):
_FLATTEN = re.compile(r"(? None:
self.additional_properties: Optional[Dict[str, Any]] = {}
- for k in kwargs:
+ for k in kwargs: # pylint: disable=consider-using-dict-items
if k not in self._attribute_map:
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
elif k in self._validation and self._validation[k].get("readonly", False):
@@ -300,13 +330,23 @@ def __init__(self, **kwargs: Any) -> None:
setattr(self, k, kwargs[k])
def __eq__(self, other: Any) -> bool:
- """Compare objects by comparing all attributes."""
+ """Compare objects by comparing all attributes.
+
+ :param object other: The object to compare
+ :returns: True if objects are equal
+ :rtype: bool
+ """
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
return False
def __ne__(self, other: Any) -> bool:
- """Compare objects by comparing all attributes."""
+ """Compare objects by comparing all attributes.
+
+ :param object other: The object to compare
+ :returns: True if objects are not equal
+ :rtype: bool
+ """
return not self.__eq__(other)
def __str__(self) -> str:
@@ -326,7 +366,11 @@ def is_xml_model(cls) -> bool:
@classmethod
def _create_xml_node(cls):
- """Create XML node."""
+ """Create XML node.
+
+ :returns: The XML node
+ :rtype: xml.etree.ElementTree.Element
+ """
try:
xml_map = cls._xml_map # type: ignore
except AttributeError:
@@ -346,7 +390,9 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
:rtype: dict
"""
serializer = Serializer(self._infer_class_models())
- return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore
+ return serializer._serialize( # type: ignore # pylint: disable=protected-access
+ self, keep_readonly=keep_readonly, **kwargs
+ )
def as_dict(
self,
@@ -380,12 +426,15 @@ def my_key_transformer(key, attr_desc, value):
If you want XML serialization, you can pass the kwargs is_xml=True.
+ :param bool keep_readonly: If you want to serialize the readonly attributes
:param function key_transformer: A key transformer function.
:returns: A dict JSON compatible object
:rtype: dict
"""
serializer = Serializer(self._infer_class_models())
- return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore
+ return serializer._serialize( # type: ignore # pylint: disable=protected-access
+ self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs
+ )
@classmethod
def _infer_class_models(cls):
@@ -395,7 +444,7 @@ def _infer_class_models(cls):
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
if cls.__name__ not in client_models:
raise ValueError("Not Autorest generated code")
- except Exception:
+ except Exception: # pylint: disable=broad-exception-caught
# Assume it's not Autorest generated (tests?). Add ourselves as dependencies.
client_models = {cls.__name__: cls}
return client_models
@@ -408,6 +457,7 @@ def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = N
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
+ :rtype: ModelType
"""
deserializer = Deserializer(cls._infer_class_models())
return deserializer(cls.__name__, data, content_type=content_type) # type: ignore
@@ -426,9 +476,11 @@ def from_dict(
and last_rest_key_case_insensitive_extractor)
:param dict data: A dict using RestAPI structure
+ :param function key_extractors: A key extractor function.
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
+ :rtype: ModelType
"""
deserializer = Deserializer(cls._infer_class_models())
deserializer.key_extractors = ( # type: ignore
@@ -448,21 +500,25 @@ def _flatten_subtype(cls, key, objects):
return {}
result = dict(cls._subtype_map[key])
for valuetype in cls._subtype_map[key].values():
- result.update(objects[valuetype]._flatten_subtype(key, objects))
+ result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
return result
@classmethod
def _classify(cls, response, objects):
"""Check the class _subtype_map for any child classes.
We want to ignore any inherited _subtype_maps.
- Remove the polymorphic key from the initial data.
+
+ :param dict response: The initial data
+ :param dict objects: The class objects
+ :returns: The class to be used
+ :rtype: class
"""
for subtype_key in cls.__dict__.get("_subtype_map", {}).keys():
subtype_value = None
if not isinstance(response, ET.Element):
rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
- subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
+ subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None)
else:
subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response)
if subtype_value:
@@ -501,11 +557,13 @@ def _decode_attribute_map_key(key):
inside the received data.
:param str key: A key string from the generated code
+ :returns: The decoded key
+ :rtype: str
"""
return key.replace("\\.", ".")
-class Serializer(object):
+class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -540,7 +598,7 @@ class Serializer(object):
"multiple": lambda x, y: x % y != 0,
}
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.serialize_type = {
"iso-8601": Serializer.serialize_iso,
"rfc-1123": Serializer.serialize_rfc,
@@ -560,13 +618,16 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None):
self.key_transformer = full_restapi_key_transformer
self.client_side_validation = True
- def _serialize(self, target_obj, data_type=None, **kwargs):
+ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals
+ self, target_obj, data_type=None, **kwargs
+ ):
"""Serialize data into a string according to type.
- :param target_obj: The data to be serialized.
+ :param object target_obj: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str, dict
:raises: SerializationError if serialization fails.
+ :returns: The serialized data.
"""
key_transformer = kwargs.get("key_transformer", self.key_transformer)
keep_readonly = kwargs.get("keep_readonly", False)
@@ -592,12 +653,14 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
serialized = {}
if is_xml_model_serialization:
- serialized = target_obj._create_xml_node()
+ serialized = target_obj._create_xml_node() # pylint: disable=protected-access
try:
- attributes = target_obj._attribute_map
+ attributes = target_obj._attribute_map # pylint: disable=protected-access
for attr, attr_desc in attributes.items():
attr_name = attr
- if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False):
+ if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access
+ attr_name, {}
+ ).get("readonly", False):
continue
if attr_name == "additional_properties" and attr_desc["key"] == "":
@@ -633,7 +696,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if isinstance(new_attr, list):
serialized.extend(new_attr) # type: ignore
elif isinstance(new_attr, ET.Element):
- # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces.
+ # If the down XML has no XML/Name,
+ # we MUST replace the tag with the local tag. But keeping the namespaces.
if "name" not in getattr(orig_attr, "_xml_map", {}):
splitted_tag = new_attr.tag.split("}")
if len(splitted_tag) == 2: # Namespace
@@ -664,17 +728,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
except (AttributeError, KeyError, TypeError) as err:
msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj))
raise SerializationError(msg) from err
- else:
- return serialized
+ return serialized
def body(self, data, data_type, **kwargs):
"""Serialize data intended for a request body.
- :param data: The data to be serialized.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: dict
:raises: SerializationError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized request body
"""
# Just in case this is a dict
@@ -703,7 +767,7 @@ def body(self, data, data_type, **kwargs):
attribute_key_case_insensitive_extractor,
last_rest_key_case_insensitive_extractor,
]
- data = deserializer._deserialize(data_type, data)
+ data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access
except DeserializationError as err:
raise SerializationError("Unable to build a model: " + str(err)) from err
@@ -712,9 +776,11 @@ def body(self, data, data_type, **kwargs):
def url(self, name, data, data_type, **kwargs):
"""Serialize data intended for a URL path.
- :param data: The data to be serialized.
+ :param str name: The name of the URL path parameter.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str
+ :returns: The serialized URL path
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
"""
@@ -728,21 +794,20 @@ def url(self, name, data, data_type, **kwargs):
output = output.replace("{", quote("{")).replace("}", quote("}"))
else:
output = quote(str(output), safe="")
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return output
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return output
def query(self, name, data, data_type, **kwargs):
"""Serialize data intended for a URL query.
- :param data: The data to be serialized.
+ :param str name: The name of the query parameter.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
- :keyword bool skip_quote: Whether to skip quote the serialized result.
- Defaults to False.
:rtype: str, list
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized query parameter
"""
try:
# Treat the list aside, since we don't want to encode the div separator
@@ -759,19 +824,20 @@ def query(self, name, data, data_type, **kwargs):
output = str(output)
else:
output = quote(str(output), safe="")
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return str(output)
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return str(output)
def header(self, name, data, data_type, **kwargs):
"""Serialize data intended for a request header.
- :param data: The data to be serialized.
+ :param str name: The name of the header.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized header
"""
try:
if data_type in ["[str]"]:
@@ -780,21 +846,20 @@ def header(self, name, data, data_type, **kwargs):
output = self.serialize_data(data, data_type, **kwargs)
if data_type == "bool":
output = json.dumps(output)
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return str(output)
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return str(output)
def serialize_data(self, data, data_type, **kwargs):
"""Serialize generic data according to supplied data type.
- :param data: The data to be serialized.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
- :param bool required: Whether it's essential that the data not be
- empty or None
:raises: AttributeError if required data is None.
:raises: ValueError if data is None
:raises: SerializationError if serialization fails.
+ :returns: The serialized data.
+ :rtype: str, int, float, bool, dict, list
"""
if data is None:
raise ValueError("No value for given attribute")
@@ -805,7 +870,7 @@ def serialize_data(self, data, data_type, **kwargs):
if data_type in self.basic_types.values():
return self.serialize_basic(data, data_type, **kwargs)
- elif data_type in self.serialize_type:
+ if data_type in self.serialize_type:
return self.serialize_type[data_type](data, **kwargs)
# If dependencies is empty, try with current data class
@@ -821,11 +886,10 @@ def serialize_data(self, data, data_type, **kwargs):
except (ValueError, TypeError) as err:
msg = "Unable to serialize value: {!r} as type: {!r}."
raise SerializationError(msg.format(data, data_type)) from err
- else:
- return self._serialize(data, **kwargs)
+ return self._serialize(data, **kwargs)
@classmethod
- def _get_custom_serializers(cls, data_type, **kwargs):
+ def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements
custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type)
if custom_serializer:
return custom_serializer
@@ -841,23 +905,26 @@ def serialize_basic(cls, data, data_type, **kwargs):
- basic_types_serializers dict[str, callable] : If set, use the callable as serializer
- is_xml bool : If set, use xml_basic_types_serializers
- :param data: Object to be serialized.
+ :param obj data: Object to be serialized.
:param str data_type: Type of object in the iterable.
+ :rtype: str, int, float, bool
+ :return: serialized object
"""
custom_serializer = cls._get_custom_serializers(data_type, **kwargs)
if custom_serializer:
return custom_serializer(data)
if data_type == "str":
return cls.serialize_unicode(data)
- return eval(data_type)(data) # nosec
+ return eval(data_type)(data) # nosec # pylint: disable=eval-used
@classmethod
def serialize_unicode(cls, data):
"""Special handling for serializing unicode strings in Py2.
Encode to UTF-8 if unicode, otherwise handle as a str.
- :param data: Object to be serialized.
+ :param str data: Object to be serialized.
:rtype: str
+ :return: serialized object
"""
try: # If I received an enum, return its value
return data.value
@@ -871,8 +938,7 @@ def serialize_unicode(cls, data):
return data
except NameError:
return str(data)
- else:
- return str(data)
+ return str(data)
def serialize_iter(self, data, iter_type, div=None, **kwargs):
"""Serialize iterable.
@@ -882,15 +948,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs):
serialization_ctxt['type'] should be same as data_type.
- is_xml bool : If set, serialize as XML
- :param list attr: Object to be serialized.
+ :param list data: Object to be serialized.
:param str iter_type: Type of object in the iterable.
- :param bool required: Whether the objects in the iterable must
- not be None or empty.
:param str div: If set, this str will be used to combine the elements
in the iterable into a combined string. Default is 'None'.
- :keyword bool do_quote: Whether to quote the serialized result of each iterable element.
Defaults to False.
:rtype: list, str
+ :return: serialized iterable
"""
if isinstance(data, str):
raise SerializationError("Refuse str type as a valid iter type.")
@@ -945,9 +1009,8 @@ def serialize_dict(self, attr, dict_type, **kwargs):
:param dict attr: Object to be serialized.
:param str dict_type: Type of object in the dictionary.
- :param bool required: Whether the objects in the dictionary must
- not be None or empty.
:rtype: dict
+ :return: serialized dictionary
"""
serialization_ctxt = kwargs.get("serialization_ctxt", {})
serialized = {}
@@ -971,7 +1034,7 @@ def serialize_dict(self, attr, dict_type, **kwargs):
return serialized
- def serialize_object(self, attr, **kwargs):
+ def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements
"""Serialize a generic object.
This will be handled as a dictionary. If object passed in is not
a basic type (str, int, float, dict, list) it will simply be
@@ -979,6 +1042,7 @@ def serialize_object(self, attr, **kwargs):
:param dict attr: Object to be serialized.
:rtype: dict or str
+ :return: serialized object
"""
if attr is None:
return None
@@ -1003,7 +1067,7 @@ def serialize_object(self, attr, **kwargs):
return self.serialize_decimal(attr)
# If it's a model or I know this dependency, serialize as a Model
- elif obj_type in self.dependencies.values() or isinstance(attr, Model):
+ if obj_type in self.dependencies.values() or isinstance(attr, Model):
return self._serialize(attr)
if obj_type == dict:
@@ -1034,56 +1098,61 @@ def serialize_enum(attr, enum_obj=None):
try:
enum_obj(result) # type: ignore
return result
- except ValueError:
+ except ValueError as exc:
for enum_value in enum_obj: # type: ignore
if enum_value.value.lower() == str(attr).lower():
return enum_value.value
error = "{!r} is not valid value for enum {!r}"
- raise SerializationError(error.format(attr, enum_obj))
+ raise SerializationError(error.format(attr, enum_obj)) from exc
@staticmethod
- def serialize_bytearray(attr, **kwargs):
+ def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize bytearray into base-64 string.
- :param attr: Object to be serialized.
+ :param str attr: Object to be serialized.
:rtype: str
+ :return: serialized base64
"""
return b64encode(attr).decode()
@staticmethod
- def serialize_base64(attr, **kwargs):
+ def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize str into base-64 string.
- :param attr: Object to be serialized.
+ :param str attr: Object to be serialized.
:rtype: str
+ :return: serialized base64
"""
encoded = b64encode(attr).decode("ascii")
return encoded.strip("=").replace("+", "-").replace("/", "_")
@staticmethod
- def serialize_decimal(attr, **kwargs):
+ def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Decimal object to float.
- :param attr: Object to be serialized.
+ :param decimal attr: Object to be serialized.
:rtype: float
+ :return: serialized decimal
"""
return float(attr)
@staticmethod
- def serialize_long(attr, **kwargs):
+ def serialize_long(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize long (Py2) or int (Py3).
- :param attr: Object to be serialized.
+ :param int attr: Object to be serialized.
:rtype: int/long
+ :return: serialized long
"""
return _long_type(attr)
@staticmethod
- def serialize_date(attr, **kwargs):
+ def serialize_date(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Date object into ISO-8601 formatted string.
:param Date attr: Object to be serialized.
:rtype: str
+ :return: serialized date
"""
if isinstance(attr, str):
attr = isodate.parse_date(attr)
@@ -1091,11 +1160,12 @@ def serialize_date(attr, **kwargs):
return t
@staticmethod
- def serialize_time(attr, **kwargs):
+ def serialize_time(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Time object into ISO-8601 formatted string.
:param datetime.time attr: Object to be serialized.
:rtype: str
+ :return: serialized time
"""
if isinstance(attr, str):
attr = isodate.parse_time(attr)
@@ -1105,30 +1175,32 @@ def serialize_time(attr, **kwargs):
return t
@staticmethod
- def serialize_duration(attr, **kwargs):
+ def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize TimeDelta object into ISO-8601 formatted string.
:param TimeDelta attr: Object to be serialized.
:rtype: str
+ :return: serialized duration
"""
if isinstance(attr, str):
attr = isodate.parse_duration(attr)
return isodate.duration_isoformat(attr)
@staticmethod
- def serialize_rfc(attr, **kwargs):
+ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into RFC-1123 formatted string.
:param Datetime attr: Object to be serialized.
:rtype: str
:raises: TypeError if format invalid.
+ :return: serialized rfc
"""
try:
if not attr.tzinfo:
_LOGGER.warning("Datetime with no tzinfo will be considered UTC.")
utc = attr.utctimetuple()
- except AttributeError:
- raise TypeError("RFC1123 object must be valid Datetime object.")
+ except AttributeError as exc:
+ raise TypeError("RFC1123 object must be valid Datetime object.") from exc
return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format(
Serializer.days[utc.tm_wday],
@@ -1141,12 +1213,13 @@ def serialize_rfc(attr, **kwargs):
)
@staticmethod
- def serialize_iso(attr, **kwargs):
+ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into ISO-8601 formatted string.
:param Datetime attr: Object to be serialized.
:rtype: str
:raises: SerializationError if format invalid.
+ :return: serialized iso
"""
if isinstance(attr, str):
attr = isodate.parse_datetime(attr)
@@ -1172,13 +1245,14 @@ def serialize_iso(attr, **kwargs):
raise TypeError(msg) from err
@staticmethod
- def serialize_unix(attr, **kwargs):
+ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into IntTime format.
This is represented as seconds.
:param Datetime attr: Object to be serialized.
:rtype: int
:raises: SerializationError if format invalid
+ :return: serialied unix
"""
if isinstance(attr, int):
return attr
@@ -1186,11 +1260,11 @@ def serialize_unix(attr, **kwargs):
if not attr.tzinfo:
_LOGGER.warning("Datetime with no tzinfo will be considered UTC.")
return int(calendar.timegm(attr.utctimetuple()))
- except AttributeError:
- raise TypeError("Unix time object must be valid Datetime object.")
+ except AttributeError as exc:
+ raise TypeError("Unix time object must be valid Datetime object.") from exc
-def rest_key_extractor(attr, attr_desc, data):
+def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
key = attr_desc["key"]
working_data = data
@@ -1211,7 +1285,9 @@ def rest_key_extractor(attr, attr_desc, data):
return working_data.get(key)
-def rest_key_case_insensitive_extractor(attr, attr_desc, data):
+def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements
+ attr, attr_desc, data
+):
key = attr_desc["key"]
working_data = data
@@ -1232,17 +1308,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data):
return attribute_key_case_insensitive_extractor(key, None, working_data)
-def last_rest_key_extractor(attr, attr_desc, data):
- """Extract the attribute in "data" based on the last part of the JSON path key."""
+def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
+ """Extract the attribute in "data" based on the last part of the JSON path key.
+
+ :param str attr: The attribute to extract
+ :param dict attr_desc: The attribute description
+ :param dict data: The data to extract from
+ :rtype: object
+ :returns: The extracted attribute
+ """
key = attr_desc["key"]
dict_keys = _FLATTEN.split(key)
return attribute_key_extractor(dict_keys[-1], None, data)
-def last_rest_key_case_insensitive_extractor(attr, attr_desc, data):
+def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
"""Extract the attribute in "data" based on the last part of the JSON path key.
This is the case insensitive version of "last_rest_key_extractor"
+ :param str attr: The attribute to extract
+ :param dict attr_desc: The attribute description
+ :param dict data: The data to extract from
+ :rtype: object
+ :returns: The extracted attribute
"""
key = attr_desc["key"]
dict_keys = _FLATTEN.split(key)
@@ -1279,7 +1367,7 @@ def _extract_name_from_internal_type(internal_type):
return xml_name
-def xml_key_extractor(attr, attr_desc, data):
+def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements
if isinstance(data, dict):
return None
@@ -1331,22 +1419,21 @@ def xml_key_extractor(attr, attr_desc, data):
if is_iter_type:
if is_wrapped:
return None # is_wrapped no node, we want None
- else:
- return [] # not wrapped, assume empty list
+ return [] # not wrapped, assume empty list
return None # Assume it's not there, maybe an optional node.
# If is_iter_type and not wrapped, return all found children
if is_iter_type:
if not is_wrapped:
return children
- else: # Iter and wrapped, should have found one node only (the wrap one)
- if len(children) != 1:
- raise DeserializationError(
- "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
- xml_name
- )
+ # Iter and wrapped, should have found one node only (the wrap one)
+ if len(children) != 1:
+ raise DeserializationError(
+ "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long
+ xml_name
)
- return list(children[0]) # Might be empty list and that's ok.
+ )
+ return list(children[0]) # Might be empty list and that's ok.
# Here it's not a itertype, we should have found one element only or empty
if len(children) > 1:
@@ -1354,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data):
return children[0]
-class Deserializer(object):
+class Deserializer:
"""Response object model deserializer.
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1363,9 +1450,9 @@ class Deserializer(object):
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
- valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
+ valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.deserialize_type = {
"iso-8601": Deserializer.deserialize_iso,
"rfc-1123": Deserializer.deserialize_rfc,
@@ -1403,11 +1490,12 @@ def __call__(self, target_obj, response_data, content_type=None):
:param str content_type: Swagger "produces" if available.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
data = self._unpack_content(response_data, content_type)
return self._deserialize(target_obj, data)
- def _deserialize(self, target_obj, data):
+ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements
"""Call the deserializer on a model.
Data needs to be already deserialized as JSON or XML ElementTree
@@ -1416,12 +1504,13 @@ def _deserialize(self, target_obj, data):
:param object data: Object to deserialize.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
# This is already a model, go recursive just in case
if hasattr(data, "_attribute_map"):
constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")]
try:
- for attr, mapconfig in data._attribute_map.items():
+ for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access
if attr in constants:
continue
value = getattr(data, attr)
@@ -1440,13 +1529,13 @@ def _deserialize(self, target_obj, data):
if isinstance(response, str):
return self.deserialize_data(data, response)
- elif isinstance(response, type) and issubclass(response, Enum):
+ if isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)
if data is None or data is CoreNull:
return data
try:
- attributes = response._attribute_map # type: ignore
+ attributes = response._attribute_map # type: ignore # pylint: disable=protected-access
d_attrs = {}
for attr, attr_desc in attributes.items():
# Check empty string. If it's not empty, someone has a real "additionalProperties"...
@@ -1476,9 +1565,8 @@ def _deserialize(self, target_obj, data):
except (AttributeError, TypeError, KeyError) as err:
msg = "Unable to deserialize to object: " + class_name # type: ignore
raise DeserializationError(msg) from err
- else:
- additional_properties = self._build_additional_properties(attributes, data)
- return self._instantiate_model(response, d_attrs, additional_properties)
+ additional_properties = self._build_additional_properties(attributes, data)
+ return self._instantiate_model(response, d_attrs, additional_properties)
def _build_additional_properties(self, attribute_map, data):
if not self.additional_properties_detection:
@@ -1505,6 +1593,8 @@ def _classify_target(self, target, data):
:param str target: The target object type to deserialize to.
:param str/dict data: The response data to deserialize.
+ :return: The classified target object and its class name.
+ :rtype: tuple
"""
if target is None:
return None, None
@@ -1516,7 +1606,7 @@ def _classify_target(self, target, data):
return target, target
try:
- target = target._classify(data, self.dependencies) # type: ignore
+ target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access
except AttributeError:
pass # Target is not a Model, no classify
return target, target.__class__.__name__ # type: ignore
@@ -1531,10 +1621,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
:param str target_obj: The target object type to deserialize to.
:param str/dict data: The response data to deserialize.
:param str content_type: Swagger "produces" if available.
+ :return: Deserialized object.
+ :rtype: object
"""
try:
return self(target_obj, data, content_type=content_type)
- except:
+ except: # pylint: disable=bare-except
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
@@ -1552,10 +1644,12 @@ def _unpack_content(raw_data, content_type=None):
If raw_data is something else, bypass all logic and return it directly.
- :param raw_data: Data to be processed.
- :param content_type: How to parse if raw_data is a string/bytes.
+ :param obj raw_data: Data to be processed.
+ :param str content_type: How to parse if raw_data is a string/bytes.
:raises JSONDecodeError: If JSON is requested and parsing is impossible.
:raises UnicodeDecodeError: If bytes is not UTF8
+ :rtype: object
+ :return: Unpacked content.
"""
# Assume this is enough to detect a Pipeline Response without importing it
context = getattr(raw_data, "context", {})
@@ -1579,24 +1673,35 @@ def _unpack_content(raw_data, content_type=None):
def _instantiate_model(self, response, attrs, additional_properties=None):
"""Instantiate a response model passing in deserialized args.
- :param response: The response model class.
- :param d_attrs: The deserialized response attributes.
+ :param Response response: The response model class.
+ :param dict attrs: The deserialized response attributes.
+ :param dict additional_properties: Additional properties to be set.
+ :rtype: Response
+ :return: The instantiated response model.
"""
if callable(response):
subtype = getattr(response, "_subtype_map", {})
try:
- readonly = [k for k, v in response._validation.items() if v.get("readonly")]
- const = [k for k, v in response._validation.items() if v.get("constant")]
+ readonly = [
+ k
+ for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
+ if v.get("readonly")
+ ]
+ const = [
+ k
+ for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
+ if v.get("constant")
+ ]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
setattr(response_obj, attr, attrs.get(attr))
if additional_properties:
- response_obj.additional_properties = additional_properties
+ response_obj.additional_properties = additional_properties # type: ignore
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
- raise DeserializationError(msg + str(err))
+ raise DeserializationError(msg + str(err)) from err
else:
try:
for attr, value in attrs.items():
@@ -1605,15 +1710,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
except Exception as exp:
msg = "Unable to populate response model. "
msg += "Type: {}, Error: {}".format(type(response), exp)
- raise DeserializationError(msg)
+ raise DeserializationError(msg) from exp
- def deserialize_data(self, data, data_type):
+ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements
"""Process data for deserialization according to data type.
:param str data: The response string to be deserialized.
:param str data_type: The type to deserialize to.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
if data is None:
return data
@@ -1627,7 +1733,11 @@ def deserialize_data(self, data, data_type):
if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())):
return data
- is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"]
+ is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment
+ "object",
+ "[]",
+ r"{}",
+ ]
if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text:
return None
data_val = self.deserialize_type[data_type](data)
@@ -1647,14 +1757,14 @@ def deserialize_data(self, data, data_type):
msg = "Unable to deserialize response data."
msg += " Data: {}, {}".format(data, data_type)
raise DeserializationError(msg) from err
- else:
- return self._deserialize(obj_type, data)
+ return self._deserialize(obj_type, data)
def deserialize_iter(self, attr, iter_type):
"""Deserialize an iterable.
:param list attr: Iterable to be deserialized.
:param str iter_type: The type of object in the iterable.
+ :return: Deserialized iterable.
:rtype: list
"""
if attr is None:
@@ -1671,6 +1781,7 @@ def deserialize_dict(self, attr, dict_type):
:param dict/list attr: Dictionary to be deserialized. Also accepts
a list of key, value pairs.
:param str dict_type: The object type of the items in the dictionary.
+ :return: Deserialized dictionary.
:rtype: dict
"""
if isinstance(attr, list):
@@ -1681,11 +1792,12 @@ def deserialize_dict(self, attr, dict_type):
attr = {el.tag: el.text for el in attr}
return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()}
- def deserialize_object(self, attr, **kwargs):
+ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements
"""Deserialize a generic object.
This will be handled as a dictionary.
:param dict attr: Dictionary to be deserialized.
+ :return: Deserialized object.
:rtype: dict
:raises: TypeError if non-builtin datatype encountered.
"""
@@ -1720,11 +1832,10 @@ def deserialize_object(self, attr, **kwargs):
pass
return deserialized
- else:
- error = "Cannot deserialize generic object with type: "
- raise TypeError(error + str(obj_type))
+ error = "Cannot deserialize generic object with type: "
+ raise TypeError(error + str(obj_type))
- def deserialize_basic(self, attr, data_type):
+ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements
"""Deserialize basic builtin data type from string.
Will attempt to convert to str, int, float and bool.
This function will also accept '1', '0', 'true' and 'false' as
@@ -1732,6 +1843,7 @@ def deserialize_basic(self, attr, data_type):
:param str attr: response string to be deserialized.
:param str data_type: deserialization data type.
+ :return: Deserialized basic type.
:rtype: str, int, float or bool
:raises: TypeError if string format is not valid.
"""
@@ -1743,24 +1855,23 @@ def deserialize_basic(self, attr, data_type):
if data_type == "str":
# None or '', node is empty string.
return ""
- else:
- # None or '', node with a strong type is None.
- # Don't try to model "empty bool" or "empty int"
- return None
+ # None or '', node with a strong type is None.
+ # Don't try to model "empty bool" or "empty int"
+ return None
if data_type == "bool":
if attr in [True, False, 1, 0]:
return bool(attr)
- elif isinstance(attr, str):
+ if isinstance(attr, str):
if attr.lower() in ["true", "1"]:
return True
- elif attr.lower() in ["false", "0"]:
+ if attr.lower() in ["false", "0"]:
return False
raise TypeError("Invalid boolean value: {}".format(attr))
if data_type == "str":
return self.deserialize_unicode(attr)
- return eval(data_type)(attr) # nosec
+ return eval(data_type)(attr) # nosec # pylint: disable=eval-used
@staticmethod
def deserialize_unicode(data):
@@ -1768,6 +1879,7 @@ def deserialize_unicode(data):
as a string.
:param str data: response string to be deserialized.
+ :return: Deserialized string.
:rtype: str or unicode
"""
# We might be here because we have an enum modeled as string,
@@ -1781,8 +1893,7 @@ def deserialize_unicode(data):
return data
except NameError:
return str(data)
- else:
- return str(data)
+ return str(data)
@staticmethod
def deserialize_enum(data, enum_obj):
@@ -1794,6 +1905,7 @@ def deserialize_enum(data, enum_obj):
:param str data: Response string to be deserialized. If this value is
None or invalid it will be returned as-is.
:param Enum enum_obj: Enum object to deserialize to.
+ :return: Deserialized enum object.
:rtype: Enum
"""
if isinstance(data, enum_obj) or data is None:
@@ -1804,9 +1916,9 @@ def deserialize_enum(data, enum_obj):
# Workaround. We might consider remove it in the future.
try:
return list(enum_obj.__members__.values())[data]
- except IndexError:
+ except IndexError as exc:
error = "{!r} is not a valid index for enum {!r}"
- raise DeserializationError(error.format(data, enum_obj))
+ raise DeserializationError(error.format(data, enum_obj)) from exc
try:
return enum_obj(str(data))
except ValueError:
@@ -1822,6 +1934,7 @@ def deserialize_bytearray(attr):
"""Deserialize string into bytearray.
:param str attr: response string to be deserialized.
+ :return: Deserialized bytearray
:rtype: bytearray
:raises: TypeError if string format invalid.
"""
@@ -1834,6 +1947,7 @@ def deserialize_base64(attr):
"""Deserialize base64 encoded string into string.
:param str attr: response string to be deserialized.
+ :return: Deserialized base64 string
:rtype: bytearray
:raises: TypeError if string format invalid.
"""
@@ -1849,8 +1963,9 @@ def deserialize_decimal(attr):
"""Deserialize string into Decimal object.
:param str attr: response string to be deserialized.
- :rtype: Decimal
+ :return: Deserialized decimal
:raises: DeserializationError if string format invalid.
+ :rtype: decimal
"""
if isinstance(attr, ET.Element):
attr = attr.text
@@ -1865,6 +1980,7 @@ def deserialize_long(attr):
"""Deserialize string into long (Py2) or int (Py3).
:param str attr: response string to be deserialized.
+ :return: Deserialized int
:rtype: long or int
:raises: ValueError if string format invalid.
"""
@@ -1877,6 +1993,7 @@ def deserialize_duration(attr):
"""Deserialize ISO-8601 formatted string into TimeDelta object.
:param str attr: response string to be deserialized.
+ :return: Deserialized duration
:rtype: TimeDelta
:raises: DeserializationError if string format invalid.
"""
@@ -1887,14 +2004,14 @@ def deserialize_duration(attr):
except (ValueError, OverflowError, AttributeError) as err:
msg = "Cannot deserialize duration object."
raise DeserializationError(msg) from err
- else:
- return duration
+ return duration
@staticmethod
def deserialize_date(attr):
"""Deserialize ISO-8601 formatted string into Date object.
:param str attr: response string to be deserialized.
+ :return: Deserialized date
:rtype: Date
:raises: DeserializationError if string format invalid.
"""
@@ -1910,6 +2027,7 @@ def deserialize_time(attr):
"""Deserialize ISO-8601 formatted string into time object.
:param str attr: response string to be deserialized.
+ :return: Deserialized time
:rtype: datetime.time
:raises: DeserializationError if string format invalid.
"""
@@ -1924,6 +2042,7 @@ def deserialize_rfc(attr):
"""Deserialize RFC-1123 formatted string into Datetime object.
:param str attr: response string to be deserialized.
+ :return: Deserialized RFC datetime
:rtype: Datetime
:raises: DeserializationError if string format invalid.
"""
@@ -1939,14 +2058,14 @@ def deserialize_rfc(attr):
except ValueError as err:
msg = "Cannot deserialize to rfc datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
@staticmethod
def deserialize_iso(attr):
"""Deserialize ISO-8601 formatted string into Datetime object.
:param str attr: response string to be deserialized.
+ :return: Deserialized ISO datetime
:rtype: Datetime
:raises: DeserializationError if string format invalid.
"""
@@ -1976,8 +2095,7 @@ def deserialize_iso(attr):
except (ValueError, OverflowError, AttributeError) as err:
msg = "Cannot deserialize datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
@staticmethod
def deserialize_unix(attr):
@@ -1985,6 +2103,7 @@ def deserialize_unix(attr):
This is represented as seconds.
:param int attr: Object to be serialized.
+ :return: Deserialized datetime
:rtype: Datetime
:raises: DeserializationError if format invalid
"""
@@ -1996,5 +2115,4 @@ def deserialize_unix(attr):
except ValueError as err:
msg = "Cannot deserialize to unix datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_version.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_version.py
index 9f8bb24bdd99..f89ed38360ab 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_version.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "10.0.0"
+VERSION = "9.1.0"
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/__init__.py
index 99174a0dabfc..95cf71f968da 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/__init__.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/__init__.py
@@ -5,12 +5,18 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._app_platform_management_client import AppPlatformManagementClient
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._app_platform_management_client import AppPlatformManagementClient # type: ignore
try:
from ._patch import __all__ as _patch_all
- from ._patch import * # pylint: disable=unused-wildcard-import
+ from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
@@ -18,6 +24,6 @@
__all__ = [
"AppPlatformManagementClient",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_app_platform_management_client.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_app_platform_management_client.py
index a8b9c24bdb8e..d2dc7c08da69 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_app_platform_management_client.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_app_platform_management_client.py
@@ -38,9 +38,14 @@
CustomizedAcceleratorsOperations,
DeploymentsOperations,
DevToolPortalsOperations,
+ EurekaServersOperations,
GatewayCustomDomainsOperations,
GatewayRouteConfigsOperations,
GatewaysOperations,
+ JobExecutionOperations,
+ JobExecutionsOperations,
+ JobOperations,
+ JobsOperations,
MonitoringSettingsOperations,
Operations,
PredefinedAcceleratorsOperations,
@@ -52,17 +57,18 @@
)
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-class AppPlatformManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
+class AppPlatformManagementClient: # pylint: disable=too-many-instance-attributes
"""REST API for Azure Spring Apps.
:ivar services: ServicesOperations operations
:vartype services: azure.mgmt.appplatform.aio.operations.ServicesOperations
:ivar apms: ApmsOperations operations
:vartype apms: azure.mgmt.appplatform.aio.operations.ApmsOperations
+ :ivar eureka_servers: EurekaServersOperations operations
+ :vartype eureka_servers: azure.mgmt.appplatform.aio.operations.EurekaServersOperations
:ivar config_servers: ConfigServersOperations operations
:vartype config_servers: azure.mgmt.appplatform.aio.operations.ConfigServersOperations
:ivar configuration_services: ConfigurationServicesOperations operations
@@ -131,6 +137,14 @@ class AppPlatformManagementClient: # pylint: disable=client-accepts-api-version
:ivar predefined_accelerators: PredefinedAcceleratorsOperations operations
:vartype predefined_accelerators:
azure.mgmt.appplatform.aio.operations.PredefinedAcceleratorsOperations
+ :ivar jobs: JobsOperations operations
+ :vartype jobs: azure.mgmt.appplatform.aio.operations.JobsOperations
+ :ivar job: JobOperations operations
+ :vartype job: azure.mgmt.appplatform.aio.operations.JobOperations
+ :ivar job_execution: JobExecutionOperations operations
+ :vartype job_execution: azure.mgmt.appplatform.aio.operations.JobExecutionOperations
+ :ivar job_executions: JobExecutionsOperations operations
+ :vartype job_executions: azure.mgmt.appplatform.aio.operations.JobExecutionsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
@@ -138,8 +152,8 @@ class AppPlatformManagementClient: # pylint: disable=client-accepts-api-version
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
- :keyword api_version: Api Version. Default value is "2023-12-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2024-05-01-preview". Note that overriding
+ this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
@@ -181,6 +195,7 @@ def __init__(
self._serialize.client_side_validation = False
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.apms = ApmsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.eureka_servers = EurekaServersOperations(self._client, self._config, self._serialize, self._deserialize)
self.config_servers = ConfigServersOperations(self._client, self._config, self._serialize, self._deserialize)
self.configuration_services = ConfigurationServicesOperations(
self._client, self._config, self._serialize, self._deserialize
@@ -239,6 +254,10 @@ def __init__(
self.predefined_accelerators = PredefinedAcceleratorsOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.job = JobOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.job_execution = JobExecutionOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.job_executions = JobExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_configuration.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_configuration.py
index 5fc004262306..16e37f4bcbbc 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_configuration.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/_configuration.py
@@ -14,11 +14,10 @@
from .._version import VERSION
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
+class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AppPlatformManagementClient.
Note that all parameters used to create this instance are saved as instance
@@ -29,13 +28,13 @@ class AppPlatformManagementClientConfiguration: # pylint: disable=too-many-inst
:param subscription_id: Gets subscription ID which uniquely identify the Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:type subscription_id: str
- :keyword api_version: Api Version. Default value is "2023-12-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2024-05-01-preview". Note that overriding
+ this default value may result in unsupported behavior.
:paramtype api_version: str
"""
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
- api_version: str = kwargs.pop("api_version", "2023-12-01")
+ api_version: str = kwargs.pop("api_version", "2024-05-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/__init__.py
index 71f15acbbfb3..291baeb1ed37 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/__init__.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/__init__.py
@@ -5,45 +5,57 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._services_operations import ServicesOperations
-from ._apms_operations import ApmsOperations
-from ._config_servers_operations import ConfigServersOperations
-from ._configuration_services_operations import ConfigurationServicesOperations
-from ._service_registries_operations import ServiceRegistriesOperations
-from ._application_live_views_operations import ApplicationLiveViewsOperations
-from ._dev_tool_portals_operations import DevToolPortalsOperations
-from ._container_registries_operations import ContainerRegistriesOperations
-from ._build_service_operations import BuildServiceOperations
-from ._buildpack_binding_operations import BuildpackBindingOperations
-from ._build_service_builder_operations import BuildServiceBuilderOperations
-from ._build_service_agent_pool_operations import BuildServiceAgentPoolOperations
-from ._monitoring_settings_operations import MonitoringSettingsOperations
-from ._apps_operations import AppsOperations
-from ._bindings_operations import BindingsOperations
-from ._storages_operations import StoragesOperations
-from ._certificates_operations import CertificatesOperations
-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
-from ._gateways_operations import GatewaysOperations
-from ._gateway_route_configs_operations import GatewayRouteConfigsOperations
-from ._gateway_custom_domains_operations import GatewayCustomDomainsOperations
-from ._api_portals_operations import ApiPortalsOperations
-from ._api_portal_custom_domains_operations import ApiPortalCustomDomainsOperations
-from ._application_accelerators_operations import ApplicationAcceleratorsOperations
-from ._customized_accelerators_operations import CustomizedAcceleratorsOperations
-from ._predefined_accelerators_operations import PredefinedAcceleratorsOperations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._services_operations import ServicesOperations # type: ignore
+from ._apms_operations import ApmsOperations # type: ignore
+from ._eureka_servers_operations import EurekaServersOperations # type: ignore
+from ._config_servers_operations import ConfigServersOperations # type: ignore
+from ._configuration_services_operations import ConfigurationServicesOperations # type: ignore
+from ._service_registries_operations import ServiceRegistriesOperations # type: ignore
+from ._application_live_views_operations import ApplicationLiveViewsOperations # type: ignore
+from ._dev_tool_portals_operations import DevToolPortalsOperations # type: ignore
+from ._container_registries_operations import ContainerRegistriesOperations # type: ignore
+from ._build_service_operations import BuildServiceOperations # type: ignore
+from ._buildpack_binding_operations import BuildpackBindingOperations # type: ignore
+from ._build_service_builder_operations import BuildServiceBuilderOperations # type: ignore
+from ._build_service_agent_pool_operations import BuildServiceAgentPoolOperations # type: ignore
+from ._monitoring_settings_operations import MonitoringSettingsOperations # type: ignore
+from ._apps_operations import AppsOperations # type: ignore
+from ._bindings_operations import BindingsOperations # type: ignore
+from ._storages_operations import StoragesOperations # type: ignore
+from ._certificates_operations import CertificatesOperations # type: ignore
+from ._custom_domains_operations import CustomDomainsOperations # type: ignore
+from ._deployments_operations import DeploymentsOperations # type: ignore
+from ._operations import Operations # type: ignore
+from ._runtime_versions_operations import RuntimeVersionsOperations # type: ignore
+from ._skus_operations import SkusOperations # type: ignore
+from ._gateways_operations import GatewaysOperations # type: ignore
+from ._gateway_route_configs_operations import GatewayRouteConfigsOperations # type: ignore
+from ._gateway_custom_domains_operations import GatewayCustomDomainsOperations # type: ignore
+from ._api_portals_operations import ApiPortalsOperations # type: ignore
+from ._api_portal_custom_domains_operations import ApiPortalCustomDomainsOperations # type: ignore
+from ._application_accelerators_operations import ApplicationAcceleratorsOperations # type: ignore
+from ._customized_accelerators_operations import CustomizedAcceleratorsOperations # type: ignore
+from ._predefined_accelerators_operations import PredefinedAcceleratorsOperations # type: ignore
+from ._jobs_operations import JobsOperations # type: ignore
+from ._job_operations import JobOperations # type: ignore
+from ._job_execution_operations import JobExecutionOperations # type: ignore
+from ._job_executions_operations import JobExecutionsOperations # type: ignore
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
"ServicesOperations",
"ApmsOperations",
+ "EurekaServersOperations",
"ConfigServersOperations",
"ConfigurationServicesOperations",
"ServiceRegistriesOperations",
@@ -72,6 +84,10 @@
"ApplicationAcceleratorsOperations",
"CustomizedAcceleratorsOperations",
"PredefinedAcceleratorsOperations",
+ "JobsOperations",
+ "JobOperations",
+ "JobExecutionOperations",
+ "JobExecutionsOperations",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portal_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portal_custom_domains_operations.py
index aaccc2419e32..8ddaa8ec40f2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portal_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portal_custom_domains_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +84,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ApiPortalCustomDomainResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -138,7 +137,7 @@ async def _create_or_update_initial(
api_portal_custom_domain_resource: Union[_models.ApiPortalCustomDomainResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -355,7 +354,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -490,7 +489,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApiPortalCustomDomainResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portals_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portals_operations.py
index 85313a125c2e..fa3497d2a5e7 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portals_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_api_portals_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +83,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ApiPortalResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -135,7 +134,7 @@ async def _create_or_update_initial(
api_portal_resource: Union[_models.ApiPortalResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -334,7 +333,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -462,7 +461,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApiPortalResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -609,7 +608,7 @@ async def validate_domain(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainValidateResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apms_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apms_operations.py
index f730c01ad545..636a23e54674 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apms_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apms_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -86,7 +85,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> As
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApmResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -165,7 +164,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ApmResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -216,7 +215,7 @@ async def _create_or_update_initial(
apm_resource: Union[_models.ApmResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -415,7 +414,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -544,7 +543,7 @@ async def list_secret_keys(
:rtype: ~azure.mgmt.appplatform.models.ApmSecretKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_accelerators_operations.py
index e17f50761697..55bf850f39c9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_accelerators_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -89,7 +88,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApplicationAcceleratorResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +167,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ApplicationAcceleratorResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -219,7 +218,7 @@ async def _create_or_update_initial(
application_accelerator_resource: Union[_models.ApplicationAcceleratorResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -425,7 +424,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_live_views_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_live_views_operations.py
index d8840ee679b4..992f52bbe858 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_live_views_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_application_live_views_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -89,7 +88,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApplicationLiveViewResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +167,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ApplicationLiveViewResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -219,7 +218,7 @@ async def _create_or_update_initial(
application_live_view_resource: Union[_models.ApplicationLiveViewResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -423,7 +422,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apps_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apps_operations.py
index bc67eb48f0c1..fd10c23f34d3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apps_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_apps_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -46,7 +46,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -94,7 +94,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.AppResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -146,7 +146,7 @@ async def _create_or_update_initial(
app_resource: Union[_models.AppResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -345,7 +345,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -459,7 +459,7 @@ async def _update_initial(
app_resource: Union[_models.AppResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -674,7 +674,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> As
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AppResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -753,7 +753,7 @@ async def get_resource_upload_url(
:rtype: ~azure.mgmt.appplatform.models.ResourceUploadDefinition
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -804,7 +804,7 @@ async def _set_active_deployments_initial(
active_deployment_collection: Union[_models.ActiveDeploymentCollection, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1086,7 +1086,7 @@ async def validate_domain(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainValidateResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_bindings_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_bindings_operations.py
index b88ccf4db61c..05e70da506c1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_bindings_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_bindings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -86,7 +85,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.BindingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -139,7 +138,7 @@ async def _create_or_update_initial(
binding_resource: Union[_models.BindingResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +348,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -468,7 +467,7 @@ async def _update_initial(
binding_resource: Union[_models.BindingResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -698,7 +697,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BindingResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_agent_pool_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_agent_pool_operations.py
index 49c51b82d03c..3fa04edfef5f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_agent_pool_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_agent_pool_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -41,7 +40,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -90,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildServiceAgentPoolResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -172,7 +171,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.BuildServiceAgentPoolResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -225,7 +224,7 @@ async def _update_put_initial(
agent_pool_resource: Union[_models.BuildServiceAgentPoolResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_builder_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_builder_operations.py
index 3ae60c25c8b8..d9546a93f110 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_builder_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_builder_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -86,7 +85,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.BuilderResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -139,7 +138,7 @@ async def _create_or_update_initial(
builder_resource: Union[_models.BuilderResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +348,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -482,7 +481,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuilderResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -564,7 +563,7 @@ async def list_deployments(
:rtype: ~azure.mgmt.appplatform.models.DeploymentList
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_operations.py
index 09fe9370c25d..8b325e6e0c13 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_build_service_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -53,7 +53,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -98,7 +98,7 @@ def list_build_services(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildServiceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -177,7 +177,7 @@ async def get_build_service(
:rtype: ~azure.mgmt.appplatform.models.BuildService
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -228,7 +228,7 @@ async def _create_or_update_initial(
build_service: Union[_models.BuildService, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -449,7 +449,7 @@ def list_builds(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -531,7 +531,7 @@ async def get_build(
:rtype: ~azure.mgmt.appplatform.models.Build
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -669,7 +669,7 @@ async def create_or_update_build(
:rtype: ~azure.mgmt.appplatform.models.Build
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -728,7 +728,7 @@ async def create_or_update_build(
async def _delete_build_initial(
self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -869,7 +869,7 @@ def list_build_results(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildResultCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -960,7 +960,7 @@ async def get_build_result(
:rtype: ~azure.mgmt.appplatform.models.BuildResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1032,7 +1032,7 @@ async def get_build_result_log(
:rtype: ~azure.mgmt.appplatform.models.BuildResultLog
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1094,7 +1094,7 @@ async def get_resource_upload_url(
:rtype: ~azure.mgmt.appplatform.models.ResourceUploadDefinition
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1154,7 +1154,7 @@ async def list_supported_buildpacks(
:rtype: ~azure.mgmt.appplatform.models.SupportedBuildpacksCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1216,7 +1216,7 @@ async def get_supported_buildpack(
:rtype: ~azure.mgmt.appplatform.models.SupportedBuildpackResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1277,7 +1277,7 @@ async def list_supported_stacks(
:rtype: ~azure.mgmt.appplatform.models.SupportedStacksCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1339,7 +1339,7 @@ async def get_supported_stack(
:rtype: ~azure.mgmt.appplatform.models.SupportedStackResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_buildpack_binding_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_buildpack_binding_operations.py
index e98b920bd269..2ae0aceb90ab 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_buildpack_binding_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_buildpack_binding_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -90,7 +89,7 @@ def list_for_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildpackBindingResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -179,7 +178,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.BuildpackBindingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -234,7 +233,7 @@ async def _create_or_update_initial(
buildpack_binding: Union[_models.BuildpackBindingResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -466,7 +465,7 @@ async def _delete_initial(
buildpack_binding_name: str,
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -613,7 +612,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildpackBindingResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_certificates_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_certificates_operations.py
index d9115dcbb855..276ad3666d36 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_certificates_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_certificates_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -83,7 +82,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.CertificateResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -134,7 +133,7 @@ async def _create_or_update_initial(
certificate_resource: Union[_models.CertificateResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -333,7 +332,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -461,7 +460,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_config_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_config_servers_operations.py
index be3ddda644c9..0640bc5e2ce1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_config_servers_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_config_servers_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,8 +7,10 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+import urllib.parse
+from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
@@ -23,6 +24,7 @@
from azure.core.pipeline import PipelineResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -30,7 +32,9 @@
from ... import models as _models
from ...operations._config_servers_operations import (
+ build_delete_request,
build_get_request,
+ build_list_request,
build_update_patch_request,
build_update_put_request,
build_validate_request,
@@ -39,7 +43,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -76,7 +80,7 @@ async def get(self, resource_group_name: str, service_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.appplatform.models.ConfigServerResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -125,7 +129,7 @@ async def _update_put_initial(
config_server_resource: Union[_models.ConfigServerResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -317,7 +321,7 @@ async def _update_patch_initial(
config_server_resource: Union[_models.ConfigServerResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -502,6 +506,196 @@ def get_long_running_output(pipeline_response):
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
+ async def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_delete_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncLROPoller[None]:
+ """Disable the default Config Server, only available in Enterprise Plan.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ @distributed_trace
+ def list(
+ self, resource_group_name: str, service_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.ConfigServerResource"]:
+ """Handles requests to list all config server resources in a Service.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: An iterator like instance of either ConfigServerResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.models.ConfigServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.ConfigServerResourceCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("ConfigServerResourceCollection", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
async def _validate_initial(
self,
resource_group_name: str,
@@ -509,7 +703,7 @@ async def _validate_initial(
config_server_settings: Union[_models.ConfigServerSettings, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_configuration_services_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_configuration_services_operations.py
index 46ffc223ba1d..ca343492c0e0 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_configuration_services_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_configuration_services_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -44,7 +43,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +84,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ConfigurationServiceResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -136,7 +135,7 @@ async def _create_or_update_initial(
configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -343,7 +342,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -472,7 +471,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConfigurationServiceResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -542,7 +541,7 @@ async def _validate_initial(
settings: Union[_models.ConfigurationServiceSettings, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -753,7 +752,7 @@ async def _validate_resource_initial(
configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_container_registries_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_container_registries_operations.py
index d5c4f22697bf..539e41cb00d9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_container_registries_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_container_registries_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -90,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerRegistryResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -169,7 +168,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ContainerRegistryResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -220,7 +219,7 @@ async def _create_or_update_initial(
container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -425,7 +424,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -545,7 +544,7 @@ async def _validate_initial(
container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_custom_domains_operations.py
index 2deb7c69edfb..92655762846d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_custom_domains_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -86,7 +85,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -139,7 +138,7 @@ async def _create_or_update_initial(
domain_resource: Union[_models.CustomDomainResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +348,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -468,7 +467,7 @@ async def _update_initial(
domain_resource: Union[_models.CustomDomainResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -700,7 +699,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CustomDomainResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_customized_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_customized_accelerators_operations.py
index cc11190a9b5f..811c029855d9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_customized_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_customized_accelerators_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -92,7 +91,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CustomizedAcceleratorResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -179,7 +178,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.CustomizedAcceleratorResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -232,7 +231,7 @@ async def _create_or_update_initial(
customized_accelerator_resource: Union[_models.CustomizedAcceleratorResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -454,7 +453,7 @@ async def _delete_initial(
customized_accelerator_name: str,
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -582,7 +581,7 @@ async def _validate_initial(
properties: Union[_models.CustomizedAcceleratorProperties, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_deployments_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_deployments_operations.py
index 775dfbd6a195..b8ccca528c81 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_deployments_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_deployments_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,21 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import (
- Any,
- AsyncIterable,
- AsyncIterator,
- Callable,
- Dict,
- IO,
- List,
- Optional,
- Type,
- TypeVar,
- Union,
- cast,
- overload,
-)
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -68,7 +54,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -111,7 +97,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.DeploymentResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -164,7 +150,7 @@ async def _create_or_update_initial(
deployment_resource: Union[_models.DeploymentResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -374,7 +360,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -493,7 +479,7 @@ async def _update_initial(
deployment_resource: Union[_models.DeploymentResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -707,6 +693,7 @@ def list(
service_name: str,
app_name: str,
version: Optional[List[str]] = None,
+ expand: Optional[str] = None,
**kwargs: Any
) -> AsyncIterable["_models.DeploymentResource"]:
"""Handles requests to list all resources in an App.
@@ -720,6 +707,8 @@ def list(
:type app_name: str
:param version: Version of the deployments to be listed. Default value is None.
:type version: list[str]
+ :param expand: The expand expression to apply on the operation. Default value is None.
+ :type expand: str
:return: An iterator like instance of either DeploymentResource or the result of cls(response)
:rtype:
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.models.DeploymentResource]
@@ -731,7 +720,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeploymentResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -748,6 +737,7 @@ def prepare_request(next_link=None):
app_name=app_name,
subscription_id=self._config.subscription_id,
version=version,
+ expand=expand,
api_version=api_version,
headers=_headers,
params=_params,
@@ -826,7 +816,7 @@ def list_for_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeploymentResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -893,7 +883,7 @@ async def get_next(next_link=None):
async def _start_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1006,7 +996,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _stop_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1119,7 +1109,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _restart_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1238,7 +1228,7 @@ async def _enable_remote_debugging_initial(
remote_debugging_payload: Optional[Union[_models.RemoteDebuggingPayload, IO[bytes]]] = None,
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1452,7 +1442,7 @@ def get_long_running_output(pipeline_response):
async def _disable_remote_debugging_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1586,7 +1576,7 @@ async def get_remote_debugging_config(
:rtype: ~azure.mgmt.appplatform.models.RemoteDebugging
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1649,7 +1639,7 @@ async def get_log_file_url(
:rtype: ~azure.mgmt.appplatform.models.LogFileUrlResponse or None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1704,7 +1694,7 @@ async def _generate_heap_dump_initial(
diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1913,7 +1903,7 @@ async def _generate_thread_dump_initial(
diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2122,7 +2112,7 @@ async def _start_jfr_initial(
diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_dev_tool_portals_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_dev_tool_portals_operations.py
index 464ec30444f6..c752756e6d5c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_dev_tool_portals_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_dev_tool_portals_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -89,7 +88,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DevToolPortalResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +167,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.DevToolPortalResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -219,7 +218,7 @@ async def _create_or_update_initial(
dev_tool_portal_resource: Union[_models.DevToolPortalResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -422,7 +421,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_eureka_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_eureka_servers_operations.py
new file mode 100644
index 000000000000..37e988bc74d4
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_eureka_servers_operations.py
@@ -0,0 +1,572 @@
+# 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.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator_async import distributed_trace_async
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+from ...operations._eureka_servers_operations import (
+ build_get_request,
+ build_list_request,
+ build_update_patch_request,
+ build_update_put_request,
+)
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class EurekaServersOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.aio.AppPlatformManagementClient`'s
+ :attr:`eureka_servers` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace_async
+ async def list(
+ self, resource_group_name: str, service_name: str, **kwargs: Any
+ ) -> _models.EurekaServerResourceCollection:
+ """List the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: EurekaServerResourceCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EurekaServerResourceCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EurekaServerResourceCollection] = kwargs.pop("cls", None)
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EurekaServerResourceCollection", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.EurekaServerResource:
+ """Get the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: EurekaServerResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EurekaServerResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EurekaServerResource", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _update_put_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(eureka_server_resource, (IOBase, bytes)):
+ _content = eureka_server_resource
+ else:
+ _json = self._serialize.body(eureka_server_resource, "EurekaServerResource")
+
+ _request = build_update_put_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 201:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_update_put(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: _models.EurekaServerResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result
+ of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_update_put(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result
+ of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update_put(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Is either a
+ EurekaServerResource type or a IO[bytes] type. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result
+ of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._update_put_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ eureka_server_resource=eureka_server_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("EurekaServerResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod,
+ AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs),
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.EurekaServerResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.EurekaServerResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _update_patch_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(eureka_server_resource, (IOBase, bytes)):
+ _content = eureka_server_resource
+ else:
+ _json = self._serialize.body(eureka_server_resource, "EurekaServerResource")
+
+ _request = build_update_patch_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_update_patch(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: _models.EurekaServerResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result
+ of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_update_patch(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result
+ of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update_patch(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Is either a
+ EurekaServerResource type or a IO[bytes] type. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either EurekaServerResource or the result
+ of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._update_patch_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ eureka_server_resource=eureka_server_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("EurekaServerResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.EurekaServerResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.EurekaServerResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_custom_domains_operations.py
index 64f84c181352..2e78a63431b8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_custom_domains_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +84,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.GatewayCustomDomainResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -138,7 +137,7 @@ async def _create_or_update_initial(
gateway_custom_domain_resource: Union[_models.GatewayCustomDomainResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -355,7 +354,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, domain_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -490,7 +489,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.GatewayCustomDomainResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_route_configs_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_route_configs_operations.py
index b0c9a57d84e7..99483463dac1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_route_configs_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateway_route_configs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +84,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.GatewayRouteConfigResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -138,7 +137,7 @@ async def _create_or_update_initial(
gateway_route_config_resource: Union[_models.GatewayRouteConfigResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -357,7 +356,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, route_config_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -492,7 +491,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.GatewayRouteConfigResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateways_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateways_operations.py
index 8065c15293ed..f4ee36e62067 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateways_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_gateways_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -39,13 +39,14 @@
build_list_env_secrets_request,
build_list_request,
build_restart_request,
+ build_update_capacity_request,
build_validate_domain_request,
)
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -86,7 +87,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.GatewayResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -137,7 +138,7 @@ async def _create_or_update_initial(
gateway_resource: Union[_models.GatewayResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -333,10 +334,220 @@ def get_long_running_output(pipeline_response):
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
+ async def _update_capacity_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: Union[_models.SkuObject, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(gateway_capacity_resource, (IOBase, bytes)):
+ _content = gateway_capacity_resource
+ else:
+ _json = self._serialize.body(gateway_capacity_resource, "SkuObject")
+
+ _request = build_update_capacity_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ gateway_name=gateway_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_update_capacity(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: _models.SkuObject,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.GatewayResource]:
+ """Operation to update an exiting Spring Cloud Gateway capacity.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param gateway_name: The name of Spring Cloud Gateway. Required.
+ :type gateway_name: str
+ :param gateway_capacity_resource: The gateway capacity for the update operation. Required.
+ :type gateway_capacity_resource: ~azure.mgmt.appplatform.models.SkuObject
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either GatewayResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.GatewayResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_update_capacity(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.GatewayResource]:
+ """Operation to update an exiting Spring Cloud Gateway capacity.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param gateway_name: The name of Spring Cloud Gateway. Required.
+ :type gateway_name: str
+ :param gateway_capacity_resource: The gateway capacity for the update operation. Required.
+ :type gateway_capacity_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either GatewayResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.GatewayResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update_capacity(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: Union[_models.SkuObject, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.GatewayResource]:
+ """Operation to update an exiting Spring Cloud Gateway capacity.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param gateway_name: The name of Spring Cloud Gateway. Required.
+ :type gateway_name: str
+ :param gateway_capacity_resource: The gateway capacity for the update operation. Is either a
+ SkuObject type or a IO[bytes] type. Required.
+ :type gateway_capacity_resource: ~azure.mgmt.appplatform.models.SkuObject or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either GatewayResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.GatewayResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.GatewayResource] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._update_capacity_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ gateway_name=gateway_name,
+ gateway_capacity_resource=gateway_capacity_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("GatewayResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.GatewayResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.GatewayResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
async def _delete_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -459,7 +670,7 @@ async def list_env_secrets(
:rtype: dict[str, str]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -505,7 +716,7 @@ async def list_env_secrets(
async def _restart_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -638,7 +849,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.GatewayResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -785,7 +996,7 @@ async def validate_domain(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainValidateResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_execution_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_execution_operations.py
new file mode 100644
index 000000000000..4face7f81976
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_execution_operations.py
@@ -0,0 +1,305 @@
+# 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 sys
+from typing import Any, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator_async import distributed_trace_async
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+from ...operations._job_execution_operations import (
+ build_cancel_request,
+ build_get_request,
+ build_list_env_secrets_request,
+)
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class JobExecutionOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.aio.AppPlatformManagementClient`'s
+ :attr:`job_execution` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ async def _cancel_initial(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_cancel_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def begin_cancel(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Terminate execution of a running Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_execution_name: The name of the Job execution. Required.
+ :type job_execution_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._cancel_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ @distributed_trace_async
+ async def get(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> _models.JobExecution:
+ """Get details of an execution of an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_execution_name: The name of the Job execution. Required.
+ :type job_execution_name: str
+ :return: JobExecution or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.JobExecution
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobExecution] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("JobExecution", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def list_env_secrets(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> _models.EnvSecretsCollection:
+ """List sensitive environment variables of Job execution.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_execution_name: The name of the Job execution. Required.
+ :type job_execution_name: str
+ :return: EnvSecretsCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EnvSecretsCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EnvSecretsCollection] = kwargs.pop("cls", None)
+
+ _request = build_list_env_secrets_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EnvSecretsCollection", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_executions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_executions_operations.py
new file mode 100644
index 000000000000..02d6821c4a3d
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_executions_operations.py
@@ -0,0 +1,141 @@
+# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models as _models
+from ...operations._job_executions_operations import build_list_request
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class JobExecutionsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.aio.AppPlatformManagementClient`'s
+ :attr:`job_executions` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def list(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.JobExecution"]:
+ """Get executions of a Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: An iterator like instance of either JobExecution or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobExecutionCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("JobExecutionCollection", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_operations.py
new file mode 100644
index 000000000000..b999f45db8f5
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_job_operations.py
@@ -0,0 +1,720 @@
+# 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.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator_async import distributed_trace_async
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+from ...operations._job_operations import (
+ build_create_or_update_request,
+ build_delete_request,
+ build_get_request,
+ build_list_env_secrets_request,
+ build_start_request,
+)
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class JobOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.aio.AppPlatformManagementClient`'s
+ :attr:`job` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace_async
+ async def get(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> _models.JobResource:
+ """Get a Job and its properties.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: JobResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.JobResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("JobResource", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: Union[_models.JobResource, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(job_resource, (IOBase, bytes)):
+ _content = job_resource
+ else:
+ _json = self._serialize.body(job_resource, "JobResource")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: _models.JobResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.JobResource]:
+ """Create a new Job or update an exiting Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_resource: Parameters for the create or update operation. Required.
+ :type job_resource: ~azure.mgmt.appplatform.models.JobResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either JobResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.JobResource]:
+ """Create a new Job or update an exiting Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_resource: Parameters for the create or update operation. Required.
+ :type job_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either JobResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: Union[_models.JobResource, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.JobResource]:
+ """Create a new Job or update an exiting Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_resource: Parameters for the create or update operation. Is either a JobResource
+ type or a IO[bytes] type. Required.
+ :type job_resource: ~azure.mgmt.appplatform.models.JobResource or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either JobResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_resource=job_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("JobResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.JobResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.JobResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _delete_initial(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_delete_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Operation to delete a Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ async def _start_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[Union[_models.JobExecutionTemplate, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(template, (IOBase, bytes)):
+ _content = template
+ else:
+ if template is not None:
+ _json = self._serialize.body(template, "JobExecutionTemplate")
+ else:
+ _json = None
+
+ _request = build_start_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_start(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[_models.JobExecutionTemplate] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.JobExecution]:
+ """Start an Azure Spring Apps Job.
+
+ Start an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param template: Template used to start a Job execution. Default value is None.
+ :type template: ~azure.mgmt.appplatform.models.JobExecutionTemplate
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either JobExecution or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_start(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.JobExecution]:
+ """Start an Azure Spring Apps Job.
+
+ Start an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param template: Template used to start a Job execution. Default value is None.
+ :type template: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either JobExecution or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_start(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[Union[_models.JobExecutionTemplate, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.JobExecution]:
+ """Start an Azure Spring Apps Job.
+
+ Start an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param template: Template used to start a Job execution. Is either a JobExecutionTemplate type
+ or a IO[bytes] type. Default value is None.
+ :type template: ~azure.mgmt.appplatform.models.JobExecutionTemplate or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either JobExecution or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.JobExecution] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._start_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ template=template,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("JobExecution", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.JobExecution].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.JobExecution](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ @distributed_trace_async
+ async def list_env_secrets(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> _models.EnvSecretsCollection:
+ """List sensitive environment variables of the Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: EnvSecretsCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EnvSecretsCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EnvSecretsCollection] = kwargs.pop("cls", None)
+
+ _request = build_list_env_secrets_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EnvSecretsCollection", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_jobs_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_jobs_operations.py
new file mode 100644
index 000000000000..8281c27f5891
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_jobs_operations.py
@@ -0,0 +1,136 @@
+# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models as _models
+from ...operations._jobs_operations import build_list_request
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class JobsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.aio.AppPlatformManagementClient`'s
+ :attr:`jobs` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs) -> None:
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterable["_models.JobResource"]:
+ """Get the Azure Spring Apps Jobs in a given service.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: An iterator like instance of either JobResource or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobResourceCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("JobResourceCollection", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_monitoring_settings_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_monitoring_settings_operations.py
index 251d55f3137e..5a16d9c1ddd4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_monitoring_settings_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_monitoring_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -38,7 +37,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -77,7 +76,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.MonitoringSettingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -126,7 +125,7 @@ async def _update_put_initial(
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +321,7 @@ async def _update_patch_initial(
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_operations.py
index 4b27b57294a8..dd83056112dd 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -69,7 +68,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationDetail"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AvailableOperations] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_predefined_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_predefined_accelerators_operations.py
index 7e01cdc13851..f05c2b17ade8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_predefined_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_predefined_accelerators_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, Type, TypeVar, Union, cast
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -41,7 +40,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -90,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PredefinedAcceleratorResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -177,7 +176,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.PredefinedAcceleratorResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -229,7 +228,7 @@ async def _disable_initial(
predefined_accelerator_name: str,
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -356,7 +355,7 @@ async def _enable_initial(
predefined_accelerator_name: str,
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_runtime_versions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_runtime_versions_operations.py
index 74087fc64011..55a0bdc4702d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_runtime_versions_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_runtime_versions_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -61,7 +60,7 @@ async def list_runtime_versions(self, **kwargs: Any) -> _models.AvailableRuntime
:rtype: ~azure.mgmt.appplatform.models.AvailableRuntimeVersions
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_service_registries_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_service_registries_operations.py
index 85d95941e4c9..6d2ed57d945d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_service_registries_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_service_registries_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, Type, TypeVar, Union, cast
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -41,7 +40,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -82,7 +81,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.ServiceRegistryResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -128,7 +127,7 @@ async def get(
async def _create_or_update_initial(
self, resource_group_name: str, service_name: str, service_registry_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -243,7 +242,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, service_registry_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -372,7 +371,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ServiceRegistryResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_services_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_services_operations.py
index 9366008f16a2..91bd82ff6a3a 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_services_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_services_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -57,7 +57,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -94,7 +94,7 @@ async def get(self, resource_group_name: str, service_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.appplatform.models.ServiceResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -143,7 +143,7 @@ async def _create_or_update_initial(
resource: Union[_models.ServiceResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -329,7 +329,7 @@ def get_long_running_output(pipeline_response):
)
async def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -436,7 +436,7 @@ async def _update_initial(
resource: Union[_models.ServiceResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -634,7 +634,7 @@ async def list_test_keys(self, resource_group_name: str, service_name: str, **kw
:rtype: ~azure.mgmt.appplatform.models.TestKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -754,7 +754,7 @@ async def regenerate_test_key(
:rtype: ~azure.mgmt.appplatform.models.TestKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -809,9 +809,7 @@ async def regenerate_test_key(
return deserialized # type: ignore
@distributed_trace_async
- async def disable_test_endpoint( # pylint: disable=inconsistent-return-statements
- self, resource_group_name: str, service_name: str, **kwargs: Any
- ) -> None:
+ async def disable_test_endpoint(self, resource_group_name: str, service_name: str, **kwargs: Any) -> None:
"""Disable test endpoint functionality for a Service.
:param resource_group_name: The name of the resource group that contains the resource. You can
@@ -823,7 +821,7 @@ async def disable_test_endpoint( # pylint: disable=inconsistent-return-statemen
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -876,7 +874,7 @@ async def enable_test_endpoint(
:rtype: ~azure.mgmt.appplatform.models.TestKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -919,17 +917,11 @@ async def enable_test_endpoint(
return deserialized # type: ignore
async def _stop_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: cast(
- Type[HttpResponseError],
- lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
- ),
- 409: cast(
- Type[HttpResponseError],
- lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat),
- ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -962,7 +954,7 @@ async def _stop_initial(self, resource_group_name: str, service_name: str, **kwa
await response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
- map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
@@ -1026,17 +1018,11 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
async def _start_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: cast(
- Type[HttpResponseError],
- lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
- ),
- 409: cast(
- Type[HttpResponseError],
- lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat),
- ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -1069,7 +1055,7 @@ async def _start_initial(self, resource_group_name: str, service_name: str, **kw
await response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
- map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
@@ -1135,7 +1121,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _flush_vnet_dns_setting_initial(
self, resource_group_name: str, service_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1264,7 +1250,7 @@ def list_supported_apm_types(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SupportedApmTypes] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1341,7 +1327,7 @@ async def list_globally_enabled_apms(
:rtype: ~azure.mgmt.appplatform.models.GloballyEnabledApms
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1386,7 +1372,7 @@ async def list_globally_enabled_apms(
async def _enable_apm_globally_initial(
self, resource_group_name: str, service_name: str, apm: Union[_models.ApmReference, IO[bytes]], **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1570,7 +1556,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _disable_apm_globally_initial(
self, resource_group_name: str, service_name: str, apm: Union[_models.ApmReference, IO[bytes]], **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1816,7 +1802,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.appplatform.models.NameAvailability
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1883,7 +1869,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ServiceR
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ServiceResourceList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1960,7 +1946,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_model
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ServiceResourceList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2044,7 +2030,7 @@ def list_supported_server_versions(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SupportedServerVersions] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_skus_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_skus_operations.py
index eac0149874ab..c8e418bda33d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_skus_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_skus_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -69,7 +68,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceSku"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ResourceSkuCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_storages_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_storages_operations.py
index 9079988b75d8..6fa179ae5b64 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_storages_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/aio/operations/_storages_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -83,7 +82,7 @@ async def get(
:rtype: ~azure.mgmt.appplatform.models.StorageResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -134,7 +133,7 @@ async def _create_or_update_initial(
storage_resource: Union[_models.StorageResource, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -333,7 +332,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, service_name: str, storage_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -460,7 +459,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.StorageResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/__init__.py
index d524d3aa1d68..191052bf0147 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/__init__.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/__init__.py
@@ -5,302 +5,357 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._models_py3 import AcceleratorAuthSetting
-from ._models_py3 import AcceleratorBasicAuthSetting
-from ._models_py3 import AcceleratorGitRepository
-from ._models_py3 import AcceleratorPublicSetting
-from ._models_py3 import AcceleratorSshSetting
-from ._models_py3 import ActiveDeploymentCollection
-from ._models_py3 import ApiPortalCustomDomainProperties
-from ._models_py3 import ApiPortalCustomDomainResource
-from ._models_py3 import ApiPortalCustomDomainResourceCollection
-from ._models_py3 import ApiPortalInstance
-from ._models_py3 import ApiPortalProperties
-from ._models_py3 import ApiPortalResource
-from ._models_py3 import ApiPortalResourceCollection
-from ._models_py3 import ApiPortalResourceRequests
-from ._models_py3 import ApmProperties
-from ._models_py3 import ApmReference
-from ._models_py3 import ApmResource
-from ._models_py3 import ApmResourceCollection
-from ._models_py3 import ApmSecretKeys
-from ._models_py3 import AppResource
-from ._models_py3 import AppResourceCollection
-from ._models_py3 import AppResourceProperties
-from ._models_py3 import AppVNetAddons
-from ._models_py3 import ApplicationAcceleratorComponent
-from ._models_py3 import ApplicationAcceleratorInstance
-from ._models_py3 import ApplicationAcceleratorProperties
-from ._models_py3 import ApplicationAcceleratorResource
-from ._models_py3 import ApplicationAcceleratorResourceCollection
-from ._models_py3 import ApplicationAcceleratorResourceRequests
-from ._models_py3 import ApplicationInsightsAgentVersions
-from ._models_py3 import ApplicationLiveViewComponent
-from ._models_py3 import ApplicationLiveViewInstance
-from ._models_py3 import ApplicationLiveViewProperties
-from ._models_py3 import ApplicationLiveViewResource
-from ._models_py3 import ApplicationLiveViewResourceCollection
-from ._models_py3 import ApplicationLiveViewResourceRequests
-from ._models_py3 import AvailableOperations
-from ._models_py3 import AvailableRuntimeVersions
-from ._models_py3 import AzureFileVolume
-from ._models_py3 import BindingResource
-from ._models_py3 import BindingResourceCollection
-from ._models_py3 import BindingResourceProperties
-from ._models_py3 import Build
-from ._models_py3 import BuildCollection
-from ._models_py3 import BuildProperties
-from ._models_py3 import BuildResourceRequests
-from ._models_py3 import BuildResult
-from ._models_py3 import BuildResultCollection
-from ._models_py3 import BuildResultLog
-from ._models_py3 import BuildResultProperties
-from ._models_py3 import BuildResultUserSourceInfo
-from ._models_py3 import BuildService
-from ._models_py3 import BuildServiceAgentPoolProperties
-from ._models_py3 import BuildServiceAgentPoolResource
-from ._models_py3 import BuildServiceAgentPoolResourceCollection
-from ._models_py3 import BuildServiceAgentPoolSizeProperties
-from ._models_py3 import BuildServiceCollection
-from ._models_py3 import BuildServiceProperties
-from ._models_py3 import BuildServicePropertiesResourceRequests
-from ._models_py3 import BuildStageProperties
-from ._models_py3 import BuilderProperties
-from ._models_py3 import BuilderResource
-from ._models_py3 import BuilderResourceCollection
-from ._models_py3 import BuildpackBindingLaunchProperties
-from ._models_py3 import BuildpackBindingProperties
-from ._models_py3 import BuildpackBindingResource
-from ._models_py3 import BuildpackBindingResourceCollection
-from ._models_py3 import BuildpackProperties
-from ._models_py3 import BuildpacksGroupProperties
-from ._models_py3 import CertificateProperties
-from ._models_py3 import CertificateReference
-from ._models_py3 import CertificateResource
-from ._models_py3 import CertificateResourceCollection
-from ._models_py3 import CloudErrorBody
-from ._models_py3 import ClusterResourceProperties
-from ._models_py3 import ConfigServerGitProperty
-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 ConfigurationServiceGitProperty
-from ._models_py3 import ConfigurationServiceGitPropertyValidateResult
-from ._models_py3 import ConfigurationServiceGitRepository
-from ._models_py3 import ConfigurationServiceInstance
-from ._models_py3 import ConfigurationServiceProperties
-from ._models_py3 import ConfigurationServiceResource
-from ._models_py3 import ConfigurationServiceResourceCollection
-from ._models_py3 import ConfigurationServiceResourceRequests
-from ._models_py3 import ConfigurationServiceSettings
-from ._models_py3 import ConfigurationServiceSettingsValidateResult
-from ._models_py3 import ContainerProbeSettings
-from ._models_py3 import ContainerRegistryBasicCredentials
-from ._models_py3 import ContainerRegistryCredentials
-from ._models_py3 import ContainerRegistryProperties
-from ._models_py3 import ContainerRegistryResource
-from ._models_py3 import ContainerRegistryResourceCollection
-from ._models_py3 import ContainerRegistryValidateResult
-from ._models_py3 import ContentCertificateProperties
-from ._models_py3 import CustomContainer
-from ._models_py3 import CustomContainerUserSourceInfo
-from ._models_py3 import CustomDomainProperties
-from ._models_py3 import CustomDomainResource
-from ._models_py3 import CustomDomainResourceCollection
-from ._models_py3 import CustomDomainValidatePayload
-from ._models_py3 import CustomDomainValidateResult
-from ._models_py3 import CustomPersistentDiskProperties
-from ._models_py3 import CustomPersistentDiskResource
-from ._models_py3 import CustomizedAcceleratorProperties
-from ._models_py3 import CustomizedAcceleratorResource
-from ._models_py3 import CustomizedAcceleratorResourceCollection
-from ._models_py3 import CustomizedAcceleratorValidateResult
-from ._models_py3 import DeploymentInstance
-from ._models_py3 import DeploymentList
-from ._models_py3 import DeploymentResource
-from ._models_py3 import DeploymentResourceCollection
-from ._models_py3 import DeploymentResourceProperties
-from ._models_py3 import DeploymentSettings
-from ._models_py3 import DevToolPortalComponent
-from ._models_py3 import DevToolPortalFeatureDetail
-from ._models_py3 import DevToolPortalFeatureSettings
-from ._models_py3 import DevToolPortalInstance
-from ._models_py3 import DevToolPortalProperties
-from ._models_py3 import DevToolPortalResource
-from ._models_py3 import DevToolPortalResourceCollection
-from ._models_py3 import DevToolPortalResourceRequests
-from ._models_py3 import DevToolPortalSsoProperties
-from ._models_py3 import DiagnosticParameters
-from ._models_py3 import Error
-from ._models_py3 import ExecAction
-from ._models_py3 import GatewayApiMetadataProperties
-from ._models_py3 import GatewayApiRoute
-from ._models_py3 import GatewayCorsProperties
-from ._models_py3 import GatewayCustomDomainProperties
-from ._models_py3 import GatewayCustomDomainResource
-from ._models_py3 import GatewayCustomDomainResourceCollection
-from ._models_py3 import GatewayInstance
-from ._models_py3 import GatewayOperatorProperties
-from ._models_py3 import GatewayOperatorResourceRequests
-from ._models_py3 import GatewayProperties
-from ._models_py3 import GatewayPropertiesClientAuth
-from ._models_py3 import GatewayPropertiesEnvironmentVariables
-from ._models_py3 import GatewayResource
-from ._models_py3 import GatewayResourceCollection
-from ._models_py3 import GatewayResourceRequests
-from ._models_py3 import GatewayRouteConfigOpenApiProperties
-from ._models_py3 import GatewayRouteConfigProperties
-from ._models_py3 import GatewayRouteConfigResource
-from ._models_py3 import GatewayRouteConfigResourceCollection
-from ._models_py3 import GitPatternRepository
-from ._models_py3 import GloballyEnabledApms
-from ._models_py3 import HTTPGetAction
-from ._models_py3 import ImageRegistryCredential
-from ._models_py3 import IngressConfig
-from ._models_py3 import IngressSettings
-from ._models_py3 import IngressSettingsClientAuth
-from ._models_py3 import JarUploadedUserSourceInfo
-from ._models_py3 import KeyVaultCertificateProperties
-from ._models_py3 import LoadedCertificate
-from ._models_py3 import LogFileUrlResponse
-from ._models_py3 import LogSpecification
-from ._models_py3 import ManagedIdentityProperties
-from ._models_py3 import MarketplaceResource
-from ._models_py3 import MetricDimension
-from ._models_py3 import MetricSpecification
-from ._models_py3 import MonitoringSettingProperties
-from ._models_py3 import MonitoringSettingResource
-from ._models_py3 import NameAvailability
-from ._models_py3 import NameAvailabilityParameters
-from ._models_py3 import NetCoreZipUploadedUserSourceInfo
-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
-from ._models_py3 import PersistentDisk
-from ._models_py3 import PredefinedAcceleratorProperties
-from ._models_py3 import PredefinedAcceleratorResource
-from ._models_py3 import PredefinedAcceleratorResourceCollection
-from ._models_py3 import Probe
-from ._models_py3 import ProbeAction
-from ._models_py3 import ProxyResource
-from ._models_py3 import RegenerateTestKeyRequestPayload
-from ._models_py3 import RemoteDebugging
-from ._models_py3 import RemoteDebuggingPayload
-from ._models_py3 import RequiredTraffic
-from ._models_py3 import Resource
-from ._models_py3 import ResourceRequests
-from ._models_py3 import ResourceSku
-from ._models_py3 import ResourceSkuCapabilities
-from ._models_py3 import ResourceSkuCollection
-from ._models_py3 import ResourceSkuLocationInfo
-from ._models_py3 import ResourceSkuRestrictionInfo
-from ._models_py3 import ResourceSkuRestrictions
-from ._models_py3 import ResourceSkuZoneDetails
-from ._models_py3 import ResourceUploadDefinition
-from ._models_py3 import ServiceRegistryInstance
-from ._models_py3 import ServiceRegistryProperties
-from ._models_py3 import ServiceRegistryResource
-from ._models_py3 import ServiceRegistryResourceCollection
-from ._models_py3 import ServiceRegistryResourceRequests
-from ._models_py3 import ServiceResource
-from ._models_py3 import ServiceResourceList
-from ._models_py3 import ServiceSpecification
-from ._models_py3 import ServiceVNetAddons
-from ._models_py3 import Sku
-from ._models_py3 import SkuCapacity
-from ._models_py3 import SkuObject
-from ._models_py3 import SourceUploadedUserSourceInfo
-from ._models_py3 import SsoProperties
-from ._models_py3 import StackProperties
-from ._models_py3 import StorageAccount
-from ._models_py3 import StorageProperties
-from ._models_py3 import StorageResource
-from ._models_py3 import StorageResourceCollection
-from ._models_py3 import SupportedApmType
-from ._models_py3 import SupportedApmTypes
-from ._models_py3 import SupportedBuildpackResource
-from ._models_py3 import SupportedBuildpackResourceProperties
-from ._models_py3 import SupportedBuildpacksCollection
-from ._models_py3 import SupportedRuntimeVersion
-from ._models_py3 import SupportedServerVersion
-from ._models_py3 import SupportedServerVersions
-from ._models_py3 import SupportedStackResource
-from ._models_py3 import SupportedStackResourceProperties
-from ._models_py3 import SupportedStacksCollection
-from ._models_py3 import SystemData
-from ._models_py3 import TCPSocketAction
-from ._models_py3 import TemporaryDisk
-from ._models_py3 import TestKeys
-from ._models_py3 import TrackedResource
-from ._models_py3 import TriggeredBuildResult
-from ._models_py3 import UploadedUserSourceInfo
-from ._models_py3 import UserAssignedManagedIdentity
-from ._models_py3 import UserSourceInfo
-from ._models_py3 import ValidationMessages
-from ._models_py3 import WarUploadedUserSourceInfo
+from typing import TYPE_CHECKING
-from ._app_platform_management_client_enums import ActionType
-from ._app_platform_management_client_enums import ApiPortalApiTryOutEnabledState
-from ._app_platform_management_client_enums import ApiPortalProvisioningState
-from ._app_platform_management_client_enums import ApmProvisioningState
-from ._app_platform_management_client_enums import AppResourceProvisioningState
-from ._app_platform_management_client_enums import ApplicationAcceleratorProvisioningState
-from ._app_platform_management_client_enums import ApplicationLiveViewProvisioningState
-from ._app_platform_management_client_enums import BackendProtocol
-from ._app_platform_management_client_enums import BindingType
-from ._app_platform_management_client_enums import BuildProvisioningState
-from ._app_platform_management_client_enums import BuildResultProvisioningState
-from ._app_platform_management_client_enums import BuildServiceProvisioningState
-from ._app_platform_management_client_enums import BuilderProvisioningState
-from ._app_platform_management_client_enums import BuildpackBindingProvisioningState
-from ._app_platform_management_client_enums import CertificateResourceProvisioningState
-from ._app_platform_management_client_enums import ConfigServerState
-from ._app_platform_management_client_enums import ConfigurationServiceGeneration
-from ._app_platform_management_client_enums import ConfigurationServiceProvisioningState
-from ._app_platform_management_client_enums import ContainerRegistryProvisioningState
-from ._app_platform_management_client_enums import CreatedByType
-from ._app_platform_management_client_enums import CustomDomainResourceProvisioningState
-from ._app_platform_management_client_enums import CustomizedAcceleratorProvisioningState
-from ._app_platform_management_client_enums import CustomizedAcceleratorType
-from ._app_platform_management_client_enums import CustomizedAcceleratorValidateResultState
-from ._app_platform_management_client_enums import DeploymentResourceProvisioningState
-from ._app_platform_management_client_enums import DeploymentResourceStatus
-from ._app_platform_management_client_enums import DevToolPortalFeatureState
-from ._app_platform_management_client_enums import DevToolPortalProvisioningState
-from ._app_platform_management_client_enums import GatewayCertificateVerification
-from ._app_platform_management_client_enums import GatewayProvisioningState
-from ._app_platform_management_client_enums import GatewayRouteConfigProtocol
-from ._app_platform_management_client_enums import GitImplementation
-from ._app_platform_management_client_enums import HTTPSchemeType
-from ._app_platform_management_client_enums import KPackBuildStageProvisioningState
-from ._app_platform_management_client_enums import KeyVaultCertificateAutoSync
-from ._app_platform_management_client_enums import LastModifiedByType
-from ._app_platform_management_client_enums import ManagedIdentityType
-from ._app_platform_management_client_enums import MonitoringSettingState
-from ._app_platform_management_client_enums import PowerState
-from ._app_platform_management_client_enums import PredefinedAcceleratorProvisioningState
-from ._app_platform_management_client_enums import PredefinedAcceleratorState
-from ._app_platform_management_client_enums import ProbeActionType
-from ._app_platform_management_client_enums import ProvisioningState
-from ._app_platform_management_client_enums import ResourceSkuRestrictionsReasonCode
-from ._app_platform_management_client_enums import ResourceSkuRestrictionsType
-from ._app_platform_management_client_enums import ServiceRegistryProvisioningState
-from ._app_platform_management_client_enums import SessionAffinity
-from ._app_platform_management_client_enums import SkuScaleType
-from ._app_platform_management_client_enums import StorageType
-from ._app_platform_management_client_enums import SupportedRuntimePlatform
-from ._app_platform_management_client_enums import SupportedRuntimeValue
-from ._app_platform_management_client_enums import TestKeyType
-from ._app_platform_management_client_enums import TrafficDirection
-from ._app_platform_management_client_enums import TriggeredBuildResultProvisioningState
-from ._app_platform_management_client_enums import Type
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+
+from ._models_py3 import ( # type: ignore
+ AcceleratorAuthSetting,
+ AcceleratorBasicAuthSetting,
+ AcceleratorGitRepository,
+ AcceleratorPublicSetting,
+ AcceleratorSshSetting,
+ ActiveDeploymentCollection,
+ ApiPortalCustomDomainProperties,
+ ApiPortalCustomDomainResource,
+ ApiPortalCustomDomainResourceCollection,
+ ApiPortalInstance,
+ ApiPortalProperties,
+ ApiPortalResource,
+ ApiPortalResourceCollection,
+ ApiPortalResourceRequests,
+ ApmProperties,
+ ApmReference,
+ ApmResource,
+ ApmResourceCollection,
+ ApmSecretKeys,
+ AppResource,
+ AppResourceCollection,
+ AppResourceProperties,
+ AppVNetAddons,
+ ApplicationAcceleratorComponent,
+ ApplicationAcceleratorInstance,
+ ApplicationAcceleratorProperties,
+ ApplicationAcceleratorResource,
+ ApplicationAcceleratorResourceCollection,
+ ApplicationAcceleratorResourceRequests,
+ ApplicationInsightsAgentVersions,
+ ApplicationLiveViewComponent,
+ ApplicationLiveViewInstance,
+ ApplicationLiveViewProperties,
+ ApplicationLiveViewResource,
+ ApplicationLiveViewResourceCollection,
+ ApplicationLiveViewResourceRequests,
+ AvailableOperations,
+ AvailableRuntimeVersions,
+ AzureFileVolume,
+ BindingResource,
+ BindingResourceCollection,
+ BindingResourceProperties,
+ Build,
+ BuildCollection,
+ BuildProperties,
+ BuildResourceRequests,
+ BuildResult,
+ BuildResultCollection,
+ BuildResultLog,
+ BuildResultProperties,
+ BuildResultUserSourceInfo,
+ BuildService,
+ BuildServiceAgentPoolProperties,
+ BuildServiceAgentPoolResource,
+ BuildServiceAgentPoolResourceCollection,
+ BuildServiceAgentPoolSizeProperties,
+ BuildServiceCollection,
+ BuildServiceProperties,
+ BuildServicePropertiesResourceRequests,
+ BuildStageProperties,
+ BuilderProperties,
+ BuilderResource,
+ BuilderResourceCollection,
+ BuildpackBindingLaunchProperties,
+ BuildpackBindingProperties,
+ BuildpackBindingResource,
+ BuildpackBindingResourceCollection,
+ BuildpackProperties,
+ BuildpacksGroupProperties,
+ CertificateProperties,
+ CertificateReference,
+ CertificateResource,
+ CertificateResourceCollection,
+ CloudErrorBody,
+ ClusterResourceProperties,
+ ConfigServerGitProperty,
+ ConfigServerInstance,
+ ConfigServerProperties,
+ ConfigServerResource,
+ ConfigServerResourceCollection,
+ ConfigServerResourceRequests,
+ ConfigServerSettings,
+ ConfigServerSettingsErrorRecord,
+ ConfigServerSettingsValidateResult,
+ ConfigurationServiceGitProperty,
+ ConfigurationServiceGitPropertyValidateResult,
+ ConfigurationServiceGitRepository,
+ ConfigurationServiceInstance,
+ ConfigurationServiceProperties,
+ ConfigurationServiceResource,
+ ConfigurationServiceResourceCollection,
+ ConfigurationServiceResourceRequests,
+ ConfigurationServiceSettings,
+ ConfigurationServiceSettingsValidateResult,
+ ContainerProbeSettings,
+ ContainerRegistryBasicCredentials,
+ ContainerRegistryCredentials,
+ ContainerRegistryProperties,
+ ContainerRegistryResource,
+ ContainerRegistryResourceCollection,
+ ContainerRegistryValidateResult,
+ ContentCertificateProperties,
+ CustomContainer,
+ CustomContainerUserSourceInfo,
+ CustomDomainProperties,
+ CustomDomainResource,
+ CustomDomainResourceCollection,
+ CustomDomainValidatePayload,
+ CustomDomainValidateResult,
+ CustomPersistentDiskProperties,
+ CustomPersistentDiskResource,
+ CustomScaleRule,
+ CustomizedAcceleratorProperties,
+ CustomizedAcceleratorResource,
+ CustomizedAcceleratorResourceCollection,
+ CustomizedAcceleratorValidateResult,
+ DeploymentInstance,
+ DeploymentList,
+ DeploymentResource,
+ DeploymentResourceCollection,
+ DeploymentResourceProperties,
+ DeploymentSettings,
+ DevToolPortalComponent,
+ DevToolPortalFeatureDetail,
+ DevToolPortalFeatureSettings,
+ DevToolPortalInstance,
+ DevToolPortalProperties,
+ DevToolPortalResource,
+ DevToolPortalResourceCollection,
+ DevToolPortalResourceRequests,
+ DevToolPortalSsoProperties,
+ DiagnosticParameters,
+ EnvSecretsCollection,
+ EnvVar,
+ Error,
+ EurekaServerProperties,
+ EurekaServerResource,
+ EurekaServerResourceCollection,
+ ExecAction,
+ GatewayApiMetadataProperties,
+ GatewayApiRoute,
+ GatewayCorsProperties,
+ GatewayCustomDomainProperties,
+ GatewayCustomDomainResource,
+ GatewayCustomDomainResourceCollection,
+ GatewayInstance,
+ GatewayLocalResponseCachePerInstanceProperties,
+ GatewayLocalResponseCachePerRouteProperties,
+ GatewayOperatorProperties,
+ GatewayOperatorResourceRequests,
+ GatewayProperties,
+ GatewayPropertiesClientAuth,
+ GatewayPropertiesEnvironmentVariables,
+ GatewayResource,
+ GatewayResourceCollection,
+ GatewayResourceRequests,
+ GatewayResponseCacheProperties,
+ GatewayRouteConfigOpenApiProperties,
+ GatewayRouteConfigProperties,
+ GatewayRouteConfigResource,
+ GatewayRouteConfigResourceCollection,
+ GitPatternRepository,
+ GloballyEnabledApms,
+ HTTPGetAction,
+ HttpScaleRule,
+ ImageRegistryCredential,
+ IngressConfig,
+ IngressSettings,
+ IngressSettingsClientAuth,
+ JarUploadedUserSourceInfo,
+ JobExecution,
+ JobExecutionCollection,
+ JobExecutionTemplate,
+ JobResource,
+ JobResourceCollection,
+ JobResourceProperties,
+ JobResourceRequests,
+ JobTriggerConfig,
+ KeyVaultCertificateProperties,
+ LoadedCertificate,
+ LogFileUrlResponse,
+ LogSpecification,
+ MaintenanceScheduleConfiguration,
+ ManagedComponentReference,
+ ManagedIdentityProperties,
+ ManualJobTriggerConfig,
+ MarketplaceResource,
+ MetricDimension,
+ MetricSpecification,
+ MonitoringSettingProperties,
+ MonitoringSettingResource,
+ NameAvailability,
+ NameAvailabilityParameters,
+ NetCoreZipUploadedUserSourceInfo,
+ NetworkProfile,
+ NetworkProfileOutboundIPs,
+ OperationDetail,
+ OperationDisplay,
+ OperationProperties,
+ PersistentDisk,
+ PredefinedAcceleratorProperties,
+ PredefinedAcceleratorResource,
+ PredefinedAcceleratorResourceCollection,
+ Probe,
+ ProbeAction,
+ ProxyResource,
+ QueueScaleRule,
+ RegenerateTestKeyRequestPayload,
+ RemoteDebugging,
+ RemoteDebuggingPayload,
+ RequiredTraffic,
+ Resource,
+ ResourceRequests,
+ ResourceSku,
+ ResourceSkuCapabilities,
+ ResourceSkuCollection,
+ ResourceSkuLocationInfo,
+ ResourceSkuRestrictionInfo,
+ ResourceSkuRestrictions,
+ ResourceSkuZoneDetails,
+ ResourceUploadDefinition,
+ Scale,
+ ScaleRule,
+ ScaleRuleAuth,
+ Secret,
+ ServiceRegistryInstance,
+ ServiceRegistryProperties,
+ ServiceRegistryResource,
+ ServiceRegistryResourceCollection,
+ ServiceRegistryResourceRequests,
+ ServiceResource,
+ ServiceResourceList,
+ ServiceSpecification,
+ ServiceVNetAddons,
+ Sku,
+ SkuCapacity,
+ SkuObject,
+ SourceUploadedUserSourceInfo,
+ SsoProperties,
+ StackProperties,
+ StorageAccount,
+ StorageProperties,
+ StorageResource,
+ StorageResourceCollection,
+ SupportedApmType,
+ SupportedApmTypes,
+ SupportedBuildpackResource,
+ SupportedBuildpackResourceProperties,
+ SupportedBuildpacksCollection,
+ SupportedRuntimeVersion,
+ SupportedServerVersion,
+ SupportedServerVersions,
+ SupportedStackResource,
+ SupportedStackResourceProperties,
+ SupportedStacksCollection,
+ SystemAssignedServiceIdentity,
+ SystemData,
+ TCPSocketAction,
+ TcpScaleRule,
+ TemporaryDisk,
+ TestKeys,
+ TrackedResource,
+ TriggeredBuildResult,
+ UploadedUserSourceInfo,
+ UserAssignedManagedIdentity,
+ UserSourceInfo,
+ ValidationMessages,
+ WarUploadedUserSourceInfo,
+ WeeklyMaintenanceScheduleConfiguration,
+)
+
+from ._app_platform_management_client_enums import ( # type: ignore
+ ActionType,
+ ApiPortalApiTryOutEnabledState,
+ ApiPortalProvisioningState,
+ ApmProvisioningState,
+ ApmType,
+ AppResourceProvisioningState,
+ ApplicationAcceleratorProvisioningState,
+ ApplicationLiveViewProvisioningState,
+ BackendProtocol,
+ BindingType,
+ BuildProvisioningState,
+ BuildResultProvisioningState,
+ BuildServiceProvisioningState,
+ BuilderProvisioningState,
+ BuildpackBindingProvisioningState,
+ CertificateResourceProvisioningState,
+ ConfigServerEnabledState,
+ ConfigServerState,
+ ConfigurationServiceGeneration,
+ ConfigurationServiceProvisioningState,
+ ContainerRegistryProvisioningState,
+ CreatedByType,
+ CustomDomainResourceProvisioningState,
+ CustomizedAcceleratorProvisioningState,
+ CustomizedAcceleratorType,
+ CustomizedAcceleratorValidateResultState,
+ DeploymentResourceProvisioningState,
+ DeploymentResourceStatus,
+ DevToolPortalFeatureState,
+ DevToolPortalProvisioningState,
+ EurekaServerEnabledState,
+ EurekaServerState,
+ Frequency,
+ GatewayCertificateVerification,
+ GatewayProvisioningState,
+ GatewayRouteConfigProtocol,
+ GitImplementation,
+ HTTPSchemeType,
+ JobExecutionRunningState,
+ JobResourceProvisioningState,
+ KPackBuildStageProvisioningState,
+ KeyVaultCertificateAutoSync,
+ LastModifiedByType,
+ ManagedIdentityType,
+ MonitoringSettingState,
+ PowerState,
+ PredefinedAcceleratorProvisioningState,
+ PredefinedAcceleratorState,
+ PrivateStorageAccess,
+ ProbeActionType,
+ ProvisioningState,
+ ResourceSkuRestrictionsReasonCode,
+ ResourceSkuRestrictionsType,
+ ServiceRegistryProvisioningState,
+ SessionAffinity,
+ SkuScaleType,
+ StorageType,
+ SupportedRuntimePlatform,
+ SupportedRuntimeValue,
+ SystemAssignedServiceIdentityType,
+ TestEndpointAuthState,
+ TestKeyType,
+ TrafficDirection,
+ TriggerType,
+ TriggeredBuildResultProvisioningState,
+ Type,
+ WeekDay,
+)
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
@@ -380,8 +435,11 @@
"CloudErrorBody",
"ClusterResourceProperties",
"ConfigServerGitProperty",
+ "ConfigServerInstance",
"ConfigServerProperties",
"ConfigServerResource",
+ "ConfigServerResourceCollection",
+ "ConfigServerResourceRequests",
"ConfigServerSettings",
"ConfigServerSettingsErrorRecord",
"ConfigServerSettingsValidateResult",
@@ -412,6 +470,7 @@
"CustomDomainValidateResult",
"CustomPersistentDiskProperties",
"CustomPersistentDiskResource",
+ "CustomScaleRule",
"CustomizedAcceleratorProperties",
"CustomizedAcceleratorResource",
"CustomizedAcceleratorResourceCollection",
@@ -432,7 +491,12 @@
"DevToolPortalResourceRequests",
"DevToolPortalSsoProperties",
"DiagnosticParameters",
+ "EnvSecretsCollection",
+ "EnvVar",
"Error",
+ "EurekaServerProperties",
+ "EurekaServerResource",
+ "EurekaServerResourceCollection",
"ExecAction",
"GatewayApiMetadataProperties",
"GatewayApiRoute",
@@ -441,6 +505,8 @@
"GatewayCustomDomainResource",
"GatewayCustomDomainResourceCollection",
"GatewayInstance",
+ "GatewayLocalResponseCachePerInstanceProperties",
+ "GatewayLocalResponseCachePerRouteProperties",
"GatewayOperatorProperties",
"GatewayOperatorResourceRequests",
"GatewayProperties",
@@ -449,6 +515,7 @@
"GatewayResource",
"GatewayResourceCollection",
"GatewayResourceRequests",
+ "GatewayResponseCacheProperties",
"GatewayRouteConfigOpenApiProperties",
"GatewayRouteConfigProperties",
"GatewayRouteConfigResource",
@@ -456,16 +523,28 @@
"GitPatternRepository",
"GloballyEnabledApms",
"HTTPGetAction",
+ "HttpScaleRule",
"ImageRegistryCredential",
"IngressConfig",
"IngressSettings",
"IngressSettingsClientAuth",
"JarUploadedUserSourceInfo",
+ "JobExecution",
+ "JobExecutionCollection",
+ "JobExecutionTemplate",
+ "JobResource",
+ "JobResourceCollection",
+ "JobResourceProperties",
+ "JobResourceRequests",
+ "JobTriggerConfig",
"KeyVaultCertificateProperties",
"LoadedCertificate",
"LogFileUrlResponse",
"LogSpecification",
+ "MaintenanceScheduleConfiguration",
+ "ManagedComponentReference",
"ManagedIdentityProperties",
+ "ManualJobTriggerConfig",
"MarketplaceResource",
"MetricDimension",
"MetricSpecification",
@@ -486,6 +565,7 @@
"Probe",
"ProbeAction",
"ProxyResource",
+ "QueueScaleRule",
"RegenerateTestKeyRequestPayload",
"RemoteDebugging",
"RemoteDebuggingPayload",
@@ -500,6 +580,10 @@
"ResourceSkuRestrictions",
"ResourceSkuZoneDetails",
"ResourceUploadDefinition",
+ "Scale",
+ "ScaleRule",
+ "ScaleRuleAuth",
+ "Secret",
"ServiceRegistryInstance",
"ServiceRegistryProperties",
"ServiceRegistryResource",
@@ -530,8 +614,10 @@
"SupportedStackResource",
"SupportedStackResourceProperties",
"SupportedStacksCollection",
+ "SystemAssignedServiceIdentity",
"SystemData",
"TCPSocketAction",
+ "TcpScaleRule",
"TemporaryDisk",
"TestKeys",
"TrackedResource",
@@ -541,10 +627,12 @@
"UserSourceInfo",
"ValidationMessages",
"WarUploadedUserSourceInfo",
+ "WeeklyMaintenanceScheduleConfiguration",
"ActionType",
"ApiPortalApiTryOutEnabledState",
"ApiPortalProvisioningState",
"ApmProvisioningState",
+ "ApmType",
"AppResourceProvisioningState",
"ApplicationAcceleratorProvisioningState",
"ApplicationLiveViewProvisioningState",
@@ -556,6 +644,7 @@
"BuilderProvisioningState",
"BuildpackBindingProvisioningState",
"CertificateResourceProvisioningState",
+ "ConfigServerEnabledState",
"ConfigServerState",
"ConfigurationServiceGeneration",
"ConfigurationServiceProvisioningState",
@@ -569,11 +658,16 @@
"DeploymentResourceStatus",
"DevToolPortalFeatureState",
"DevToolPortalProvisioningState",
+ "EurekaServerEnabledState",
+ "EurekaServerState",
+ "Frequency",
"GatewayCertificateVerification",
"GatewayProvisioningState",
"GatewayRouteConfigProtocol",
"GitImplementation",
"HTTPSchemeType",
+ "JobExecutionRunningState",
+ "JobResourceProvisioningState",
"KPackBuildStageProvisioningState",
"KeyVaultCertificateAutoSync",
"LastModifiedByType",
@@ -582,6 +676,7 @@
"PowerState",
"PredefinedAcceleratorProvisioningState",
"PredefinedAcceleratorState",
+ "PrivateStorageAccess",
"ProbeActionType",
"ProvisioningState",
"ResourceSkuRestrictionsReasonCode",
@@ -592,10 +687,14 @@
"StorageType",
"SupportedRuntimePlatform",
"SupportedRuntimeValue",
+ "SystemAssignedServiceIdentityType",
+ "TestEndpointAuthState",
"TestKeyType",
"TrafficDirection",
+ "TriggerType",
"TriggeredBuildResultProvisioningState",
"Type",
+ "WeekDay",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_app_platform_management_client_enums.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_app_platform_management_client_enums.py
index d313358c1657..0798f5d85f16 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_app_platform_management_client_enums.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_app_platform_management_client_enums.py
@@ -47,6 +47,16 @@ class ApmProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
CANCELED = "Canceled"
+class ApmType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Type of application performance monitoring."""
+
+ APPLICATION_INSIGHTS = "ApplicationInsights"
+ APP_DYNAMICS = "AppDynamics"
+ DYNATRACE = "Dynatrace"
+ NEW_RELIC = "NewRelic"
+ ELASTIC_APM = "ElasticAPM"
+
+
class ApplicationAcceleratorProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""State of the application accelerator."""
@@ -95,6 +105,7 @@ class BindingType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DYNATRACE = "Dynatrace"
NEW_RELIC = "NewRelic"
ELASTIC_APM = "ElasticAPM"
+ CA_CERTIFICATES = "CACertificates"
class BuilderProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -157,14 +168,25 @@ class CertificateResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveE
DELETING = "Deleting"
+class ConfigServerEnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Enabled state of the config server. This is only used in Consumption tier."""
+
+ ENABLED = "Enabled"
+ """Enable the config server."""
+ DISABLED = "Disabled"
+ """Disable the config server."""
+
+
class ConfigServerState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""State of the config server."""
NOT_AVAILABLE = "NotAvailable"
+ CREATING = "Creating"
DELETED = "Deleted"
FAILED = "Failed"
SUCCEEDED = "Succeeded"
UPDATING = "Updating"
+ DELETING = "Deleting"
class ConfigurationServiceGeneration(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -277,6 +299,30 @@ class DevToolPortalProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMet
CANCELED = "Canceled"
+class EurekaServerEnabledState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Enabled state of the eureka server. This is only used in Consumption tier."""
+
+ ENABLED = "Enabled"
+ """Enable the eureka server."""
+ DISABLED = "Disabled"
+ """Disable the eureka server."""
+
+
+class EurekaServerState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """State of the eureka server."""
+
+ FAILED = "Failed"
+ SUCCEEDED = "Succeeded"
+ UPDATING = "Updating"
+ CANCELED = "Canceled"
+
+
+class Frequency(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The frequency to run the maintenance job."""
+
+ WEEKLY = "Weekly"
+
+
class GatewayCertificateVerification(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Whether to enable certificate verification or not."""
@@ -324,6 +370,27 @@ class HTTPSchemeType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
HTTPS = "HTTPS"
+class JobExecutionRunningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Current state of the job execution."""
+
+ RUNNING = "Running"
+ PENDING = "Pending"
+ CANCELED = "Canceled"
+ FAILED = "Failed"
+ COMPLETED = "Completed"
+
+
+class JobResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Provisioning state of the Job."""
+
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CREATING = "Creating"
+ UPDATING = "Updating"
+ DELETING = "Deleting"
+ CANCELED = "Canceled"
+
+
class KeyVaultCertificateAutoSync(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Indicates whether to automatically synchronize certificate from key vault or not."""
@@ -393,6 +460,15 @@ class PredefinedAcceleratorState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Disable the predefined accelerator."""
+class PrivateStorageAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Indicates whether the vnet injection service enables private links for backend storage account
+ and container registry.
+ """
+
+ ENABLED = "Enabled"
+ DISABLED = "Disabled"
+
+
class ProbeActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The type of the action to take to perform the health check."""
@@ -477,9 +553,26 @@ class SupportedRuntimeValue(str, Enum, metaclass=CaseInsensitiveEnumMeta):
JAVA8 = "Java_8"
JAVA11 = "Java_11"
JAVA17 = "Java_17"
+ JAVA21 = "Java_21"
NET_CORE31 = "NetCore_31"
+class SystemAssignedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Type of managed service identity (either system assigned, or none)."""
+
+ NONE = "None"
+ SYSTEM_ASSIGNED = "SystemAssigned"
+
+
+class TestEndpointAuthState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """State of test endpoint auth."""
+
+ ENABLED = "Enabled"
+ """Enable test endpoint auth."""
+ DISABLED = "Disabled"
+ """Disable test endpoint auth"""
+
+
class TestKeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of the test key."""
@@ -505,7 +598,25 @@ class TriggeredBuildResultProvisioningState(str, Enum, metaclass=CaseInsensitive
CANCELED = "Canceled"
+class TriggerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Type of job trigger."""
+
+ MANUAL = "Manual"
+
+
class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The type of the underlying resource to mount as a persistent disk."""
AZURE_FILE_VOLUME = "AzureFileVolume"
+
+
+class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The day to run the maintenance job."""
+
+ MONDAY = "Monday"
+ TUESDAY = "Tuesday"
+ WEDNESDAY = "Wednesday"
+ THURSDAY = "Thursday"
+ FRIDAY = "Friday"
+ SATURDAY = "Saturday"
+ SUNDAY = "Sunday"
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_models_py3.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_models_py3.py
index 497b1d54a1a6..afe035f92738 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_models_py3.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/models/_models_py3.py
@@ -1,5 +1,5 @@
-# coding=utf-8
# pylint: disable=too-many-lines
+# 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.
@@ -16,10 +16,9 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from .. import models as _models
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
@@ -645,7 +644,7 @@ class ApiPortalResourceRequests(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar cpu: Cpu allocated to each API portal instance.
+ :ivar cpu: CPU allocated to each API portal instance.
:vartype cpu: str
:ivar memory: Memory allocated to each API portal instance.
:vartype memory: str
@@ -1029,7 +1028,7 @@ class ApplicationAcceleratorResourceRequests(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar cpu: Cpu allocated to each application accelerator component. 1 core can be represented
+ :ivar cpu: CPU allocated to each application accelerator component. 1 core can be represented
by 1 or 1000m.
:vartype cpu: str
:ivar memory: Memory allocated to each application accelerator component. 1 GB can be
@@ -1376,7 +1375,7 @@ def __init__(
self.next_link = next_link
-class AppResourceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class AppResourceProperties(_serialization.Model):
"""App resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -1409,6 +1408,14 @@ class AppResourceProperties(_serialization.Model): # pylint: disable=too-many-i
:vartype vnet_addons: ~azure.mgmt.appplatform.models.AppVNetAddons
:ivar ingress_settings: App ingress settings payload.
:vartype ingress_settings: ~azure.mgmt.appplatform.models.IngressSettings
+ :ivar secrets: Collection of auth secrets.
+ :vartype secrets: list[~azure.mgmt.appplatform.models.Secret]
+ :ivar workload_profile_name: The workload profile used for this app. Supported for Consumption
+ + Dedicated plan.
+ :vartype workload_profile_name: str
+ :ivar test_endpoint_auth_state: State of test endpoint auth. Known values are: "Enabled" and
+ "Disabled".
+ :vartype test_endpoint_auth_state: str or ~azure.mgmt.appplatform.models.TestEndpointAuthState
"""
_validation = {
@@ -1431,6 +1438,9 @@ class AppResourceProperties(_serialization.Model): # pylint: disable=too-many-i
"loaded_certificates": {"key": "loadedCertificates", "type": "[LoadedCertificate]"},
"vnet_addons": {"key": "vnetAddons", "type": "AppVNetAddons"},
"ingress_settings": {"key": "ingressSettings", "type": "IngressSettings"},
+ "secrets": {"key": "secrets", "type": "[Secret]"},
+ "workload_profile_name": {"key": "workloadProfileName", "type": "str"},
+ "test_endpoint_auth_state": {"key": "testEndpointAuthState", "type": "str"},
}
def __init__(
@@ -1446,6 +1456,9 @@ def __init__(
loaded_certificates: Optional[List["_models.LoadedCertificate"]] = None,
vnet_addons: Optional["_models.AppVNetAddons"] = None,
ingress_settings: Optional["_models.IngressSettings"] = None,
+ secrets: Optional[List["_models.Secret"]] = None,
+ workload_profile_name: Optional[str] = None,
+ test_endpoint_auth_state: Union[str, "_models.TestEndpointAuthState"] = "Enabled",
**kwargs: Any
) -> None:
"""
@@ -1470,6 +1483,15 @@ def __init__(
:paramtype vnet_addons: ~azure.mgmt.appplatform.models.AppVNetAddons
:keyword ingress_settings: App ingress settings payload.
:paramtype ingress_settings: ~azure.mgmt.appplatform.models.IngressSettings
+ :keyword secrets: Collection of auth secrets.
+ :paramtype secrets: list[~azure.mgmt.appplatform.models.Secret]
+ :keyword workload_profile_name: The workload profile used for this app. Supported for
+ Consumption + Dedicated plan.
+ :paramtype workload_profile_name: str
+ :keyword test_endpoint_auth_state: State of test endpoint auth. Known values are: "Enabled" and
+ "Disabled".
+ :paramtype test_endpoint_auth_state: str or
+ ~azure.mgmt.appplatform.models.TestEndpointAuthState
"""
super().__init__(**kwargs)
self.public = public
@@ -1485,6 +1507,9 @@ def __init__(
self.loaded_certificates = loaded_certificates
self.vnet_addons = vnet_addons
self.ingress_settings = ingress_settings
+ self.secrets = secrets
+ self.workload_profile_name = workload_profile_name
+ self.test_endpoint_auth_state = test_endpoint_auth_state
class AppVNetAddons(_serialization.Model):
@@ -2067,7 +2092,7 @@ class BuildpackBindingProperties(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
:ivar binding_type: Buildpack Binding Type. Known values are: "ApplicationInsights",
- "ApacheSkyWalking", "AppDynamics", "Dynatrace", "NewRelic", and "ElasticAPM".
+ "ApacheSkyWalking", "AppDynamics", "Dynatrace", "NewRelic", "ElasticAPM", and "CACertificates".
:vartype binding_type: str or ~azure.mgmt.appplatform.models.BindingType
:ivar provisioning_state: State of the Buildpack Binding. Known values are: "Creating",
"Updating", "Succeeded", "Failed", and "Deleting".
@@ -2096,7 +2121,7 @@ def __init__(
) -> None:
"""
:keyword binding_type: Buildpack Binding Type. Known values are: "ApplicationInsights",
- "ApacheSkyWalking", "AppDynamics", "Dynatrace", "NewRelic", and "ElasticAPM".
+ "ApacheSkyWalking", "AppDynamics", "Dynatrace", "NewRelic", "ElasticAPM", and "CACertificates".
:paramtype binding_type: str or ~azure.mgmt.appplatform.models.BindingType
:keyword launch_properties: The object describes the buildpack binding launch properties.
:paramtype launch_properties: ~azure.mgmt.appplatform.models.BuildpackBindingLaunchProperties
@@ -2185,12 +2210,21 @@ def __init__(
class BuildpackProperties(_serialization.Model):
"""Buildpack properties payload.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
:ivar id: Id of the buildpack.
:vartype id: str
+ :ivar version: Version of the buildpack.
+ :vartype version: str
"""
+ _validation = {
+ "version": {"readonly": True},
+ }
+
_attribute_map = {
"id": {"key": "id", "type": "str"},
+ "version": {"key": "version", "type": "str"},
}
def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin
@@ -2200,6 +2234,7 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin
"""
super().__init__(**kwargs)
self.id = id
+ self.version = None
class BuildpacksGroupProperties(_serialization.Model):
@@ -2504,7 +2539,7 @@ def __init__(
class UserSourceInfo(_serialization.Model):
- """Source information for a deployment.
+ """Source information for a deployment or a job.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
BuildResultUserSourceInfo, CustomContainerUserSourceInfo, UploadedUserSourceInfo
@@ -3157,10 +3192,19 @@ class ClusterResourceProperties(_serialization.Model):
:vartype network_profile: ~azure.mgmt.appplatform.models.NetworkProfile
:ivar vnet_addons: Additional Service settings in vnet injection instance.
:vartype vnet_addons: ~azure.mgmt.appplatform.models.ServiceVNetAddons
+ :ivar maintenance_schedule_configuration: Additional Service settings for planned maintenance.
+ :vartype maintenance_schedule_configuration:
+ ~azure.mgmt.appplatform.models.MaintenanceScheduleConfiguration
:ivar version: Version of the Service.
:vartype version: int
:ivar service_id: ServiceInstanceEntity Id which uniquely identifies a created resource.
:vartype service_id: str
+ :ivar managed_environment_id: The resource Id of the Managed Environment that the Spring Apps
+ instance builds on.
+ :vartype managed_environment_id: str
+ :ivar infra_resource_group: The name of the resource group that contains the infrastructure
+ resources.
+ :vartype infra_resource_group: str
:ivar power_state: Power state of the Service. Known values are: "Running" and "Stopped".
:vartype power_state: str or ~azure.mgmt.appplatform.models.PowerState
:ivar zone_redundant:
@@ -3183,8 +3227,14 @@ class ClusterResourceProperties(_serialization.Model):
"provisioning_state": {"key": "provisioningState", "type": "str"},
"network_profile": {"key": "networkProfile", "type": "NetworkProfile"},
"vnet_addons": {"key": "vnetAddons", "type": "ServiceVNetAddons"},
+ "maintenance_schedule_configuration": {
+ "key": "maintenanceScheduleConfiguration",
+ "type": "MaintenanceScheduleConfiguration",
+ },
"version": {"key": "version", "type": "int"},
"service_id": {"key": "serviceId", "type": "str"},
+ "managed_environment_id": {"key": "managedEnvironmentId", "type": "str"},
+ "infra_resource_group": {"key": "infraResourceGroup", "type": "str"},
"power_state": {"key": "powerState", "type": "str"},
"zone_redundant": {"key": "zoneRedundant", "type": "bool"},
"fqdn": {"key": "fqdn", "type": "str"},
@@ -3196,6 +3246,9 @@ def __init__(
*,
network_profile: Optional["_models.NetworkProfile"] = None,
vnet_addons: Optional["_models.ServiceVNetAddons"] = None,
+ maintenance_schedule_configuration: Optional["_models.MaintenanceScheduleConfiguration"] = None,
+ managed_environment_id: Optional[str] = None,
+ infra_resource_group: Optional[str] = None,
zone_redundant: bool = False,
marketplace_resource: Optional["_models.MarketplaceResource"] = None,
**kwargs: Any
@@ -3205,6 +3258,16 @@ def __init__(
:paramtype network_profile: ~azure.mgmt.appplatform.models.NetworkProfile
:keyword vnet_addons: Additional Service settings in vnet injection instance.
:paramtype vnet_addons: ~azure.mgmt.appplatform.models.ServiceVNetAddons
+ :keyword maintenance_schedule_configuration: Additional Service settings for planned
+ maintenance.
+ :paramtype maintenance_schedule_configuration:
+ ~azure.mgmt.appplatform.models.MaintenanceScheduleConfiguration
+ :keyword managed_environment_id: The resource Id of the Managed Environment that the Spring
+ Apps instance builds on.
+ :paramtype managed_environment_id: str
+ :keyword infra_resource_group: The name of the resource group that contains the infrastructure
+ resources.
+ :paramtype infra_resource_group: str
:keyword zone_redundant:
:paramtype zone_redundant: bool
:keyword marketplace_resource: Purchasing 3rd party product of the Service resource.
@@ -3214,8 +3277,11 @@ def __init__(
self.provisioning_state = None
self.network_profile = network_profile
self.vnet_addons = vnet_addons
+ self.maintenance_schedule_configuration = maintenance_schedule_configuration
self.version = None
self.service_id = None
+ self.managed_environment_id = managed_environment_id
+ self.infra_resource_group = infra_resource_group
self.power_state = None
self.zone_redundant = zone_redundant
self.fqdn = None
@@ -3316,27 +3382,69 @@ def __init__(
self.strict_host_key_checking = strict_host_key_checking
+class ConfigServerInstance(_serialization.Model):
+ """Collection of instances belong to the Config Server, only available in Enterprise Plan.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar name: Name of the Config Server instance.
+ :vartype name: str
+ :ivar status: Status of the Config Server instance.
+ :vartype status: str
+ """
+
+ _validation = {
+ "name": {"readonly": True},
+ "status": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "status": {"key": "status", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.name = None
+ self.status = None
+
+
class ConfigServerProperties(_serialization.Model):
"""Config server git properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: State of the config server. Known values are: "NotAvailable",
- "Deleted", "Failed", "Succeeded", and "Updating".
+ "Creating", "Deleted", "Failed", "Succeeded", "Updating", and "Deleting".
:vartype provisioning_state: str or ~azure.mgmt.appplatform.models.ConfigServerState
+ :ivar resource_requests: The requested resource quantity for required CPU and Memory, only
+ available in Enterprise Plan.
+ :vartype resource_requests: ~azure.mgmt.appplatform.models.ConfigServerResourceRequests
+ :ivar instances: Collection of instances belong to Config Server, only available in Enterprise
+ Plan.
+ :vartype instances: list[~azure.mgmt.appplatform.models.ConfigServerInstance]
:ivar error: Error when apply config server settings.
:vartype error: ~azure.mgmt.appplatform.models.Error
+ :ivar enabled_state: Enabled state of the config server. This is only used in Consumption tier.
+ Known values are: "Enabled" and "Disabled".
+ :vartype enabled_state: str or ~azure.mgmt.appplatform.models.ConfigServerEnabledState
:ivar config_server: Settings of config server.
:vartype config_server: ~azure.mgmt.appplatform.models.ConfigServerSettings
"""
_validation = {
"provisioning_state": {"readonly": True},
+ "resource_requests": {"readonly": True},
+ "instances": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
+ "resource_requests": {"key": "resourceRequests", "type": "ConfigServerResourceRequests"},
+ "instances": {"key": "instances", "type": "[ConfigServerInstance]"},
"error": {"key": "error", "type": "Error"},
+ "enabled_state": {"key": "enabledState", "type": "str"},
"config_server": {"key": "configServer", "type": "ConfigServerSettings"},
}
@@ -3344,18 +3452,25 @@ def __init__(
self,
*,
error: Optional["_models.Error"] = None,
+ enabled_state: Optional[Union[str, "_models.ConfigServerEnabledState"]] = None,
config_server: Optional["_models.ConfigServerSettings"] = None,
**kwargs: Any
) -> None:
"""
:keyword error: Error when apply config server settings.
:paramtype error: ~azure.mgmt.appplatform.models.Error
+ :keyword enabled_state: Enabled state of the config server. This is only used in Consumption
+ tier. Known values are: "Enabled" and "Disabled".
+ :paramtype enabled_state: str or ~azure.mgmt.appplatform.models.ConfigServerEnabledState
:keyword config_server: Settings of config server.
:paramtype config_server: ~azure.mgmt.appplatform.models.ConfigServerSettings
"""
super().__init__(**kwargs)
self.provisioning_state = None
+ self.resource_requests = None
+ self.instances = None
self.error = error
+ self.enabled_state = enabled_state
self.config_server = config_server
@@ -3400,6 +3515,73 @@ def __init__(self, *, properties: Optional["_models.ConfigServerProperties"] = N
self.properties = properties
+class ConfigServerResourceCollection(_serialization.Model):
+ """Object that includes an array of config server resources and a possible link for next set.
+
+ :ivar value: Collection of config server resources.
+ :vartype value: list[~azure.mgmt.appplatform.models.ConfigServerResource]
+ :ivar next_link: URL client should use to fetch the next page (per server side paging).
+ It's null for now, added for future use.
+ :vartype next_link: str
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[ConfigServerResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["_models.ConfigServerResource"]] = None,
+ next_link: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: Collection of config server resources.
+ :paramtype value: list[~azure.mgmt.appplatform.models.ConfigServerResource]
+ :keyword next_link: URL client should use to fetch the next page (per server side paging).
+ It's null for now, added for future use.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class ConfigServerResourceRequests(_serialization.Model):
+ """Resource request payload of Config Server, only available in Enterprise Plan.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar cpu: CPU allocated to each Config Server instance.
+ :vartype cpu: str
+ :ivar memory: Memory allocated to each Config Server instance.
+ :vartype memory: str
+ :ivar instance_count: Instance count of the Config Server.
+ :vartype instance_count: int
+ """
+
+ _validation = {
+ "cpu": {"readonly": True},
+ "memory": {"readonly": True},
+ "instance_count": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "cpu": {"key": "cpu", "type": "str"},
+ "memory": {"key": "memory", "type": "str"},
+ "instance_count": {"key": "instanceCount", "type": "int"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.cpu = None
+ self.memory = None
+ self.instance_count = None
+
+
class ConfigServerSettings(_serialization.Model):
"""The settings of config server.
@@ -3545,7 +3727,7 @@ def __init__(
self.git_repos_validation_result = git_repos_validation_result
-class ConfigurationServiceGitRepository(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class ConfigurationServiceGitRepository(_serialization.Model):
"""Git repository property payload for Application Configuration Service.
All required parameters must be populated in order to send to server.
@@ -3830,7 +4012,7 @@ class ConfigurationServiceResourceRequests(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar cpu: Cpu allocated to each Application Configuration Service instance.
+ :ivar cpu: CPU allocated to each Application Configuration Service instance.
:vartype cpu: str
:ivar memory: Memory allocated to each Application Configuration Service instance.
:vartype memory: str
@@ -3863,21 +4045,33 @@ class ConfigurationServiceSettings(_serialization.Model):
:ivar git_property: Property of git environment.
:vartype git_property: ~azure.mgmt.appplatform.models.ConfigurationServiceGitProperty
+ :ivar refresh_interval_in_seconds: How often (in seconds) to check repository updates. Minimum
+ value is 0.
+ :vartype refresh_interval_in_seconds: int
"""
_attribute_map = {
"git_property": {"key": "gitProperty", "type": "ConfigurationServiceGitProperty"},
+ "refresh_interval_in_seconds": {"key": "refreshIntervalInSeconds", "type": "int"},
}
def __init__(
- self, *, git_property: Optional["_models.ConfigurationServiceGitProperty"] = None, **kwargs: Any
+ self,
+ *,
+ git_property: Optional["_models.ConfigurationServiceGitProperty"] = None,
+ refresh_interval_in_seconds: Optional[int] = None,
+ **kwargs: Any
) -> None:
"""
:keyword git_property: Property of git environment.
:paramtype git_property: ~azure.mgmt.appplatform.models.ConfigurationServiceGitProperty
+ :keyword refresh_interval_in_seconds: How often (in seconds) to check repository updates.
+ Minimum value is 0.
+ :paramtype refresh_interval_in_seconds: int
"""
super().__init__(**kwargs)
self.git_property = git_property
+ self.refresh_interval_in_seconds = refresh_interval_in_seconds
class ConfigurationServiceSettingsValidateResult(_serialization.Model): # pylint: disable=name-too-long
@@ -4209,7 +4403,7 @@ class CustomContainer(_serialization.Model):
:ivar server: The name of the registry that contains the container image.
:vartype server: str
:ivar container_image: Container image of the custom container. This should be in the form of
- :code:``::code:`` without the server name of the registry.
+ :code:``:\\ :code:`` without the server name of the registry.
:vartype container_image: str
:ivar command: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is
used if this is not provided.
@@ -4248,7 +4442,7 @@ def __init__(
:keyword server: The name of the registry that contains the container image.
:paramtype server: str
:keyword container_image: Container image of the custom container. This should be in the form
- of :code:``::code:`` without the server name of the registry.
+ of :code:``:\\ :code:`` without the server name of the registry.
:paramtype container_image: str
:keyword command: Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT
is used if this is not provided.
@@ -4727,6 +4921,47 @@ def __init__(
self.storage_id = storage_id
+class CustomScaleRule(_serialization.Model):
+ """Azure Spring Apps App Instance Custom scaling rule.
+
+ :ivar type: Type of the custom scale rule
+ eg: azure-servicebus, redis etc.
+ :vartype type: str
+ :ivar metadata: Metadata properties to describe custom scale rule.
+ :vartype metadata: dict[str, str]
+ :ivar auth: Authentication secrets for the custom scale rule.
+ :vartype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+
+ _attribute_map = {
+ "type": {"key": "type", "type": "str"},
+ "metadata": {"key": "metadata", "type": "{str}"},
+ "auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ type: Optional[str] = None,
+ metadata: Optional[Dict[str, str]] = None,
+ auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword type: Type of the custom scale rule
+ eg: azure-servicebus, redis etc.
+ :paramtype type: str
+ :keyword metadata: Metadata properties to describe custom scale rule.
+ :paramtype metadata: dict[str, str]
+ :keyword auth: Authentication secrets for the custom scale rule.
+ :paramtype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+ super().__init__(**kwargs)
+ self.type = type
+ self.metadata = metadata
+ self.auth = auth
+
+
class DeploymentInstance(_serialization.Model):
"""Deployment instance payload.
@@ -4980,6 +5215,8 @@ class DeploymentSettings(_serialization.Model):
signal and the time when the processes are forcibly halted with a kill signal. Set this value
longer than the expected cleanup time for your process. Defaults to 90 seconds.
:vartype termination_grace_period_seconds: int
+ :ivar scale: Scaling properties for the Azure Spring Apps App Instance.
+ :vartype scale: ~azure.mgmt.appplatform.models.Scale
:ivar container_probe_settings: Container liveness and readiness probe settings.
:vartype container_probe_settings: ~azure.mgmt.appplatform.models.ContainerProbeSettings
"""
@@ -4993,6 +5230,7 @@ class DeploymentSettings(_serialization.Model):
"readiness_probe": {"key": "readinessProbe", "type": "Probe"},
"startup_probe": {"key": "startupProbe", "type": "Probe"},
"termination_grace_period_seconds": {"key": "terminationGracePeriodSeconds", "type": "int"},
+ "scale": {"key": "scale", "type": "Scale"},
"container_probe_settings": {"key": "containerProbeSettings", "type": "ContainerProbeSettings"},
}
@@ -5007,6 +5245,7 @@ def __init__(
readiness_probe: Optional["_models.Probe"] = None,
startup_probe: Optional["_models.Probe"] = None,
termination_grace_period_seconds: int = 90,
+ scale: Optional["_models.Scale"] = None,
container_probe_settings: Optional["_models.ContainerProbeSettings"] = None,
**kwargs: Any
) -> None:
@@ -5045,6 +5284,8 @@ def __init__(
signal and the time when the processes are forcibly halted with a kill signal. Set this value
longer than the expected cleanup time for your process. Defaults to 90 seconds.
:paramtype termination_grace_period_seconds: int
+ :keyword scale: Scaling properties for the Azure Spring Apps App Instance.
+ :paramtype scale: ~azure.mgmt.appplatform.models.Scale
:keyword container_probe_settings: Container liveness and readiness probe settings.
:paramtype container_probe_settings: ~azure.mgmt.appplatform.models.ContainerProbeSettings
"""
@@ -5057,6 +5298,7 @@ def __init__(
self.readiness_probe = readiness_probe
self.startup_probe = startup_probe
self.termination_grace_period_seconds = termination_grace_period_seconds
+ self.scale = scale
self.container_probe_settings = container_probe_settings
@@ -5442,6 +5684,71 @@ def __init__(
self.duration = duration
+class EnvSecretsCollection(_serialization.Model):
+ """Secret environment variable collection.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: Collection of resources. Required.
+ :vartype value: list[~azure.mgmt.appplatform.models.Secret]
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[Secret]"},
+ }
+
+ def __init__(self, *, value: List["_models.Secret"], **kwargs: Any) -> None:
+ """
+ :keyword value: Collection of resources. Required.
+ :paramtype value: list[~azure.mgmt.appplatform.models.Secret]
+ """
+ super().__init__(**kwargs)
+ self.value = value
+
+
+class EnvVar(_serialization.Model):
+ """Azure Spring Apps components' environment variable.
+
+ :ivar name: Environment variable name.
+ :vartype name: str
+ :ivar value: Non-secret environment variable value.
+ :vartype value: str
+ :ivar secret_value: secret environment variable value.
+ :vartype secret_value: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "value": {"key": "value", "type": "str"},
+ "secret_value": {"key": "secretValue", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ value: Optional[str] = None,
+ secret_value: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Environment variable name.
+ :paramtype name: str
+ :keyword value: Non-secret environment variable value.
+ :paramtype value: str
+ :keyword secret_value: secret environment variable value.
+ :paramtype secret_value: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.value = value
+ self.secret_value = secret_value
+
+
class Error(_serialization.Model):
"""The error code compose of code and message.
@@ -5468,6 +5775,126 @@ def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None,
self.message = message
+class EurekaServerProperties(_serialization.Model):
+ """Eureka server properties payload.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar provisioning_state: State of the eureka server. Known values are: "Failed", "Succeeded",
+ "Updating", and "Canceled".
+ :vartype provisioning_state: str or ~azure.mgmt.appplatform.models.EurekaServerState
+ :ivar enabled_state: Enabled state of the eureka server. This is only used in Consumption tier.
+ Known values are: "Enabled" and "Disabled".
+ :vartype enabled_state: str or ~azure.mgmt.appplatform.models.EurekaServerEnabledState
+ :ivar error: Error when applying eureka server settings.
+ :vartype error: ~azure.mgmt.appplatform.models.Error
+ """
+
+ _validation = {
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "enabled_state": {"key": "enabledState", "type": "str"},
+ "error": {"key": "error", "type": "Error"},
+ }
+
+ def __init__(
+ self,
+ *,
+ enabled_state: Optional[Union[str, "_models.EurekaServerEnabledState"]] = None,
+ error: Optional["_models.Error"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword enabled_state: Enabled state of the eureka server. This is only used in Consumption
+ tier. Known values are: "Enabled" and "Disabled".
+ :paramtype enabled_state: str or ~azure.mgmt.appplatform.models.EurekaServerEnabledState
+ :keyword error: Error when applying eureka server settings.
+ :paramtype error: ~azure.mgmt.appplatform.models.Error
+ """
+ super().__init__(**kwargs)
+ self.provisioning_state = None
+ self.enabled_state = enabled_state
+ self.error = error
+
+
+class EurekaServerResource(ProxyResource):
+ """Eureka server resource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource Id for the resource.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource.
+ :vartype type: str
+ :ivar system_data: Metadata pertaining to creation and last modification of the resource.
+ :vartype system_data: ~azure.mgmt.appplatform.models.SystemData
+ :ivar properties: Properties of the eureka server resource.
+ :vartype properties: ~azure.mgmt.appplatform.models.EurekaServerProperties
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "properties": {"key": "properties", "type": "EurekaServerProperties"},
+ }
+
+ def __init__(self, *, properties: Optional["_models.EurekaServerProperties"] = None, **kwargs: Any) -> None:
+ """
+ :keyword properties: Properties of the eureka server resource.
+ :paramtype properties: ~azure.mgmt.appplatform.models.EurekaServerProperties
+ """
+ super().__init__(**kwargs)
+ self.properties = properties
+
+
+class EurekaServerResourceCollection(_serialization.Model):
+ """Object that includes an array of Eureka server resources and a possible link for next set.
+
+ :ivar value: Collection of Eureka server resources.
+ :vartype value: list[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :ivar next_link: URL client should use to fetch the next page (per server side paging).
+ It's null for now, added for future use.
+ :vartype next_link: str
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[EurekaServerResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["_models.EurekaServerResource"]] = None,
+ next_link: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: Collection of Eureka server resources.
+ :paramtype value: list[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :keyword next_link: URL client should use to fetch the next page (per server side paging).
+ It's null for now, added for future use.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
class ProbeAction(_serialization.Model):
"""The action of the probe.
@@ -5894,13 +6321,122 @@ def __init__(self, **kwargs: Any) -> None:
self.status = None
-class GatewayOperatorProperties(_serialization.Model):
- """Properties of the Spring Cloud Gateway Operator.
+class GatewayResponseCacheProperties(_serialization.Model):
+ """Spring Cloud Gateway response cache properties.
- Variables are only populated by the server, and will be ignored when sending a request.
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
+ GatewayLocalResponseCachePerInstanceProperties, GatewayLocalResponseCachePerRouteProperties
- :ivar resource_requests: The requested resource quantity for required CPU and Memory.
- :vartype resource_requests: ~azure.mgmt.appplatform.models.GatewayOperatorResourceRequests
+ All required parameters must be populated in order to send to server.
+
+ :ivar response_cache_type: The type of the response cache. Required.
+ :vartype response_cache_type: str
+ """
+
+ _validation = {
+ "response_cache_type": {"required": True},
+ }
+
+ _attribute_map = {
+ "response_cache_type": {"key": "responseCacheType", "type": "str"},
+ }
+
+ _subtype_map = {
+ "response_cache_type": {
+ "LocalCachePerInstance": "GatewayLocalResponseCachePerInstanceProperties",
+ "LocalCachePerRoute": "GatewayLocalResponseCachePerRouteProperties",
+ }
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.response_cache_type: Optional[str] = None
+
+
+class GatewayLocalResponseCachePerInstanceProperties(GatewayResponseCacheProperties): # pylint: disable=name-too-long
+ """Spring Cloud Gateway local response cache per instance properties.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar response_cache_type: The type of the response cache. Required.
+ :vartype response_cache_type: str
+ :ivar size: Maximum size of cache (10MB, 900KB, 1GB...) to determine if the cache needs to
+ evict some entries.
+ :vartype size: str
+ :ivar time_to_live: Time before a cached entry is expired (300s, 5m, 1h...).
+ :vartype time_to_live: str
+ """
+
+ _validation = {
+ "response_cache_type": {"required": True},
+ }
+
+ _attribute_map = {
+ "response_cache_type": {"key": "responseCacheType", "type": "str"},
+ "size": {"key": "size", "type": "str"},
+ "time_to_live": {"key": "timeToLive", "type": "str"},
+ }
+
+ def __init__(self, *, size: Optional[str] = None, time_to_live: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword size: Maximum size of cache (10MB, 900KB, 1GB...) to determine if the cache needs to
+ evict some entries.
+ :paramtype size: str
+ :keyword time_to_live: Time before a cached entry is expired (300s, 5m, 1h...).
+ :paramtype time_to_live: str
+ """
+ super().__init__(**kwargs)
+ self.response_cache_type: str = "LocalCachePerInstance"
+ self.size = size
+ self.time_to_live = time_to_live
+
+
+class GatewayLocalResponseCachePerRouteProperties(GatewayResponseCacheProperties): # pylint: disable=name-too-long
+ """Spring Cloud Gateway local response cache per route properties.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar response_cache_type: The type of the response cache. Required.
+ :vartype response_cache_type: str
+ :ivar size: Maximum size of cache (10MB, 900KB, 1GB...) to determine if the cache needs to
+ evict some entries.
+ :vartype size: str
+ :ivar time_to_live: Time before a cached entry is expired (300s, 5m, 1h...).
+ :vartype time_to_live: str
+ """
+
+ _validation = {
+ "response_cache_type": {"required": True},
+ }
+
+ _attribute_map = {
+ "response_cache_type": {"key": "responseCacheType", "type": "str"},
+ "size": {"key": "size", "type": "str"},
+ "time_to_live": {"key": "timeToLive", "type": "str"},
+ }
+
+ def __init__(self, *, size: Optional[str] = None, time_to_live: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword size: Maximum size of cache (10MB, 900KB, 1GB...) to determine if the cache needs to
+ evict some entries.
+ :paramtype size: str
+ :keyword time_to_live: Time before a cached entry is expired (300s, 5m, 1h...).
+ :paramtype time_to_live: str
+ """
+ super().__init__(**kwargs)
+ self.response_cache_type: str = "LocalCachePerRoute"
+ self.size = size
+ self.time_to_live = time_to_live
+
+
+class GatewayOperatorProperties(_serialization.Model):
+ """Properties of the Spring Cloud Gateway Operator.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar resource_requests: The requested resource quantity for required CPU and Memory.
+ :vartype resource_requests: ~azure.mgmt.appplatform.models.GatewayOperatorResourceRequests
:ivar instances: Collection of instances belong to Spring Cloud Gateway operator.
:vartype instances: list[~azure.mgmt.appplatform.models.GatewayInstance]
"""
@@ -5927,7 +6463,7 @@ class GatewayOperatorResourceRequests(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar cpu: Cpu allocated to each Spring Cloud Gateway Operator instance.
+ :ivar cpu: CPU allocated to each Spring Cloud Gateway Operator instance.
:vartype cpu: str
:ivar memory: Memory allocated to each Spring Cloud Gateway Operator instance.
:vartype memory: str
@@ -5955,7 +6491,7 @@ def __init__(self, **kwargs: Any) -> None:
self.instance_count = None
-class GatewayProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class GatewayProperties(_serialization.Model):
"""Spring Cloud Gateway properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -5977,6 +6513,8 @@ class GatewayProperties(_serialization.Model): # pylint: disable=too-many-insta
:vartype cors_properties: ~azure.mgmt.appplatform.models.GatewayCorsProperties
:ivar client_auth: Client-Certification Authentication.
:vartype client_auth: ~azure.mgmt.appplatform.models.GatewayPropertiesClientAuth
+ :ivar apm_types: Collection of APM type used in Spring Cloud Gateway.
+ :vartype apm_types: list[str or ~azure.mgmt.appplatform.models.ApmType]
:ivar apms: Collection of ApmReferences in service level.
:vartype apms: list[~azure.mgmt.appplatform.models.ApmReference]
:ivar environment_variables: Environment variables of Spring Cloud Gateway.
@@ -5984,15 +6522,22 @@ class GatewayProperties(_serialization.Model): # pylint: disable=too-many-insta
~azure.mgmt.appplatform.models.GatewayPropertiesEnvironmentVariables
:ivar resource_requests: The requested resource quantity for required CPU and Memory.
:vartype resource_requests: ~azure.mgmt.appplatform.models.GatewayResourceRequests
+ :ivar addon_configs: Collection of addons for Spring Cloud Gateway.
+ :vartype addon_configs: dict[str, JSON]
:ivar instances: Collection of instances belong to Spring Cloud Gateway.
:vartype instances: list[~azure.mgmt.appplatform.models.GatewayInstance]
:ivar operator_properties: Properties of the Spring Cloud Gateway Operator.
:vartype operator_properties: ~azure.mgmt.appplatform.models.GatewayOperatorProperties
+ :ivar response_cache_properties: The properties to configure different types of response cache
+ for Spring Cloud Gateway.
+ :vartype response_cache_properties:
+ ~azure.mgmt.appplatform.models.GatewayResponseCacheProperties
"""
_validation = {
"provisioning_state": {"readonly": True},
"url": {"readonly": True},
+ "apm_types": {"unique": True},
"instances": {"readonly": True},
"operator_properties": {"readonly": True},
}
@@ -6006,11 +6551,14 @@ class GatewayProperties(_serialization.Model): # pylint: disable=too-many-insta
"api_metadata_properties": {"key": "apiMetadataProperties", "type": "GatewayApiMetadataProperties"},
"cors_properties": {"key": "corsProperties", "type": "GatewayCorsProperties"},
"client_auth": {"key": "clientAuth", "type": "GatewayPropertiesClientAuth"},
+ "apm_types": {"key": "apmTypes", "type": "[str]"},
"apms": {"key": "apms", "type": "[ApmReference]"},
"environment_variables": {"key": "environmentVariables", "type": "GatewayPropertiesEnvironmentVariables"},
"resource_requests": {"key": "resourceRequests", "type": "GatewayResourceRequests"},
+ "addon_configs": {"key": "addonConfigs", "type": "{object}"},
"instances": {"key": "instances", "type": "[GatewayInstance]"},
"operator_properties": {"key": "operatorProperties", "type": "GatewayOperatorProperties"},
+ "response_cache_properties": {"key": "responseCacheProperties", "type": "GatewayResponseCacheProperties"},
}
def __init__(
@@ -6022,9 +6570,12 @@ def __init__(
api_metadata_properties: Optional["_models.GatewayApiMetadataProperties"] = None,
cors_properties: Optional["_models.GatewayCorsProperties"] = None,
client_auth: Optional["_models.GatewayPropertiesClientAuth"] = None,
+ apm_types: Optional[List[Union[str, "_models.ApmType"]]] = None,
apms: Optional[List["_models.ApmReference"]] = None,
environment_variables: Optional["_models.GatewayPropertiesEnvironmentVariables"] = None,
resource_requests: Optional["_models.GatewayResourceRequests"] = None,
+ addon_configs: Optional[Dict[str, JSON]] = None,
+ response_cache_properties: Optional["_models.GatewayResponseCacheProperties"] = None,
**kwargs: Any
) -> None:
"""
@@ -6040,6 +6591,8 @@ def __init__(
:paramtype cors_properties: ~azure.mgmt.appplatform.models.GatewayCorsProperties
:keyword client_auth: Client-Certification Authentication.
:paramtype client_auth: ~azure.mgmt.appplatform.models.GatewayPropertiesClientAuth
+ :keyword apm_types: Collection of APM type used in Spring Cloud Gateway.
+ :paramtype apm_types: list[str or ~azure.mgmt.appplatform.models.ApmType]
:keyword apms: Collection of ApmReferences in service level.
:paramtype apms: list[~azure.mgmt.appplatform.models.ApmReference]
:keyword environment_variables: Environment variables of Spring Cloud Gateway.
@@ -6047,6 +6600,12 @@ def __init__(
~azure.mgmt.appplatform.models.GatewayPropertiesEnvironmentVariables
:keyword resource_requests: The requested resource quantity for required CPU and Memory.
:paramtype resource_requests: ~azure.mgmt.appplatform.models.GatewayResourceRequests
+ :keyword addon_configs: Collection of addons for Spring Cloud Gateway.
+ :paramtype addon_configs: dict[str, JSON]
+ :keyword response_cache_properties: The properties to configure different types of response
+ cache for Spring Cloud Gateway.
+ :paramtype response_cache_properties:
+ ~azure.mgmt.appplatform.models.GatewayResponseCacheProperties
"""
super().__init__(**kwargs)
self.provisioning_state = None
@@ -6057,11 +6616,14 @@ def __init__(
self.api_metadata_properties = api_metadata_properties
self.cors_properties = cors_properties
self.client_auth = client_auth
+ self.apm_types = apm_types
self.apms = apms
self.environment_variables = environment_variables
self.resource_requests = resource_requests
+ self.addon_configs = addon_configs
self.instances = None
self.operator_properties = None
+ self.response_cache_properties = response_cache_properties
class GatewayPropertiesClientAuth(_serialization.Model):
@@ -6218,7 +6780,7 @@ def __init__(
class GatewayResourceRequests(_serialization.Model):
"""Resource request payload of Spring Cloud Gateway.
- :ivar cpu: Cpu allocated to each Spring Cloud Gateway instance.
+ :ivar cpu: CPU allocated to each Spring Cloud Gateway instance.
:vartype cpu: str
:ivar memory: Memory allocated to each Spring Cloud Gateway instance.
:vartype memory: str
@@ -6231,7 +6793,7 @@ class GatewayResourceRequests(_serialization.Model):
def __init__(self, *, cpu: str = "1", memory: str = "2Gi", **kwargs: Any) -> None:
"""
- :keyword cpu: Cpu allocated to each Spring Cloud Gateway instance.
+ :keyword cpu: CPU allocated to each Spring Cloud Gateway instance.
:paramtype cpu: str
:keyword memory: Memory allocated to each Spring Cloud Gateway instance.
:paramtype memory: str
@@ -6429,7 +6991,7 @@ def __init__(
self.next_link = next_link
-class GitPatternRepository(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class GitPatternRepository(_serialization.Model):
"""Git repository property payload for config server.
All required parameters must be populated in order to send to server.
@@ -6608,6 +7170,38 @@ def __init__(
self.scheme = scheme
+class HttpScaleRule(_serialization.Model):
+ """Azure Spring Apps App Instance Http scaling rule.
+
+ :ivar metadata: Metadata properties to describe http scale rule.
+ :vartype metadata: dict[str, str]
+ :ivar auth: Authentication secrets for the custom scale rule.
+ :vartype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+
+ _attribute_map = {
+ "metadata": {"key": "metadata", "type": "{str}"},
+ "auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ metadata: Optional[Dict[str, str]] = None,
+ auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword metadata: Metadata properties to describe http scale rule.
+ :paramtype metadata: dict[str, str]
+ :keyword auth: Authentication secrets for the custom scale rule.
+ :paramtype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+ super().__init__(**kwargs)
+ self.metadata = metadata
+ self.auth = auth
+
+
class ImageRegistryCredential(_serialization.Model):
"""Credential of the image registry.
@@ -6840,7 +7434,322 @@ def __init__(
self.jvm_options = jvm_options
-class KeyVaultCertificateProperties(CertificateProperties): # pylint: disable=too-many-instance-attributes
+class JobExecution(_serialization.Model):
+ """Azure Spring Apps Job execution.
+
+ :ivar name: Job execution Name.
+ :vartype name: str
+ :ivar status: Current state of the job execution. Known values are: "Running", "Pending",
+ "Canceled", "Failed", and "Completed".
+ :vartype status: str or ~azure.mgmt.appplatform.models.JobExecutionRunningState
+ :ivar start_time: Job execution start time.
+ :vartype start_time: ~datetime.datetime
+ :ivar end_time: Job execution end time.
+ :vartype end_time: ~datetime.datetime
+ :ivar template: The template which is applied for the execution of the Job.
+ :vartype template: ~azure.mgmt.appplatform.models.JobExecutionTemplate
+ :ivar job_snapshot: The snapshot of job configuration.
+ :vartype job_snapshot: ~azure.mgmt.appplatform.models.JobResourceProperties
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "status": {"key": "status", "type": "str"},
+ "start_time": {"key": "startTime", "type": "iso-8601"},
+ "end_time": {"key": "endTime", "type": "iso-8601"},
+ "template": {"key": "template", "type": "JobExecutionTemplate"},
+ "job_snapshot": {"key": "jobSnapshot", "type": "JobResourceProperties"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ status: Optional[Union[str, "_models.JobExecutionRunningState"]] = None,
+ start_time: Optional[datetime.datetime] = None,
+ end_time: Optional[datetime.datetime] = None,
+ template: Optional["_models.JobExecutionTemplate"] = None,
+ job_snapshot: Optional["_models.JobResourceProperties"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Job execution Name.
+ :paramtype name: str
+ :keyword status: Current state of the job execution. Known values are: "Running", "Pending",
+ "Canceled", "Failed", and "Completed".
+ :paramtype status: str or ~azure.mgmt.appplatform.models.JobExecutionRunningState
+ :keyword start_time: Job execution start time.
+ :paramtype start_time: ~datetime.datetime
+ :keyword end_time: Job execution end time.
+ :paramtype end_time: ~datetime.datetime
+ :keyword template: The template which is applied for the execution of the Job.
+ :paramtype template: ~azure.mgmt.appplatform.models.JobExecutionTemplate
+ :keyword job_snapshot: The snapshot of job configuration.
+ :paramtype job_snapshot: ~azure.mgmt.appplatform.models.JobResourceProperties
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.status = status
+ self.start_time = start_time
+ self.end_time = end_time
+ self.template = template
+ self.job_snapshot = job_snapshot
+
+
+class JobExecutionCollection(_serialization.Model):
+ """Azure Spring App Job executions collection.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: Collection of Job executions. Required.
+ :vartype value: list[~azure.mgmt.appplatform.models.JobExecution]
+ :ivar next_link: Link to next page of resources.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[JobExecution]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(self, *, value: List["_models.JobExecution"], next_link: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: Collection of Job executions. Required.
+ :paramtype value: list[~azure.mgmt.appplatform.models.JobExecution]
+ :keyword next_link: Link to next page of resources.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class JobExecutionTemplate(_serialization.Model):
+ """Job's execution template, containing configuration for an execution.
+
+ :ivar environment_variables: Environment variables of Job execution.
+ :vartype environment_variables: list[~azure.mgmt.appplatform.models.EnvVar]
+ :ivar args: Arguments for the Job execution.
+ :vartype args: list[str]
+ :ivar resource_requests: The requested resource quantity for required CPU and Memory.
+ :vartype resource_requests: ~azure.mgmt.appplatform.models.JobResourceRequests
+ """
+
+ _attribute_map = {
+ "environment_variables": {"key": "environmentVariables", "type": "[EnvVar]"},
+ "args": {"key": "args", "type": "[str]"},
+ "resource_requests": {"key": "resourceRequests", "type": "JobResourceRequests"},
+ }
+
+ def __init__(
+ self,
+ *,
+ environment_variables: Optional[List["_models.EnvVar"]] = None,
+ args: Optional[List[str]] = None,
+ resource_requests: Optional["_models.JobResourceRequests"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword environment_variables: Environment variables of Job execution.
+ :paramtype environment_variables: list[~azure.mgmt.appplatform.models.EnvVar]
+ :keyword args: Arguments for the Job execution.
+ :paramtype args: list[str]
+ :keyword resource_requests: The requested resource quantity for required CPU and Memory.
+ :paramtype resource_requests: ~azure.mgmt.appplatform.models.JobResourceRequests
+ """
+ super().__init__(**kwargs)
+ self.environment_variables = environment_variables
+ self.args = args
+ self.resource_requests = resource_requests
+
+
+class JobResource(ProxyResource):
+ """Job resource payload.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource Id for the resource.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource.
+ :vartype type: str
+ :ivar system_data: Metadata pertaining to creation and last modification of the resource.
+ :vartype system_data: ~azure.mgmt.appplatform.models.SystemData
+ :ivar properties: Properties of the Job resource.
+ :vartype properties: ~azure.mgmt.appplatform.models.JobResourceProperties
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "properties": {"key": "properties", "type": "JobResourceProperties"},
+ }
+
+ def __init__(self, *, properties: Optional["_models.JobResourceProperties"] = None, **kwargs: Any) -> None:
+ """
+ :keyword properties: Properties of the Job resource.
+ :paramtype properties: ~azure.mgmt.appplatform.models.JobResourceProperties
+ """
+ super().__init__(**kwargs)
+ self.properties = properties
+
+
+class JobResourceCollection(_serialization.Model):
+ """List of Azure Spring Apps Jobs and a possible link for next set.
+
+ :ivar value: Collection of Job resources.
+ :vartype value: list[~azure.mgmt.appplatform.models.JobResource]
+ :ivar next_link: Link to next page of resources.
+ :vartype next_link: str
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[JobResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self, *, value: Optional[List["_models.JobResource"]] = None, next_link: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: Collection of Job resources.
+ :paramtype value: list[~azure.mgmt.appplatform.models.JobResource]
+ :keyword next_link: Link to next page of resources.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class JobResourceProperties(_serialization.Model):
+ """Job resource properties payload.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar provisioning_state: Provisioning state of the Job. Known values are: "Succeeded",
+ "Failed", "Creating", "Updating", "Deleting", and "Canceled".
+ :vartype provisioning_state: str or ~azure.mgmt.appplatform.models.JobResourceProvisioningState
+ :ivar template: The template which is applied for all executions of the Job.
+ :vartype template: ~azure.mgmt.appplatform.models.JobExecutionTemplate
+ :ivar source: Uploaded source information of the Job.
+ :vartype source: ~azure.mgmt.appplatform.models.UserSourceInfo
+ :ivar managed_component_references: Referenced managed components collection.
+ :vartype managed_component_references:
+ list[~azure.mgmt.appplatform.models.ManagedComponentReference]
+ :ivar trigger_config: The Job trigger related configuration.
+ :vartype trigger_config: ~azure.mgmt.appplatform.models.JobTriggerConfig
+ """
+
+ _validation = {
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "template": {"key": "template", "type": "JobExecutionTemplate"},
+ "source": {"key": "source", "type": "UserSourceInfo"},
+ "managed_component_references": {"key": "managedComponentReferences", "type": "[ManagedComponentReference]"},
+ "trigger_config": {"key": "triggerConfig", "type": "JobTriggerConfig"},
+ }
+
+ def __init__(
+ self,
+ *,
+ template: Optional["_models.JobExecutionTemplate"] = None,
+ source: Optional["_models.UserSourceInfo"] = None,
+ managed_component_references: Optional[List["_models.ManagedComponentReference"]] = None,
+ trigger_config: Optional["_models.JobTriggerConfig"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword template: The template which is applied for all executions of the Job.
+ :paramtype template: ~azure.mgmt.appplatform.models.JobExecutionTemplate
+ :keyword source: Uploaded source information of the Job.
+ :paramtype source: ~azure.mgmt.appplatform.models.UserSourceInfo
+ :keyword managed_component_references: Referenced managed components collection.
+ :paramtype managed_component_references:
+ list[~azure.mgmt.appplatform.models.ManagedComponentReference]
+ :keyword trigger_config: The Job trigger related configuration.
+ :paramtype trigger_config: ~azure.mgmt.appplatform.models.JobTriggerConfig
+ """
+ super().__init__(**kwargs)
+ self.provisioning_state = None
+ self.template = template
+ self.source = source
+ self.managed_component_references = managed_component_references
+ self.trigger_config = trigger_config
+
+
+class JobResourceRequests(_serialization.Model):
+ """Job resource request payload.
+
+ :ivar cpu: CPU allocated to each job execution instance.
+ :vartype cpu: str
+ :ivar memory: Memory allocated to each job execution instance.
+ :vartype memory: str
+ """
+
+ _attribute_map = {
+ "cpu": {"key": "cpu", "type": "str"},
+ "memory": {"key": "memory", "type": "str"},
+ }
+
+ def __init__(self, *, cpu: str = "1", memory: str = "2Gi", **kwargs: Any) -> None:
+ """
+ :keyword cpu: CPU allocated to each job execution instance.
+ :paramtype cpu: str
+ :keyword memory: Memory allocated to each job execution instance.
+ :paramtype memory: str
+ """
+ super().__init__(**kwargs)
+ self.cpu = cpu
+ self.memory = memory
+
+
+class JobTriggerConfig(_serialization.Model):
+ """Configuration for different trigger types.
+
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
+ ManualJobTriggerConfig
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar trigger_type: Type of job trigger. "Manual"
+ :vartype trigger_type: str or ~azure.mgmt.appplatform.models.TriggerType
+ """
+
+ _validation = {
+ "trigger_type": {"required": True},
+ }
+
+ _attribute_map = {
+ "trigger_type": {"key": "triggerType", "type": "str"},
+ }
+
+ _subtype_map = {"trigger_type": {"Manual": "ManualJobTriggerConfig"}}
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.trigger_type: Optional[str] = None
+
+
+class KeyVaultCertificateProperties(CertificateProperties):
"""Properties of certificate imported from key vault.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -7044,6 +7953,60 @@ def __init__(
self.blob_duration = blob_duration
+class MaintenanceScheduleConfiguration(_serialization.Model):
+ """Configuration for the planned maintenance.
+
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
+ WeeklyMaintenanceScheduleConfiguration
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar frequency: The frequency to run the maintenance job. Required. "Weekly"
+ :vartype frequency: str or ~azure.mgmt.appplatform.models.Frequency
+ """
+
+ _validation = {
+ "frequency": {"required": True},
+ }
+
+ _attribute_map = {
+ "frequency": {"key": "frequency", "type": "str"},
+ }
+
+ _subtype_map = {"frequency": {"Weekly": "WeeklyMaintenanceScheduleConfiguration"}}
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.frequency: Optional[str] = None
+
+
+class ManagedComponentReference(_serialization.Model):
+ """A reference to the managed component like Config Server.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar resource_id: Resource Id of the managed component. Required.
+ :vartype resource_id: str
+ """
+
+ _validation = {
+ "resource_id": {"required": True},
+ }
+
+ _attribute_map = {
+ "resource_id": {"key": "resourceId", "type": "str"},
+ }
+
+ def __init__(self, *, resource_id: str, **kwargs: Any) -> None:
+ """
+ :keyword resource_id: Resource Id of the managed component. Required.
+ :paramtype resource_id: str
+ """
+ super().__init__(**kwargs)
+ self.resource_id = resource_id
+
+
class ManagedIdentityProperties(_serialization.Model):
"""Managed identity properties retrieved from ARM request headers.
@@ -7094,6 +8057,55 @@ def __init__(
self.user_assigned_identities = user_assigned_identities
+class ManualJobTriggerConfig(JobTriggerConfig):
+ """Configuration for manual triggered job.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar trigger_type: Type of job trigger. "Manual"
+ :vartype trigger_type: str or ~azure.mgmt.appplatform.models.TriggerType
+ :ivar parallelism: Number of parallel replicas of a job execution can run.
+ :vartype parallelism: int
+ :ivar timeout_in_seconds: Maximum number of seconds an execution is allowed to run.
+ :vartype timeout_in_seconds: int
+ :ivar retry_limit: Maximum number of retries before failing the job.
+ :vartype retry_limit: int
+ """
+
+ _validation = {
+ "trigger_type": {"required": True},
+ }
+
+ _attribute_map = {
+ "trigger_type": {"key": "triggerType", "type": "str"},
+ "parallelism": {"key": "parallelism", "type": "int"},
+ "timeout_in_seconds": {"key": "timeoutInSeconds", "type": "int"},
+ "retry_limit": {"key": "retryLimit", "type": "int"},
+ }
+
+ def __init__(
+ self,
+ *,
+ parallelism: Optional[int] = None,
+ timeout_in_seconds: Optional[int] = None,
+ retry_limit: Optional[int] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword parallelism: Number of parallel replicas of a job execution can run.
+ :paramtype parallelism: int
+ :keyword timeout_in_seconds: Maximum number of seconds an execution is allowed to run.
+ :paramtype timeout_in_seconds: int
+ :keyword retry_limit: Maximum number of retries before failing the job.
+ :paramtype retry_limit: int
+ """
+ super().__init__(**kwargs)
+ self.trigger_type: str = "Manual"
+ self.parallelism = parallelism
+ self.timeout_in_seconds = timeout_in_seconds
+ self.retry_limit = retry_limit
+
+
class MarketplaceResource(_serialization.Model):
"""Purchasing 3rd Party product for one Azure Spring Apps instance.
@@ -7174,7 +8186,7 @@ def __init__(
self.to_be_exported_for_shoebox = to_be_exported_for_shoebox
-class MetricSpecification(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class MetricSpecification(_serialization.Model):
"""Specifications of the Metrics for Azure Monitoring.
:ivar name: Name of the metric.
@@ -8020,6 +9032,45 @@ def __init__(
self.success_threshold = success_threshold
+class QueueScaleRule(_serialization.Model):
+ """Azure Spring Apps App Instance Azure Queue based scaling rule.
+
+ :ivar queue_name: Queue name.
+ :vartype queue_name: str
+ :ivar queue_length: Queue length.
+ :vartype queue_length: int
+ :ivar auth: Authentication secrets for the queue scale rule.
+ :vartype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+
+ _attribute_map = {
+ "queue_name": {"key": "queueName", "type": "str"},
+ "queue_length": {"key": "queueLength", "type": "int"},
+ "auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ queue_name: Optional[str] = None,
+ queue_length: Optional[int] = None,
+ auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword queue_name: Queue name.
+ :paramtype queue_name: str
+ :keyword queue_length: Queue length.
+ :paramtype queue_length: int
+ :keyword auth: Authentication secrets for the queue scale rule.
+ :paramtype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+ super().__init__(**kwargs)
+ self.queue_name = queue_name
+ self.queue_length = queue_length
+ self.auth = auth
+
+
class RegenerateTestKeyRequestPayload(_serialization.Model):
"""Regenerate test key request payload.
@@ -8475,6 +9526,155 @@ def __init__(self, *, relative_path: Optional[str] = None, upload_url: Optional[
self.upload_url = upload_url
+class Scale(_serialization.Model):
+ """Azure Spring Apps scaling configurations.
+
+ :ivar min_replicas: Optional. Minimum number of container replicas.
+ :vartype min_replicas: int
+ :ivar max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not set.
+ :vartype max_replicas: int
+ :ivar rules: Scaling rules.
+ :vartype rules: list[~azure.mgmt.appplatform.models.ScaleRule]
+ """
+
+ _attribute_map = {
+ "min_replicas": {"key": "minReplicas", "type": "int"},
+ "max_replicas": {"key": "maxReplicas", "type": "int"},
+ "rules": {"key": "rules", "type": "[ScaleRule]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ min_replicas: Optional[int] = None,
+ max_replicas: int = 10,
+ rules: Optional[List["_models.ScaleRule"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword min_replicas: Optional. Minimum number of container replicas.
+ :paramtype min_replicas: int
+ :keyword max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not
+ set.
+ :paramtype max_replicas: int
+ :keyword rules: Scaling rules.
+ :paramtype rules: list[~azure.mgmt.appplatform.models.ScaleRule]
+ """
+ super().__init__(**kwargs)
+ self.min_replicas = min_replicas
+ self.max_replicas = max_replicas
+ self.rules = rules
+
+
+class ScaleRule(_serialization.Model):
+ """Azure Spring Apps App Instance scaling rule.
+
+ :ivar name: Scale Rule Name.
+ :vartype name: str
+ :ivar azure_queue: Azure Queue based scaling.
+ :vartype azure_queue: ~azure.mgmt.appplatform.models.QueueScaleRule
+ :ivar custom: Custom scale rule.
+ :vartype custom: ~azure.mgmt.appplatform.models.CustomScaleRule
+ :ivar http: HTTP requests based scaling.
+ :vartype http: ~azure.mgmt.appplatform.models.HttpScaleRule
+ :ivar tcp: Tcp requests based scaling.
+ :vartype tcp: ~azure.mgmt.appplatform.models.TcpScaleRule
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "azure_queue": {"key": "azureQueue", "type": "QueueScaleRule"},
+ "custom": {"key": "custom", "type": "CustomScaleRule"},
+ "http": {"key": "http", "type": "HttpScaleRule"},
+ "tcp": {"key": "tcp", "type": "TcpScaleRule"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ azure_queue: Optional["_models.QueueScaleRule"] = None,
+ custom: Optional["_models.CustomScaleRule"] = None,
+ http: Optional["_models.HttpScaleRule"] = None,
+ tcp: Optional["_models.TcpScaleRule"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Scale Rule Name.
+ :paramtype name: str
+ :keyword azure_queue: Azure Queue based scaling.
+ :paramtype azure_queue: ~azure.mgmt.appplatform.models.QueueScaleRule
+ :keyword custom: Custom scale rule.
+ :paramtype custom: ~azure.mgmt.appplatform.models.CustomScaleRule
+ :keyword http: HTTP requests based scaling.
+ :paramtype http: ~azure.mgmt.appplatform.models.HttpScaleRule
+ :keyword tcp: Tcp requests based scaling.
+ :paramtype tcp: ~azure.mgmt.appplatform.models.TcpScaleRule
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.azure_queue = azure_queue
+ self.custom = custom
+ self.http = http
+ self.tcp = tcp
+
+
+class ScaleRuleAuth(_serialization.Model):
+ """Auth Secrets for Azure Spring Apps App Instance Scale Rule.
+
+ :ivar secret_ref: Name of the Azure Spring Apps App Instance secret from which to pull the auth
+ params.
+ :vartype secret_ref: str
+ :ivar trigger_parameter: Trigger Parameter that uses the secret.
+ :vartype trigger_parameter: str
+ """
+
+ _attribute_map = {
+ "secret_ref": {"key": "secretRef", "type": "str"},
+ "trigger_parameter": {"key": "triggerParameter", "type": "str"},
+ }
+
+ def __init__(
+ self, *, secret_ref: Optional[str] = None, trigger_parameter: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword secret_ref: Name of the Azure Spring Apps App Instance secret from which to pull the
+ auth params.
+ :paramtype secret_ref: str
+ :keyword trigger_parameter: Trigger Parameter that uses the secret.
+ :paramtype trigger_parameter: str
+ """
+ super().__init__(**kwargs)
+ self.secret_ref = secret_ref
+ self.trigger_parameter = trigger_parameter
+
+
+class Secret(_serialization.Model):
+ """Secret definition.
+
+ :ivar name: Secret Name.
+ :vartype name: str
+ :ivar value: Secret Value.
+ :vartype value: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "value": {"key": "value", "type": "str"},
+ }
+
+ def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword name: Secret Name.
+ :paramtype name: str
+ :keyword value: Secret Value.
+ :paramtype value: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.value = value
+
+
class ServiceRegistryInstance(_serialization.Model):
"""Collection of instances belong to the Service Registry.
@@ -8618,7 +9818,7 @@ class ServiceRegistryResourceRequests(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar cpu: Cpu allocated to each Service Registry instance.
+ :ivar cpu: CPU allocated to each Service Registry instance.
:vartype cpu: str
:ivar memory: Memory allocated to each Service Registry instance.
:vartype memory: str
@@ -8713,6 +9913,8 @@ class ServiceResource(TrackedResource):
:vartype tags: dict[str, str]
:ivar properties: Properties of the Service resource.
:vartype properties: ~azure.mgmt.appplatform.models.ClusterResourceProperties
+ :ivar identity: Managed Identity of the Service resource.
+ :vartype identity: ~azure.mgmt.appplatform.models.SystemAssignedServiceIdentity
:ivar sku: Sku of the Service resource.
:vartype sku: ~azure.mgmt.appplatform.models.Sku
"""
@@ -8732,6 +9934,7 @@ class ServiceResource(TrackedResource):
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"properties": {"key": "properties", "type": "ClusterResourceProperties"},
+ "identity": {"key": "identity", "type": "SystemAssignedServiceIdentity"},
"sku": {"key": "sku", "type": "Sku"},
}
@@ -8741,6 +9944,7 @@ def __init__(
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
properties: Optional["_models.ClusterResourceProperties"] = None,
+ identity: Optional["_models.SystemAssignedServiceIdentity"] = None,
sku: Optional["_models.Sku"] = None,
**kwargs: Any
) -> None:
@@ -8752,11 +9956,14 @@ def __init__(
:paramtype tags: dict[str, str]
:keyword properties: Properties of the Service resource.
:paramtype properties: ~azure.mgmt.appplatform.models.ClusterResourceProperties
+ :keyword identity: Managed Identity of the Service resource.
+ :paramtype identity: ~azure.mgmt.appplatform.models.SystemAssignedServiceIdentity
:keyword sku: Sku of the Service resource.
:paramtype sku: ~azure.mgmt.appplatform.models.Sku
"""
super().__init__(location=location, tags=tags, **kwargs)
self.properties = properties
+ self.identity = identity
self.sku = sku
@@ -8831,15 +10038,30 @@ class ServiceVNetAddons(_serialization.Model):
:ivar data_plane_public_endpoint: Indicates whether the data plane components(log stream, app
connect, remote debugging) in vnet injection instance could be accessed from internet.
:vartype data_plane_public_endpoint: bool
+ :ivar private_storage_access: Indicates whether the vnet injection service enables private
+ links for backend storage account and container registry. Known values are: "Enabled" and
+ "Disabled".
+ :vartype private_storage_access: str or ~azure.mgmt.appplatform.models.PrivateStorageAccess
+ :ivar private_dns_zone_id: Fully qualified resource Id of the Private DNS zone to link with the
+ customer virtual network.
+ :vartype private_dns_zone_id: str
"""
_attribute_map = {
"log_stream_public_endpoint": {"key": "logStreamPublicEndpoint", "type": "bool"},
"data_plane_public_endpoint": {"key": "dataPlanePublicEndpoint", "type": "bool"},
+ "private_storage_access": {"key": "privateStorageAccess", "type": "str"},
+ "private_dns_zone_id": {"key": "privateDnsZoneId", "type": "str"},
}
def __init__(
- self, *, log_stream_public_endpoint: bool = False, data_plane_public_endpoint: bool = False, **kwargs: Any
+ self,
+ *,
+ log_stream_public_endpoint: bool = False,
+ data_plane_public_endpoint: bool = False,
+ private_storage_access: Optional[Union[str, "_models.PrivateStorageAccess"]] = None,
+ private_dns_zone_id: Optional[str] = None,
+ **kwargs: Any
) -> None:
"""
:keyword log_stream_public_endpoint: Indicates whether the log stream in vnet injection
@@ -8848,10 +10070,19 @@ def __init__(
:keyword data_plane_public_endpoint: Indicates whether the data plane components(log stream,
app connect, remote debugging) in vnet injection instance could be accessed from internet.
:paramtype data_plane_public_endpoint: bool
+ :keyword private_storage_access: Indicates whether the vnet injection service enables private
+ links for backend storage account and container registry. Known values are: "Enabled" and
+ "Disabled".
+ :paramtype private_storage_access: str or ~azure.mgmt.appplatform.models.PrivateStorageAccess
+ :keyword private_dns_zone_id: Fully qualified resource Id of the Private DNS zone to link with
+ the customer virtual network.
+ :paramtype private_dns_zone_id: str
"""
super().__init__(**kwargs)
self.log_stream_public_endpoint = log_stream_public_endpoint
self.data_plane_public_endpoint = data_plane_public_endpoint
+ self.private_storage_access = private_storage_access
+ self.private_dns_zone_id = private_dns_zone_id
class Sku(_serialization.Model):
@@ -9337,19 +10568,25 @@ class SupportedBuildpackResourceProperties(_serialization.Model):
:ivar buildpack_id: The id of supported buildpack.
:vartype buildpack_id: str
+ :ivar version: The version of supported buildpack.
+ :vartype version: str
"""
_attribute_map = {
"buildpack_id": {"key": "buildpackId", "type": "str"},
+ "version": {"key": "version", "type": "str"},
}
- def __init__(self, *, buildpack_id: Optional[str] = None, **kwargs: Any) -> None:
+ def __init__(self, *, buildpack_id: Optional[str] = None, version: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword buildpack_id: The id of supported buildpack.
:paramtype buildpack_id: str
+ :keyword version: The version of supported buildpack.
+ :paramtype version: str
"""
super().__init__(**kwargs)
self.buildpack_id = buildpack_id
+ self.version = version
class SupportedBuildpacksCollection(_serialization.Model):
@@ -9391,7 +10628,7 @@ class SupportedRuntimeVersion(_serialization.Model):
"""Supported deployment runtime version descriptor.
:ivar value: The raw value which could be passed to deployment CRUD operations. Known values
- are: "Java_8", "Java_11", "Java_17", and "NetCore_31".
+ are: "Java_8", "Java_11", "Java_17", "Java_21", and "NetCore_31".
:vartype value: str or ~azure.mgmt.appplatform.models.SupportedRuntimeValue
:ivar platform: The platform of this runtime version (possible values: "Java" or ".NET"). Known
values are: "Java" and ".NET Core".
@@ -9416,7 +10653,7 @@ def __init__(
) -> None:
"""
:keyword value: The raw value which could be passed to deployment CRUD operations. Known values
- are: "Java_8", "Java_11", "Java_17", and "NetCore_31".
+ are: "Java_8", "Java_11", "Java_17", "Java_21", and "NetCore_31".
:paramtype value: str or ~azure.mgmt.appplatform.models.SupportedRuntimeValue
:keyword platform: The platform of this runtime version (possible values: "Java" or ".NET").
Known values are: "Java" and ".NET Core".
@@ -9602,6 +10839,48 @@ def __init__(
self.next_link = next_link
+class SystemAssignedServiceIdentity(_serialization.Model):
+ """Managed service identity (either system assigned, or none).
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar principal_id: The service principal ID of the system assigned identity. This property
+ will only be provided for a system assigned identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
+ provided for a system assigned identity.
+ :vartype tenant_id: str
+ :ivar type: Type of managed service identity (either system assigned, or none). Required. Known
+ values are: "None" and "SystemAssigned".
+ :vartype type: str or ~azure.mgmt.appplatform.models.SystemAssignedServiceIdentityType
+ """
+
+ _validation = {
+ "principal_id": {"readonly": True},
+ "tenant_id": {"readonly": True},
+ "type": {"required": True},
+ }
+
+ _attribute_map = {
+ "principal_id": {"key": "principalId", "type": "str"},
+ "tenant_id": {"key": "tenantId", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ }
+
+ def __init__(self, *, type: Union[str, "_models.SystemAssignedServiceIdentityType"], **kwargs: Any) -> None:
+ """
+ :keyword type: Type of managed service identity (either system assigned, or none). Required.
+ Known values are: "None" and "SystemAssigned".
+ :paramtype type: str or ~azure.mgmt.appplatform.models.SystemAssignedServiceIdentityType
+ """
+ super().__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
+
+
class SystemData(_serialization.Model):
"""Metadata pertaining to creation and last modification of the resource.
@@ -9666,6 +10945,38 @@ def __init__(
self.last_modified_at = last_modified_at
+class TcpScaleRule(_serialization.Model):
+ """Azure Spring Apps App Instance Tcp scaling rule.
+
+ :ivar metadata: Metadata properties to describe tcp scale rule.
+ :vartype metadata: dict[str, str]
+ :ivar auth: Authentication secrets for the tcp scale rule.
+ :vartype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+
+ _attribute_map = {
+ "metadata": {"key": "metadata", "type": "{str}"},
+ "auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ metadata: Optional[Dict[str, str]] = None,
+ auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword metadata: Metadata properties to describe tcp scale rule.
+ :paramtype metadata: dict[str, str]
+ :keyword auth: Authentication secrets for the tcp scale rule.
+ :paramtype auth: list[~azure.mgmt.appplatform.models.ScaleRuleAuth]
+ """
+ super().__init__(**kwargs)
+ self.metadata = metadata
+ self.auth = auth
+
+
class TCPSocketAction(ProbeAction):
"""TCPSocketAction describes an action based on opening a socket.
@@ -9951,3 +11262,51 @@ def __init__(
self.runtime_version = runtime_version
self.jvm_options = jvm_options
self.server_version = server_version
+
+
+class WeeklyMaintenanceScheduleConfiguration(MaintenanceScheduleConfiguration):
+ """Weekly planned maintenance.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar frequency: The frequency to run the maintenance job. Required. "Weekly"
+ :vartype frequency: str or ~azure.mgmt.appplatform.models.Frequency
+ :ivar hour: The hour to run the maintenance job. Required.
+ :vartype hour: int
+ :ivar duration: The duration time to run the maintenance job, specified in ISO8601 format, e.g.
+ PT8H.
+ :vartype duration: str
+ :ivar day: The day to run the maintenance job. Required. Known values are: "Monday", "Tuesday",
+ "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
+ :vartype day: str or ~azure.mgmt.appplatform.models.WeekDay
+ """
+
+ _validation = {
+ "frequency": {"required": True},
+ "hour": {"required": True, "maximum": 23, "minimum": 0},
+ "duration": {"readonly": True},
+ "day": {"required": True},
+ }
+
+ _attribute_map = {
+ "frequency": {"key": "frequency", "type": "str"},
+ "hour": {"key": "hour", "type": "int"},
+ "duration": {"key": "duration", "type": "str"},
+ "day": {"key": "day", "type": "str"},
+ }
+
+ def __init__(self, *, hour: int, day: Union[str, "_models.WeekDay"], **kwargs: Any) -> None:
+ """
+ :keyword hour: The hour to run the maintenance job. Required.
+ :paramtype hour: int
+ :keyword day: The day to run the maintenance job. Required. Known values are: "Monday",
+ "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
+ :paramtype day: str or ~azure.mgmt.appplatform.models.WeekDay
+ """
+ super().__init__(**kwargs)
+ self.frequency: str = "Weekly"
+ self.hour = hour
+ self.duration = None
+ self.day = day
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/__init__.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/__init__.py
index 71f15acbbfb3..291baeb1ed37 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/__init__.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/__init__.py
@@ -5,45 +5,57 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._services_operations import ServicesOperations
-from ._apms_operations import ApmsOperations
-from ._config_servers_operations import ConfigServersOperations
-from ._configuration_services_operations import ConfigurationServicesOperations
-from ._service_registries_operations import ServiceRegistriesOperations
-from ._application_live_views_operations import ApplicationLiveViewsOperations
-from ._dev_tool_portals_operations import DevToolPortalsOperations
-from ._container_registries_operations import ContainerRegistriesOperations
-from ._build_service_operations import BuildServiceOperations
-from ._buildpack_binding_operations import BuildpackBindingOperations
-from ._build_service_builder_operations import BuildServiceBuilderOperations
-from ._build_service_agent_pool_operations import BuildServiceAgentPoolOperations
-from ._monitoring_settings_operations import MonitoringSettingsOperations
-from ._apps_operations import AppsOperations
-from ._bindings_operations import BindingsOperations
-from ._storages_operations import StoragesOperations
-from ._certificates_operations import CertificatesOperations
-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
-from ._gateways_operations import GatewaysOperations
-from ._gateway_route_configs_operations import GatewayRouteConfigsOperations
-from ._gateway_custom_domains_operations import GatewayCustomDomainsOperations
-from ._api_portals_operations import ApiPortalsOperations
-from ._api_portal_custom_domains_operations import ApiPortalCustomDomainsOperations
-from ._application_accelerators_operations import ApplicationAcceleratorsOperations
-from ._customized_accelerators_operations import CustomizedAcceleratorsOperations
-from ._predefined_accelerators_operations import PredefinedAcceleratorsOperations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._services_operations import ServicesOperations # type: ignore
+from ._apms_operations import ApmsOperations # type: ignore
+from ._eureka_servers_operations import EurekaServersOperations # type: ignore
+from ._config_servers_operations import ConfigServersOperations # type: ignore
+from ._configuration_services_operations import ConfigurationServicesOperations # type: ignore
+from ._service_registries_operations import ServiceRegistriesOperations # type: ignore
+from ._application_live_views_operations import ApplicationLiveViewsOperations # type: ignore
+from ._dev_tool_portals_operations import DevToolPortalsOperations # type: ignore
+from ._container_registries_operations import ContainerRegistriesOperations # type: ignore
+from ._build_service_operations import BuildServiceOperations # type: ignore
+from ._buildpack_binding_operations import BuildpackBindingOperations # type: ignore
+from ._build_service_builder_operations import BuildServiceBuilderOperations # type: ignore
+from ._build_service_agent_pool_operations import BuildServiceAgentPoolOperations # type: ignore
+from ._monitoring_settings_operations import MonitoringSettingsOperations # type: ignore
+from ._apps_operations import AppsOperations # type: ignore
+from ._bindings_operations import BindingsOperations # type: ignore
+from ._storages_operations import StoragesOperations # type: ignore
+from ._certificates_operations import CertificatesOperations # type: ignore
+from ._custom_domains_operations import CustomDomainsOperations # type: ignore
+from ._deployments_operations import DeploymentsOperations # type: ignore
+from ._operations import Operations # type: ignore
+from ._runtime_versions_operations import RuntimeVersionsOperations # type: ignore
+from ._skus_operations import SkusOperations # type: ignore
+from ._gateways_operations import GatewaysOperations # type: ignore
+from ._gateway_route_configs_operations import GatewayRouteConfigsOperations # type: ignore
+from ._gateway_custom_domains_operations import GatewayCustomDomainsOperations # type: ignore
+from ._api_portals_operations import ApiPortalsOperations # type: ignore
+from ._api_portal_custom_domains_operations import ApiPortalCustomDomainsOperations # type: ignore
+from ._application_accelerators_operations import ApplicationAcceleratorsOperations # type: ignore
+from ._customized_accelerators_operations import CustomizedAcceleratorsOperations # type: ignore
+from ._predefined_accelerators_operations import PredefinedAcceleratorsOperations # type: ignore
+from ._jobs_operations import JobsOperations # type: ignore
+from ._job_operations import JobOperations # type: ignore
+from ._job_execution_operations import JobExecutionOperations # type: ignore
+from ._job_executions_operations import JobExecutionsOperations # type: ignore
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
"ServicesOperations",
"ApmsOperations",
+ "EurekaServersOperations",
"ConfigServersOperations",
"ConfigurationServicesOperations",
"ServiceRegistriesOperations",
@@ -72,6 +84,10 @@
"ApplicationAcceleratorsOperations",
"CustomizedAcceleratorsOperations",
"PredefinedAcceleratorsOperations",
+ "JobsOperations",
+ "JobOperations",
+ "JobExecutionOperations",
+ "JobExecutionsOperations",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portal_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portal_custom_domains_operations.py
index 791e95f0f5e2..3d6905f76bb4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portal_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portal_custom_domains_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -55,7 +54,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -93,7 +92,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -134,7 +133,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -167,7 +166,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -231,7 +230,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ApiPortalCustomDomainResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -284,7 +283,7 @@ def _create_or_update_initial(
api_portal_custom_domain_resource: Union[_models.ApiPortalCustomDomainResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -501,7 +500,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, api_portal_name: str, domain_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -636,7 +635,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApiPortalCustomDomainResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portals_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portals_operations.py
index 2535eb8ceac9..733db7c9bf9c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portals_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_api_portals_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +81,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -117,7 +116,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -147,7 +146,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -178,7 +177,7 @@ def build_validate_domain_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -243,7 +242,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ApiPortalResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -294,7 +293,7 @@ def _create_or_update_initial(
api_portal_resource: Union[_models.ApiPortalResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -493,7 +492,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, api_portal_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -618,7 +617,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApiPortalResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -765,7 +764,7 @@ def validate_domain(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainValidateResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apms_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apms_operations.py
index acf0cea5fa94..3b6a4544d541 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apms_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apms_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +78,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -111,7 +110,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -146,7 +145,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -178,7 +177,7 @@ def build_list_secret_keys_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -242,7 +241,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApmResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -319,7 +318,7 @@ def get(self, resource_group_name: str, service_name: str, apm_name: str, **kwar
:rtype: ~azure.mgmt.appplatform.models.ApmResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -370,7 +369,7 @@ def _create_or_update_initial(
apm_resource: Union[_models.ApmResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -569,7 +568,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, apm_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -698,7 +697,7 @@ def list_secret_keys(
:rtype: ~azure.mgmt.appplatform.models.ApmSecretKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_accelerators_operations.py
index 4559adc3dbe7..aa02a571fa46 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_accelerators_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +78,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +112,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +149,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -220,7 +219,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApplicationAcceleratorResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -299,7 +298,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ApplicationAcceleratorResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -350,7 +349,7 @@ def _create_or_update_initial(
application_accelerator_resource: Union[_models.ApplicationAcceleratorResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -556,7 +555,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, application_accelerator_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_live_views_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_live_views_operations.py
index fe8aa1198078..66efdbefb57c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_live_views_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_application_live_views_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +78,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +112,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +149,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -220,7 +219,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ApplicationLiveViewResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -299,7 +298,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ApplicationLiveViewResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -350,7 +349,7 @@ def _create_or_update_initial(
application_live_view_resource: Union[_models.ApplicationLiveViewResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -554,7 +553,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, application_live_view_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apps_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apps_operations.py
index 45df5f1044f5..0e96cba78460 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apps_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_apps_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -56,7 +56,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -90,7 +90,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -125,7 +125,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -157,7 +157,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -190,7 +190,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -221,7 +221,7 @@ def build_get_resource_upload_url_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -253,7 +253,7 @@ def build_set_active_deployments_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -288,7 +288,7 @@ def build_validate_domain_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -360,7 +360,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.AppResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -412,7 +412,7 @@ def _create_or_update_initial(
app_resource: Union[_models.AppResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -611,7 +611,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -725,7 +725,7 @@ def _update_initial(
app_resource: Union[_models.AppResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -940,7 +940,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AppResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1019,7 +1019,7 @@ def get_resource_upload_url(
:rtype: ~azure.mgmt.appplatform.models.ResourceUploadDefinition
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1070,7 +1070,7 @@ def _set_active_deployments_initial(
active_deployment_collection: Union[_models.ActiveDeploymentCollection, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1352,7 +1352,7 @@ def validate_domain(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainValidateResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_bindings_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_bindings_operations.py
index c274415edf53..0d62745c9696 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_bindings_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_bindings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -83,7 +82,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -119,7 +118,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -152,7 +151,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -188,7 +187,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +251,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.BindingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -305,7 +304,7 @@ def _create_or_update_initial(
binding_resource: Union[_models.BindingResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -515,7 +514,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, binding_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -634,7 +633,7 @@ def _update_initial(
binding_resource: Union[_models.BindingResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -864,7 +863,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BindingResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_agent_pool_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_agent_pool_operations.py
index d0c0407e3d5b..2b4690f5cdf3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_agent_pool_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_agent_pool_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,7 +86,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -125,7 +124,7 @@ def build_update_put_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -199,7 +198,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildServiceAgentPoolResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -281,7 +280,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.BuildServiceAgentPoolResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -334,7 +333,7 @@ def _update_put_initial(
agent_pool_resource: Union[_models.BuildServiceAgentPoolResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_builder_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_builder_operations.py
index c8ba19d73653..77524dae16d1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_builder_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_builder_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -55,7 +54,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -93,7 +92,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -134,7 +133,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -167,7 +166,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -204,7 +203,7 @@ def build_list_deployments_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -269,7 +268,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.BuilderResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +321,7 @@ def _create_or_update_initial(
builder_resource: Union[_models.BuilderResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -532,7 +531,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, build_service_name: str, builder_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -665,7 +664,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuilderResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -747,7 +746,7 @@ def list_deployments(
:rtype: ~azure.mgmt.appplatform.models.DeploymentList
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_operations.py
index c6152c708bbd..9bf3f106fa61 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_build_service_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +50,7 @@ def build_list_build_services_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -81,7 +81,7 @@ def build_get_build_service_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -148,7 +148,7 @@ def build_list_builds_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -185,7 +185,7 @@ def build_get_build_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -223,7 +223,7 @@ def build_create_or_update_build_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -264,7 +264,7 @@ def build_delete_build_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -302,7 +302,7 @@ def build_list_build_results_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -341,7 +341,7 @@ def build_get_build_result_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -381,7 +381,7 @@ def build_get_build_result_log_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -415,7 +415,7 @@ def build_get_resource_upload_url_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -447,7 +447,7 @@ def build_list_supported_buildpacks_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -484,7 +484,7 @@ def build_get_supported_buildpack_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -517,7 +517,7 @@ def build_list_supported_stacks_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -554,7 +554,7 @@ def build_get_supported_stack_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -621,7 +621,7 @@ def list_build_services(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildServiceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -700,7 +700,7 @@ def get_build_service(
:rtype: ~azure.mgmt.appplatform.models.BuildService
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -751,7 +751,7 @@ def _create_or_update_initial(
build_service: Union[_models.BuildService, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -972,7 +972,7 @@ def list_builds(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1054,7 +1054,7 @@ def get_build(
:rtype: ~azure.mgmt.appplatform.models.Build
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1192,7 +1192,7 @@ def create_or_update_build(
:rtype: ~azure.mgmt.appplatform.models.Build
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1251,7 +1251,7 @@ def create_or_update_build(
def _delete_build_initial(
self, resource_group_name: str, service_name: str, build_service_name: str, build_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1392,7 +1392,7 @@ def list_build_results(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildResultCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1483,7 +1483,7 @@ def get_build_result(
:rtype: ~azure.mgmt.appplatform.models.BuildResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1555,7 +1555,7 @@ def get_build_result_log(
:rtype: ~azure.mgmt.appplatform.models.BuildResultLog
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1617,7 +1617,7 @@ def get_resource_upload_url(
:rtype: ~azure.mgmt.appplatform.models.ResourceUploadDefinition
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1677,7 +1677,7 @@ def list_supported_buildpacks(
:rtype: ~azure.mgmt.appplatform.models.SupportedBuildpacksCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1739,7 +1739,7 @@ def get_supported_buildpack(
:rtype: ~azure.mgmt.appplatform.models.SupportedBuildpackResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1800,7 +1800,7 @@ def list_supported_stacks(
:rtype: ~azure.mgmt.appplatform.models.SupportedStacksCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1862,7 +1862,7 @@ def get_supported_stack(
:rtype: ~azure.mgmt.appplatform.models.SupportedStackResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_buildpack_binding_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_buildpack_binding_operations.py
index f17c3855d2c1..2f4647aa7421 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_buildpack_binding_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_buildpack_binding_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_list_for_cluster_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,7 +86,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -127,7 +126,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -170,7 +169,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -209,7 +208,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -277,7 +276,7 @@ def list_for_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildpackBindingResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -366,7 +365,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.BuildpackBindingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -421,7 +420,7 @@ def _create_or_update_initial(
buildpack_binding: Union[_models.BuildpackBindingResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -650,7 +649,7 @@ def _delete_initial(
buildpack_binding_name: str,
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -796,7 +795,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.BuildpackBindingResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_certificates_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_certificates_operations.py
index c075c3dea97c..b3479f01b610 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_certificates_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_certificates_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +81,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -117,7 +116,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -147,7 +146,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -208,7 +207,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.CertificateResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -259,7 +258,7 @@ def _create_or_update_initial(
certificate_resource: Union[_models.CertificateResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -458,7 +457,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, certificate_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -585,7 +584,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_config_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_config_servers_operations.py
index 31aefc78584d..c836a9803576 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_config_servers_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_config_servers_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -20,6 +21,7 @@
StreamConsumedError,
map_error,
)
+from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.core.rest import HttpRequest, HttpResponse
@@ -34,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -46,7 +48,7 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -77,7 +79,7 @@ def build_update_put_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -111,7 +113,7 @@ def build_update_patch_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -139,13 +141,73 @@ def build_update_patch_request(
return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+def build_delete_request(
+ resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_list_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
def build_validate_request(
resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -205,7 +267,7 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo
:rtype: ~azure.mgmt.appplatform.models.ConfigServerResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -254,7 +316,7 @@ def _update_put_initial(
config_server_resource: Union[_models.ConfigServerResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -446,7 +508,7 @@ def _update_patch_initial(
config_server_resource: Union[_models.ConfigServerResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -631,6 +693,195 @@ def get_long_running_output(pipeline_response):
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
+ def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_delete_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_delete(self, resource_group_name: str, service_name: str, **kwargs: Any) -> LROPoller[None]:
+ """Disable the default Config Server, only available in Enterprise Plan.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ @distributed_trace
+ def list(
+ self, resource_group_name: str, service_name: str, **kwargs: Any
+ ) -> Iterable["_models.ConfigServerResource"]:
+ """Handles requests to list all config server resources in a Service.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: An iterator like instance of either ConfigServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.models.ConfigServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.ConfigServerResourceCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("ConfigServerResourceCollection", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
def _validate_initial(
self,
resource_group_name: str,
@@ -638,7 +889,7 @@ def _validate_initial(
config_server_settings: Union[_models.ConfigServerSettings, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_configuration_services_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_configuration_services_operations.py
index 1c69f3e8e9c9..26534cbc09d4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_configuration_services_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_configuration_services_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +50,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -84,7 +84,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -121,7 +121,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -153,7 +153,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -184,7 +184,7 @@ def build_validate_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -221,7 +221,7 @@ def build_validate_resource_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -288,7 +288,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ConfigurationServiceResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -339,7 +339,7 @@ def _create_or_update_initial(
configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -546,7 +546,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, configuration_service_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -675,7 +675,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConfigurationServiceResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -745,7 +745,7 @@ def _validate_initial(
settings: Union[_models.ConfigurationServiceSettings, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -956,7 +956,7 @@ def _validate_resource_initial(
configuration_service_resource: Union[_models.ConfigurationServiceResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_container_registries_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_container_registries_operations.py
index 34a9f20951ce..fb0c4a74bf73 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_container_registries_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_container_registries_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +78,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +112,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +149,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -184,7 +183,7 @@ def build_validate_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -256,7 +255,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerRegistryResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -335,7 +334,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ContainerRegistryResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -386,7 +385,7 @@ def _create_or_update_initial(
container_registry_resource: Union[_models.ContainerRegistryResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -588,7 +587,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, container_registry_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -708,7 +707,7 @@ def _validate_initial(
container_registry_properties: Union[_models.ContainerRegistryProperties, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_custom_domains_operations.py
index ff8c0fba2c3d..d52cc0abc261 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_custom_domains_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -83,7 +82,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -119,7 +118,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -152,7 +151,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -188,7 +187,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +251,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -305,7 +304,7 @@ def _create_or_update_initial(
domain_resource: Union[_models.CustomDomainResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -515,7 +514,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, domain_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -634,7 +633,7 @@ def _update_initial(
domain_resource: Union[_models.CustomDomainResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -865,7 +864,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CustomDomainResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_customized_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_customized_accelerators_operations.py
index c57561296e52..56511a984bbb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_customized_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_customized_accelerators_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -89,7 +88,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -131,7 +130,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -176,7 +175,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -218,7 +217,7 @@ def build_validate_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -296,7 +295,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CustomizedAcceleratorResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -383,7 +382,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.CustomizedAcceleratorResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -436,7 +435,7 @@ def _create_or_update_initial(
customized_accelerator_resource: Union[_models.CustomizedAcceleratorResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -658,7 +657,7 @@ def _delete_initial(
customized_accelerator_name: str,
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -786,7 +785,7 @@ def _validate_initial(
properties: Union[_models.CustomizedAcceleratorProperties, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_deployments_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_deployments_operations.py
index 1d09496ea69b..15fef7fc3df2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_deployments_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_deployments_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -55,7 +55,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -93,7 +93,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -134,7 +134,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -172,7 +172,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -209,12 +209,13 @@ def build_list_request(
subscription_id: str,
*,
version: Optional[List[str]] = None,
+ expand: Optional[str] = None,
**kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -235,6 +236,8 @@ def build_list_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
if version is not None:
_params["version"] = [_SERIALIZER.query("version", q, "str") if q is not None else "" for q in version]
+ if expand is not None:
+ _params["$expand"] = _SERIALIZER.query("expand", expand, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
@@ -254,7 +257,7 @@ def build_list_for_cluster_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -294,7 +297,7 @@ def build_start_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -332,7 +335,7 @@ def build_stop_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -370,7 +373,7 @@ def build_restart_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -408,7 +411,7 @@ def build_enable_remote_debugging_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -449,7 +452,7 @@ def build_disable_remote_debugging_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -487,7 +490,7 @@ def build_get_remote_debugging_config_request( # pylint: disable=name-too-long
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -525,7 +528,7 @@ def build_get_log_file_url_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -563,7 +566,7 @@ def build_generate_heap_dump_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -604,7 +607,7 @@ def build_generate_thread_dump_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -645,7 +648,7 @@ def build_start_jfr_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -713,7 +716,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.DeploymentResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -766,7 +769,7 @@ def _create_or_update_initial(
deployment_resource: Union[_models.DeploymentResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -976,7 +979,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1095,7 +1098,7 @@ def _update_initial(
deployment_resource: Union[_models.DeploymentResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1309,6 +1312,7 @@ def list(
service_name: str,
app_name: str,
version: Optional[List[str]] = None,
+ expand: Optional[str] = None,
**kwargs: Any
) -> Iterable["_models.DeploymentResource"]:
"""Handles requests to list all resources in an App.
@@ -1322,6 +1326,8 @@ def list(
:type app_name: str
:param version: Version of the deployments to be listed. Default value is None.
:type version: list[str]
+ :param expand: The expand expression to apply on the operation. Default value is None.
+ :type expand: str
:return: An iterator like instance of either DeploymentResource or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.models.DeploymentResource]
:raises ~azure.core.exceptions.HttpResponseError:
@@ -1332,7 +1338,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeploymentResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1349,6 +1355,7 @@ def prepare_request(next_link=None):
app_name=app_name,
subscription_id=self._config.subscription_id,
version=version,
+ expand=expand,
api_version=api_version,
headers=_headers,
params=_params,
@@ -1426,7 +1433,7 @@ def list_for_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeploymentResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1493,7 +1500,7 @@ def get_next(next_link=None):
def _start_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1606,7 +1613,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
def _stop_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1719,7 +1726,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
def _restart_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1838,7 +1845,7 @@ def _enable_remote_debugging_initial(
remote_debugging_payload: Optional[Union[_models.RemoteDebuggingPayload, IO[bytes]]] = None,
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2052,7 +2059,7 @@ def get_long_running_output(pipeline_response):
def _disable_remote_debugging_initial(
self, resource_group_name: str, service_name: str, app_name: str, deployment_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2186,7 +2193,7 @@ def get_remote_debugging_config(
:rtype: ~azure.mgmt.appplatform.models.RemoteDebugging
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2249,7 +2256,7 @@ def get_log_file_url(
:rtype: ~azure.mgmt.appplatform.models.LogFileUrlResponse or None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2304,7 +2311,7 @@ def _generate_heap_dump_initial(
diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2513,7 +2520,7 @@ def _generate_thread_dump_initial(
diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2722,7 +2729,7 @@ def _start_jfr_initial(
diagnostic_parameters: Union[_models.DiagnosticParameters, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_dev_tool_portals_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_dev_tool_portals_operations.py
index 6c57dd8854cd..6861d19a8267 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_dev_tool_portals_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_dev_tool_portals_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +78,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +112,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +149,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -219,7 +218,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DevToolPortalResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -298,7 +297,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.DevToolPortalResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +348,7 @@ def _create_or_update_initial(
dev_tool_portal_resource: Union[_models.DevToolPortalResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -549,7 +548,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, dev_tool_portal_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_eureka_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_eureka_servers_operations.py
new file mode 100644
index 000000000000..8ed4fe5e541c
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_eureka_servers_operations.py
@@ -0,0 +1,695 @@
+# 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.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_get_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers/default",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_update_put_request(
+ resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers/default",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_update_patch_request(
+ resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers/default",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class EurekaServersOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.AppPlatformManagementClient`'s
+ :attr:`eureka_servers` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def list(
+ self, resource_group_name: str, service_name: str, **kwargs: Any
+ ) -> _models.EurekaServerResourceCollection:
+ """List the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: EurekaServerResourceCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EurekaServerResourceCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EurekaServerResourceCollection] = kwargs.pop("cls", None)
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EurekaServerResourceCollection", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _models.EurekaServerResource:
+ """Get the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: EurekaServerResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EurekaServerResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EurekaServerResource", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _update_put_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(eureka_server_resource, (IOBase, bytes)):
+ _content = eureka_server_resource
+ else:
+ _json = self._serialize.body(eureka_server_resource, "EurekaServerResource")
+
+ _request = build_update_put_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 201:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_update_put(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: _models.EurekaServerResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either EurekaServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_update_put(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either EurekaServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_update_put(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Is either a
+ EurekaServerResource type or a IO[bytes] type. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource or IO[bytes]
+ :return: An instance of LROPoller that returns either EurekaServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._update_put_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ eureka_server_resource=eureka_server_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("EurekaServerResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.EurekaServerResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.EurekaServerResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _update_patch_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(eureka_server_resource, (IOBase, bytes)):
+ _content = eureka_server_resource
+ else:
+ _json = self._serialize.body(eureka_server_resource, "EurekaServerResource")
+
+ _request = build_update_patch_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_update_patch(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: _models.EurekaServerResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either EurekaServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_update_patch(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Required.
+ :type eureka_server_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either EurekaServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_update_patch(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ eureka_server_resource: Union[_models.EurekaServerResource, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.EurekaServerResource]:
+ """Update the eureka server settings.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param eureka_server_resource: Parameters for the update operation. Is either a
+ EurekaServerResource type or a IO[bytes] type. Required.
+ :type eureka_server_resource: ~azure.mgmt.appplatform.models.EurekaServerResource or IO[bytes]
+ :return: An instance of LROPoller that returns either EurekaServerResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.EurekaServerResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.EurekaServerResource] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._update_patch_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ eureka_server_resource=eureka_server_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("EurekaServerResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.EurekaServerResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.EurekaServerResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_custom_domains_operations.py
index 4ab7af33c130..75bccf3c7a8d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_custom_domains_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -55,7 +54,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -93,7 +92,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -134,7 +133,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -167,7 +166,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -231,7 +230,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.GatewayCustomDomainResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -284,7 +283,7 @@ def _create_or_update_initial(
gateway_custom_domain_resource: Union[_models.GatewayCustomDomainResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -501,7 +500,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, domain_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -636,7 +635,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.GatewayCustomDomainResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_route_configs_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_route_configs_operations.py
index fdebe48e2ebd..8b2eca43bcf3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_route_configs_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateway_route_configs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -55,7 +54,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -93,7 +92,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -134,7 +133,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -167,7 +166,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -231,7 +230,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.GatewayRouteConfigResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -284,7 +283,7 @@ def _create_or_update_initial(
gateway_route_config_resource: Union[_models.GatewayRouteConfigResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -503,7 +502,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, route_config_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -637,7 +636,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.GatewayRouteConfigResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateways_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateways_operations.py
index 025a16a6b510..a4a985131441 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateways_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_gateways_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +50,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +82,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -111,13 +111,48 @@ def build_create_or_update_request(
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+def build_update_capacity_request(
+ resource_group_name: str, service_name: str, gateway_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, "str", pattern=r"^[a-z][a-z0-9]*$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+
+
def build_delete_request(
resource_group_name: str, service_name: str, gateway_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -149,7 +184,7 @@ def build_list_env_secrets_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +216,7 @@ def build_restart_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -211,7 +246,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -242,7 +277,7 @@ def build_validate_domain_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -307,7 +342,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.GatewayResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -358,7 +393,7 @@ def _create_or_update_initial(
gateway_resource: Union[_models.GatewayResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -554,10 +589,220 @@ def get_long_running_output(pipeline_response):
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)
+ def _update_capacity_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: Union[_models.SkuObject, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(gateway_capacity_resource, (IOBase, bytes)):
+ _content = gateway_capacity_resource
+ else:
+ _json = self._serialize.body(gateway_capacity_resource, "SkuObject")
+
+ _request = build_update_capacity_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ gateway_name=gateway_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_update_capacity(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: _models.SkuObject,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.GatewayResource]:
+ """Operation to update an exiting Spring Cloud Gateway capacity.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param gateway_name: The name of Spring Cloud Gateway. Required.
+ :type gateway_name: str
+ :param gateway_capacity_resource: The gateway capacity for the update operation. Required.
+ :type gateway_capacity_resource: ~azure.mgmt.appplatform.models.SkuObject
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either GatewayResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.GatewayResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_update_capacity(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.GatewayResource]:
+ """Operation to update an exiting Spring Cloud Gateway capacity.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param gateway_name: The name of Spring Cloud Gateway. Required.
+ :type gateway_name: str
+ :param gateway_capacity_resource: The gateway capacity for the update operation. Required.
+ :type gateway_capacity_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either GatewayResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.GatewayResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_update_capacity(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ gateway_name: str,
+ gateway_capacity_resource: Union[_models.SkuObject, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.GatewayResource]:
+ """Operation to update an exiting Spring Cloud Gateway capacity.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param gateway_name: The name of Spring Cloud Gateway. Required.
+ :type gateway_name: str
+ :param gateway_capacity_resource: The gateway capacity for the update operation. Is either a
+ SkuObject type or a IO[bytes] type. Required.
+ :type gateway_capacity_resource: ~azure.mgmt.appplatform.models.SkuObject or IO[bytes]
+ :return: An instance of LROPoller that returns either GatewayResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.GatewayResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.GatewayResource] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._update_capacity_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ gateway_name=gateway_name,
+ gateway_capacity_resource=gateway_capacity_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("GatewayResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.GatewayResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.GatewayResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
def _delete_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -680,7 +925,7 @@ def list_env_secrets(
:rtype: dict[str, str]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -726,7 +971,7 @@ def list_env_secrets(
def _restart_initial(
self, resource_group_name: str, service_name: str, gateway_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -857,7 +1102,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.GatewayResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1004,7 +1249,7 @@ def validate_domain(
:rtype: ~azure.mgmt.appplatform.models.CustomDomainValidateResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_execution_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_execution_operations.py
new file mode 100644
index 000000000000..9b6adfec522b
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_execution_operations.py
@@ -0,0 +1,424 @@
+# 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 sys
+from typing import Any, Callable, Dict, Iterator, Optional, TypeVar, Union, cast
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_cancel_request(
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_execution_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}/executions/{jobExecutionName}/cancel",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobExecutionName": _SERIALIZER.url(
+ "job_execution_name", job_execution_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_get_request(
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_execution_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}/executions/{jobExecutionName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobExecutionName": _SERIALIZER.url(
+ "job_execution_name", job_execution_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_list_env_secrets_request(
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_execution_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}/executions/{jobExecutionName}/listEnvSecrets",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobExecutionName": _SERIALIZER.url(
+ "job_execution_name", job_execution_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class JobExecutionOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.AppPlatformManagementClient`'s
+ :attr:`job_execution` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ def _cancel_initial(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_cancel_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_cancel(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Terminate execution of a running Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_execution_name: The name of the Job execution. Required.
+ :type job_execution_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._cancel_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ @distributed_trace
+ def get(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> _models.JobExecution:
+ """Get details of an execution of an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_execution_name: The name of the Job execution. Required.
+ :type job_execution_name: str
+ :return: JobExecution or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.JobExecution
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobExecution] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("JobExecution", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def list_env_secrets(
+ self, resource_group_name: str, service_name: str, job_name: str, job_execution_name: str, **kwargs: Any
+ ) -> _models.EnvSecretsCollection:
+ """List sensitive environment variables of Job execution.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_execution_name: The name of the Job execution. Required.
+ :type job_execution_name: str
+ :return: EnvSecretsCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EnvSecretsCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EnvSecretsCollection] = kwargs.pop("cls", None)
+
+ _request = build_list_env_secrets_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_execution_name=job_execution_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EnvSecretsCollection", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_executions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_executions_operations.py
new file mode 100644
index 000000000000..6c61c3ce51ae
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_executions_operations.py
@@ -0,0 +1,176 @@
+# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_request(
+ resource_group_name: str, service_name: str, job_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}/executions",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class JobExecutionsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.AppPlatformManagementClient`'s
+ :attr:`job_executions` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def list(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> Iterable["_models.JobExecution"]:
+ """Get executions of a Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: An iterator like instance of either JobExecution or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobExecutionCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("JobExecutionCollection", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_operations.py
new file mode 100644
index 000000000000..87ff3772b6bd
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_job_operations.py
@@ -0,0 +1,881 @@
+# 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.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_get_request(
+ resource_group_name: str, service_name: str, job_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_create_or_update_request(
+ resource_group_name: str, service_name: str, job_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_delete_request(
+ resource_group_name: str, service_name: str, job_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_start_request(
+ resource_group_name: str, service_name: str, job_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}/start",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_list_env_secrets_request(
+ resource_group_name: str, service_name: str, job_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs/{jobName}/listEnvSecrets",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ "jobName": _SERIALIZER.url("job_name", job_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class JobOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.AppPlatformManagementClient`'s
+ :attr:`job` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def get(self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any) -> _models.JobResource:
+ """Get a Job and its properties.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: JobResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.JobResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("JobResource", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: Union[_models.JobResource, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(job_resource, (IOBase, bytes)):
+ _content = job_resource
+ else:
+ _json = self._serialize.body(job_resource, "JobResource")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: _models.JobResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.JobResource]:
+ """Create a new Job or update an exiting Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_resource: Parameters for the create or update operation. Required.
+ :type job_resource: ~azure.mgmt.appplatform.models.JobResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either JobResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.JobResource]:
+ """Create a new Job or update an exiting Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_resource: Parameters for the create or update operation. Required.
+ :type job_resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either JobResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ job_resource: Union[_models.JobResource, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.JobResource]:
+ """Create a new Job or update an exiting Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param job_resource: Parameters for the create or update operation. Is either a JobResource
+ type or a IO[bytes] type. Required.
+ :type job_resource: ~azure.mgmt.appplatform.models.JobResource or IO[bytes]
+ :return: An instance of LROPoller that returns either JobResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.JobResource] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ job_resource=job_resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("JobResource", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.JobResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.JobResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _delete_initial(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_delete_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Operation to delete a Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _start_initial(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[Union[_models.JobExecutionTemplate, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(template, (IOBase, bytes)):
+ _content = template
+ else:
+ if template is not None:
+ _json = self._serialize.body(template, "JobExecutionTemplate")
+ else:
+ _json = None
+
+ _request = build_start_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_start(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[_models.JobExecutionTemplate] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.JobExecution]:
+ """Start an Azure Spring Apps Job.
+
+ Start an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param template: Template used to start a Job execution. Default value is None.
+ :type template: ~azure.mgmt.appplatform.models.JobExecutionTemplate
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either JobExecution or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_start(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.JobExecution]:
+ """Start an Azure Spring Apps Job.
+
+ Start an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param template: Template used to start a Job execution. Default value is None.
+ :type template: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either JobExecution or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_start(
+ self,
+ resource_group_name: str,
+ service_name: str,
+ job_name: str,
+ template: Optional[Union[_models.JobExecutionTemplate, IO[bytes]]] = None,
+ **kwargs: Any
+ ) -> LROPoller[_models.JobExecution]:
+ """Start an Azure Spring Apps Job.
+
+ Start an Azure Spring Apps Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :param template: Template used to start a Job execution. Is either a JobExecutionTemplate type
+ or a IO[bytes] type. Default value is None.
+ :type template: ~azure.mgmt.appplatform.models.JobExecutionTemplate or IO[bytes]
+ :return: An instance of LROPoller that returns either JobExecution or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appplatform.models.JobExecution]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.JobExecution] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._start_initial(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ template=template,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("JobExecution", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.JobExecution].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.JobExecution](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ @distributed_trace
+ def list_env_secrets(
+ self, resource_group_name: str, service_name: str, job_name: str, **kwargs: Any
+ ) -> _models.EnvSecretsCollection:
+ """List sensitive environment variables of the Job.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :param job_name: The name of the Job resource. Required.
+ :type job_name: str
+ :return: EnvSecretsCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appplatform.models.EnvSecretsCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.EnvSecretsCollection] = kwargs.pop("cls", None)
+
+ _request = build_list_env_secrets_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ job_name=job_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("EnvSecretsCollection", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_jobs_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_jobs_operations.py
new file mode 100644
index 000000000000..252d2620eb1c
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_jobs_operations.py
@@ -0,0 +1,168 @@
+# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_request(resource_group_name: str, service_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/jobs",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
+ "serviceName": _SERIALIZER.url("service_name", service_name, "str", pattern=r"^[a-z][a-z0-9-]*[a-z0-9]$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class JobsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appplatform.AppPlatformManagementClient`'s
+ :attr:`jobs` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ input_args = list(args)
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
+ self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
+
+ @distributed_trace
+ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterable["_models.JobResource"]:
+ """Get the Azure Spring Apps Jobs in a given service.
+
+ :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. Required.
+ :type resource_group_name: str
+ :param service_name: The name of the Service resource. Required.
+ :type service_name: str
+ :return: An iterator like instance of either JobResource or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appplatform.models.JobResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.JobResourceCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ resource_group_name=resource_group_name,
+ service_name=service_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("JobResourceCollection", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_monitoring_settings_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_monitoring_settings_operations.py
index 14b88c32fcff..ed4c7d58b465 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_monitoring_settings_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_monitoring_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -34,7 +33,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -46,7 +45,7 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -77,7 +76,7 @@ def build_update_put_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -111,7 +110,7 @@ def build_update_patch_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -171,7 +170,7 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo
:rtype: ~azure.mgmt.appplatform.models.MonitoringSettingResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -220,7 +219,7 @@ def _update_put_initial(
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -413,7 +412,7 @@ def _update_patch_initial(
monitoring_setting_resource: Union[_models.MonitoringSettingResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_operations.py
index 58fac6de3278..6061caf7ec32 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +42,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -91,7 +90,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.OperationDetail"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AvailableOperations] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_predefined_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_predefined_accelerators_operations.py
index 2fb7086f3aa2..1efa7c9a9464 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_predefined_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_predefined_accelerators_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Iterator, Optional, Type, TypeVar, Union, cast
+from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, cast
import urllib.parse
from azure.core.exceptions import (
@@ -35,7 +34,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -88,7 +87,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -130,7 +129,7 @@ def build_disable_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -172,7 +171,7 @@ def build_enable_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -247,7 +246,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PredefinedAcceleratorResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -334,7 +333,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.PredefinedAcceleratorResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -386,7 +385,7 @@ def _disable_initial(
predefined_accelerator_name: str,
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -513,7 +512,7 @@ def _enable_initial(
predefined_accelerator_name: str,
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_runtime_versions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_runtime_versions_operations.py
index 27484cd3c487..df7f25cf2920 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_runtime_versions_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_runtime_versions_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -41,7 +40,7 @@ def build_list_runtime_versions_request(**kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -83,7 +82,7 @@ def list_runtime_versions(self, **kwargs: Any) -> _models.AvailableRuntimeVersio
:rtype: ~azure.mgmt.appplatform.models.AvailableRuntimeVersions
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_service_registries_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_service_registries_operations.py
index bd93f2070a23..f3adf9f08f0f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_service_registries_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_service_registries_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Iterator, Optional, Type, TypeVar, Union, cast
+from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, cast
import urllib.parse
from azure.core.exceptions import (
@@ -35,7 +34,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +48,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -81,7 +80,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +112,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -143,7 +142,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -204,7 +203,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.ServiceRegistryResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -250,7 +249,7 @@ def get(
def _create_or_update_initial(
self, resource_group_name: str, service_name: str, service_registry_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -364,7 +363,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, service_registry_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -492,7 +491,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ServiceRegistryResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_services_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_services_operations.py
index 69e828ab33a3..f67ac1177d28 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_services_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_services_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +48,7 @@ def build_get_request(resource_group_name: str, service_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -113,7 +113,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -144,7 +144,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -178,7 +178,7 @@ def build_list_test_keys_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -209,7 +209,7 @@ def build_regenerate_test_key_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -243,7 +243,7 @@ def build_disable_test_endpoint_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -274,7 +274,7 @@ def build_enable_test_endpoint_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -303,7 +303,7 @@ def build_stop_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -334,7 +334,7 @@ def build_start_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -365,7 +365,7 @@ def build_flush_vnet_dns_setting_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -396,7 +396,7 @@ def build_list_supported_apm_types_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -427,7 +427,7 @@ def build_list_globally_enabled_apms_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -458,7 +458,7 @@ def build_enable_apm_globally_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -492,7 +492,7 @@ def build_disable_apm_globally_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -524,7 +524,7 @@ def build_check_name_availability_request(location: str, subscription_id: str, *
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -555,7 +555,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -579,7 +579,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -609,7 +609,7 @@ def build_list_supported_server_versions_request( # pylint: disable=name-too-lo
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -666,7 +666,7 @@ def get(self, resource_group_name: str, service_name: str, **kwargs: Any) -> _mo
:rtype: ~azure.mgmt.appplatform.models.ServiceResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -715,7 +715,7 @@ def _create_or_update_initial(
resource: Union[_models.ServiceResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -901,7 +901,7 @@ def get_long_running_output(pipeline_response):
)
def _delete_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1008,7 +1008,7 @@ def _update_initial(
resource: Union[_models.ServiceResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1206,7 +1206,7 @@ def list_test_keys(self, resource_group_name: str, service_name: str, **kwargs:
:rtype: ~azure.mgmt.appplatform.models.TestKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1326,7 +1326,7 @@ def regenerate_test_key(
:rtype: ~azure.mgmt.appplatform.models.TestKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1395,7 +1395,7 @@ def disable_test_endpoint( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1446,7 +1446,7 @@ def enable_test_endpoint(self, resource_group_name: str, service_name: str, **kw
:rtype: ~azure.mgmt.appplatform.models.TestKeys
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1489,17 +1489,11 @@ def enable_test_endpoint(self, resource_group_name: str, service_name: str, **kw
return deserialized # type: ignore
def _stop_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: cast(
- Type[HttpResponseError],
- lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
- ),
- 409: cast(
- Type[HttpResponseError],
- lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat),
- ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -1532,7 +1526,7 @@ def _stop_initial(self, resource_group_name: str, service_name: str, **kwargs: A
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
- map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
@@ -1596,17 +1590,11 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
def _start_initial(self, resource_group_name: str, service_name: str, **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: cast(
- Type[HttpResponseError],
- lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
- ),
- 409: cast(
- Type[HttpResponseError],
- lambda response: ResourceExistsError(response=response, error_format=ARMErrorFormat),
- ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -1639,7 +1627,7 @@ def _start_initial(self, resource_group_name: str, service_name: str, **kwargs:
response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
- map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
@@ -1705,7 +1693,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
def _flush_vnet_dns_setting_initial(
self, resource_group_name: str, service_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1833,7 +1821,7 @@ def list_supported_apm_types(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SupportedApmTypes] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1910,7 +1898,7 @@ def list_globally_enabled_apms(
:rtype: ~azure.mgmt.appplatform.models.GloballyEnabledApms
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1955,7 +1943,7 @@ def list_globally_enabled_apms(
def _enable_apm_globally_initial(
self, resource_group_name: str, service_name: str, apm: Union[_models.ApmReference, IO[bytes]], **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2138,7 +2126,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
def _disable_apm_globally_initial(
self, resource_group_name: str, service_name: str, apm: Union[_models.ApmReference, IO[bytes]], **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2383,7 +2371,7 @@ def check_name_availability(
:rtype: ~azure.mgmt.appplatform.models.NameAvailability
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2450,7 +2438,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ServiceResour
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ServiceResourceList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2527,7 +2515,7 @@ def list(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.Ser
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ServiceResourceList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -2610,7 +2598,7 @@ def list_supported_server_versions(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SupportedServerVersions] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_skus_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_skus_operations.py
index 691808e45173..f9aae85db62c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_skus_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_skus_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +42,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -96,7 +95,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ResourceSku"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ResourceSkuCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_storages_operations.py b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_storages_operations.py
index 9e66b55a63c4..df248eb38fc8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_storages_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/operations/_storages_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +81,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -117,7 +116,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -147,7 +146,7 @@ def build_list_request(resource_group_name: str, service_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-12-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-05-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -208,7 +207,7 @@ def get(
:rtype: ~azure.mgmt.appplatform.models.StorageResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -259,7 +258,7 @@ def _create_or_update_initial(
storage_resource: Union[_models.StorageResource, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -458,7 +457,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, service_name: str, storage_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -583,7 +582,7 @@ def list(self, resource_group_name: str, service_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.StorageResourceCollection] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_create_or_update.py
index 58f58d25d217..dba797aba519 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_create_or_update.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortalCustomDomains_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortalCustomDomains_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_delete.py
index 61cf9f9e4ced..6f917bd16c5d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortalCustomDomains_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortalCustomDomains_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_get.py
index 4250799a063a..8a650fb0db5f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortalCustomDomains_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortalCustomDomains_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_list.py
index 7c0083d2c09a..2c3da6d9e83c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portal_custom_domains_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortalCustomDomains_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortalCustomDomains_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_create_or_update.py
index d0aaf4a7bb4c..aa5100e40d2d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_create_or_update.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortals_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortals_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_delete.py
index cb16f6acf3dd..7ec07d95bfa3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortals_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortals_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_get.py
index 095752069003..98517de6e5a7 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortals_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortals_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_list.py
index 0fe2dd9c7d02..50b5dd9d0b7e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortals_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortals_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_validate_domain.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_validate_domain.py
index f0b9914343c1..311599d6d3b0 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_validate_domain.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/api_portals_validate_domain.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApiPortals_ValidateDomain.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApiPortals_ValidateDomain.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_create_or_update.py
index ce8126a99fa8..c722001db98b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_create_or_update.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apms_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apms_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_delete.py
index 9643a6e5bdc7..7686ffc9a032 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apms_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apms_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_get.py
index f74b015b9e02..9c7fe44136c8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apms_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apms_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list.py
index 94f3afbdaa2b..34532cf94fdb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apms_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apms_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list_secret_keys.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list_secret_keys.py
index 8b2c4d8b838d..cbabde620a85 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list_secret_keys.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apms_list_secret_keys.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apms_ListSecretKeys.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apms_ListSecretKeys.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_create_or_update.py
index 77ffec071b86..2d512928ff60 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_create_or_update.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationAccelerators_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationAccelerators_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_delete.py
index 13010bbfcdef..16be77e21016 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationAccelerators_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationAccelerators_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_get.py
index 082a15462456..723139d0e476 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationAccelerators_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationAccelerators_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_list.py
index 74b71ac0a36f..3bef342763df 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_accelerators_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationAccelerators_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationAccelerators_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_view_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_view_delete.py
index 589fc7d2a5ba..92e45b927498 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_view_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_view_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationLiveView_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationLiveView_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_create_or_update.py
index 547f34527342..8916d0da0284 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_create_or_update.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationLiveViews_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationLiveViews_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_get.py
index 3b5c7a8da237..ec103362ea4d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationLiveViews_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationLiveViews_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_list.py
index 855fdeb05c21..2776e87794e2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/application_live_views_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ApplicationLiveViews_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ApplicationLiveViews_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update.py
index 0eb8ec3da1df..fcdc961d7ab6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update.py
@@ -87,12 +87,14 @@ def main():
"persistentDisk": {"mountPath": "/mypersistentdisk", "sizeInGB": 2},
"public": True,
"temporaryDisk": {"mountPath": "/mytemporarydisk", "sizeInGB": 2},
+ "testEndpointAuthState": "Enabled",
+ "workloadProfileName": "dedicated1",
},
},
).result()
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update_vnet_injection.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update_vnet_injection.py
index fd09c1448699..76736f6509f6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update_vnet_injection.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_create_or_update_vnet_injection.py
@@ -86,6 +86,7 @@ def main():
"persistentDisk": {"mountPath": "/mypersistentdisk", "sizeInGB": 2},
"public": True,
"temporaryDisk": {"mountPath": "/mytemporarydisk", "sizeInGB": 2},
+ "testEndpointAuthState": "Enabled",
"vnetAddons": {"publicEndpoint": True},
},
},
@@ -93,6 +94,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_CreateOrUpdate_VNetInjection.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_CreateOrUpdate_VNetInjection.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_delete.py
index cd368524ae54..b03952722214 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get.py
index aeac632f720e..e2515bc7cfa5 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_resource_upload_url.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_resource_upload_url.py
index 5e985d90fbe3..a4228111da5c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_resource_upload_url.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_resource_upload_url.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_GetResourceUploadUrl.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_GetResourceUploadUrl.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_vnet_injection.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_vnet_injection.py
index 7c03550dc092..ee54ff75fd1c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_vnet_injection.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_get_vnet_injection.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_Get_VNetInjection.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_Get_VNetInjection.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list.py
index 6b1dbf399d19..c4b6e0458680 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list_vnet_injection.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list_vnet_injection.py
index df495ca29200..fbbcf47f7d1e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list_vnet_injection.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_list_vnet_injection.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_List_VNetInjection.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_List_VNetInjection.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_set_active_deployments.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_set_active_deployments.py
index b43bf044ebc5..81bd16d72c8a 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_set_active_deployments.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_set_active_deployments.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_SetActiveDeployments.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_SetActiveDeployments.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update.py
index eb7da8366377..d33ca55df896 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update.py
@@ -68,12 +68,13 @@ def main():
"persistentDisk": {"mountPath": "/mypersistentdisk", "sizeInGB": 2},
"public": True,
"temporaryDisk": {"mountPath": "/mytemporarydisk", "sizeInGB": 2},
+ "testEndpointAuthState": "Enabled",
},
},
).result()
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_Update.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update_vnet_injection.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update_vnet_injection.py
index 2e309b994142..a4abedb1169f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update_vnet_injection.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_update_vnet_injection.py
@@ -68,6 +68,7 @@ def main():
"persistentDisk": {"mountPath": "/mypersistentdisk", "sizeInGB": 2},
"public": True,
"temporaryDisk": {"mountPath": "/mytemporarydisk", "sizeInGB": 2},
+ "testEndpointAuthState": "Enabled",
"vnetAddons": {"publicEndpoint": True},
},
},
@@ -75,6 +76,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_Update_VNetInjection.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_Update_VNetInjection.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_validate_domain.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_validate_domain.py
index bff73f9578cd..18b2b55215c3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_validate_domain.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/apps_validate_domain.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Apps_ValidateDomain.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Apps_ValidateDomain.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_create_or_update.py
index b11ba2b8fa61..fd31208f9ac9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_create_or_update.py
@@ -49,6 +49,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Bindings_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Bindings_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_delete.py
index aa8d3e723735..4ca353127172 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Bindings_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Bindings_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_get.py
index 18ba0122fa64..f4bcd17eff57 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Bindings_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Bindings_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_list.py
index 93c3656c323f..f83861144c40 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Bindings_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Bindings_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_update.py
index 2e24d04154e8..cd18d236ce62 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/bindings_update.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Bindings_Update.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Bindings_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_get.py
index a67c9e30b329..027da2782d3b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceAgentPool_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceAgentPool_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_list.py
index df7b3070d5e0..c8ac5b177546 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceAgentPool_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceAgentPool_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_update_put.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_update_put.py
index 68169850e2a9..354b3f8e538b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_update_put.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_agent_pool_update_put.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceAgentPool_UpdatePut.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceAgentPool_UpdatePut.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_create_or_update.py
index a5aa49e569fe..5b07926945de 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_create_or_update.py
@@ -45,6 +45,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceBuilder_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_delete.py
index b9c264fc8844..4015756a4b3e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceBuilder_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_get.py
index 05c113d2ce83..88c161c99d9f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceBuilder_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list.py
index a5d60d8da6bf..fcc58cae2ef7 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceBuilder_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list_deployments.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list_deployments.py
index ca2ceef0ea76..35d245754257 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list_deployments.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_builder_list_deployments.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_ListDeployments.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildServiceBuilder_ListDeployments.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update.py
index 4f6c18a50ff6..248e33c362bb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update.py
@@ -43,6 +43,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update_build.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update_build.py
index a4ff3cbc4515..e40b5fb49c19 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update_build.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_create_or_update_build.py
@@ -61,6 +61,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_CreateOrUpdateBuild.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_CreateOrUpdateBuild.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_delete_build.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_delete_build.py
index 85bee21fc727..0bd796da2fce 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_delete_build.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_delete_build.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_DeleteBuild.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_DeleteBuild.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build.py
index a2b75a0afc55..38512fbc8043 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetBuild.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetBuild.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result.py
index e332cd4c3bc7..d5199c3c4606 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetBuildResult.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetBuildResult.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result_log.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result_log.py
index dfdf895717b2..c1105ea979c2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result_log.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_result_log.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetBuildResultLog.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetBuildResultLog.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_service.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_service.py
index a2662a92be15..8bfabeabb3e0 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_service.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_build_service.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetBuildService.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetBuildService.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_resource_upload_url.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_resource_upload_url.py
index 190b9d73f4ad..1ff4f3cf5251 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_resource_upload_url.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_resource_upload_url.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetResourceUploadUrl.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetResourceUploadUrl.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_buildpack.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_buildpack.py
index 7012f575d63f..e614c3a386ae 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_buildpack.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_buildpack.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetSupportedBuildpack.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetSupportedBuildpack.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_stack.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_stack.py
index f260c7257454..421c94ee9b63 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_stack.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_get_supported_stack.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_GetSupportedStack.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_GetSupportedStack.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_results.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_results.py
index 5c12a56696f5..9127726cd52f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_results.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_results.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_ListBuildResults.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_ListBuildResults.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_services.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_services.py
index 39ff932d27c7..7f432d1e2eb7 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_services.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_build_services.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_ListBuildServices.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_ListBuildServices.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_builds.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_builds.py
index bc10431424e8..937953997e50 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_builds.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_builds.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_ListBuilds.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_ListBuilds.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_buildpacks.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_buildpacks.py
index f339c285134f..2b75d7286bc2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_buildpacks.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_buildpacks.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_ListSupportedBuildpacks.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_ListSupportedBuildpacks.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_stacks.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_stacks.py
index 98b2a98f7299..96c79ba62cd8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_stacks.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/build_service_list_supported_stacks.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildService_ListSupportedStacks.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildService_ListSupportedStacks.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_create_or_update.py
index 19fd711a661a..f2801f9506c8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_create_or_update.py
@@ -51,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildpackBinding_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildpackBinding_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_delete.py
index 284c4f25767e..fc5e973b3865 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_delete.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildpackBinding_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildpackBinding_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_get.py
index 9ed7e788d463..5165116d5cca 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_get.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildpackBinding_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildpackBinding_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list.py
index d601f759359a..940663047035 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildpackBinding_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildpackBinding_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list_for_cluster.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list_for_cluster.py
index 5537b03798ee..bbd99fab4ae3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list_for_cluster.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/buildpack_binding_list_for_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildpackBinding_ListForCluster.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/BuildpackBinding_ListForCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_create_or_update.py
index b79367d07218..9ee902ee2a42 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_create_or_update.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Certificates_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Certificates_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_delete.py
index 3f65f10abbf9..b7f999983a18 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Certificates_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Certificates_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_get.py
index 1ad7abe1b153..3901273b0483 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Certificates_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Certificates_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_list.py
index 298b69441619..6f683b8aa5d9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/certificates_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Certificates_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Certificates_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_delete.py
new file mode 100644
index 000000000000..468dcf3671f0
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_delete.py
@@ -0,0 +1,41 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python config_servers_delete.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.config_servers.begin_delete(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ ).result()
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get.py
index 145e239a1201..9fb8b2ed66f9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigServers_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get_consumption.py
new file mode 100644
index 000000000000..208b842bf469
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_get_consumption.py
@@ -0,0 +1,42 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python config_servers_get_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.config_servers.get(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_Get_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_list.py
new file mode 100644
index 000000000000..94f0bfaf350f
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_list.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python config_servers_list.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.config_servers.list(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_List.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch.py
index 4ff2ac959bf9..0c869fdcea64 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigServers_UpdatePatch.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_UpdatePatch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch_consumption.py
new file mode 100644
index 000000000000..47b3da8564c7
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_patch_consumption.py
@@ -0,0 +1,54 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python config_servers_update_patch_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.config_servers.begin_update_patch(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ config_server_resource={
+ "properties": {
+ "configServer": {
+ "gitProperty": {
+ "label": "master",
+ "searchPaths": ["/"],
+ "uri": "https://github.com/fake-user/fake-repository.git",
+ }
+ },
+ "enabledState": "Enabled",
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_UpdatePatch_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put.py
index 9c2f7a84a68b..e00adee2be46 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigServers_UpdatePut.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_UpdatePut.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put_consumption.py
new file mode 100644
index 000000000000..aa97b1bd41fc
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_update_put_consumption.py
@@ -0,0 +1,54 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python config_servers_update_put_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.config_servers.begin_update_put(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ config_server_resource={
+ "properties": {
+ "configServer": {
+ "gitProperty": {
+ "label": "master",
+ "searchPaths": ["/"],
+ "uri": "https://github.com/fake-user/fake-repository.git",
+ }
+ },
+ "enabledState": "Enabled",
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_UpdatePut_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_validate.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_validate.py
index 2ed13d5785e8..dda155fa7f93 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_validate.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/config_servers_validate.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigServers_Validate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigServers_Validate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_create_or_update.py
index 99c307e3cb2d..71f4db4d2f0c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_create_or_update.py
@@ -46,7 +46,8 @@ def main():
"uri": "https://github.com/fake-user/fake-repository",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 60,
}
}
},
@@ -54,6 +55,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigurationServices_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigurationServices_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_delete.py
index 0850c6ba2861..6184e60260d5 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigurationServices_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigurationServices_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_get.py
index 17ff65583148..5e1608cf7928 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigurationServices_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigurationServices_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_list.py
index 0f0bc82c2537..f2bd29bef32c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigurationServices_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigurationServices_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate.py
index a73b0715ed97..3db95c29f8be 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate.py
@@ -50,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigurationServices_Validate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigurationServices_Validate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate_resource.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate_resource.py
index 2749d74de29e..725c79c78ac8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate_resource.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/configuration_services_validate_resource.py
@@ -54,6 +54,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ConfigurationServices_ValidateResource.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ConfigurationServices_ValidateResource.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_create_or_update.py
index b34d91d8e68b..afc68d285c75 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_create_or_update.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ContainerRegistries_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ContainerRegistries_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_delete.py
index a498c1c2087f..34a5f83ba089 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ContainerRegistries_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ContainerRegistries_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_get.py
index 8502ed899ece..5da7a0a03e98 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ContainerRegistries_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ContainerRegistries_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_list.py
index 35be4ca10f22..c2a475647320 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/container_registries_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ContainerRegistries_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ContainerRegistries_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_create_or_update.py
index 092c639c64de..c553082609a0 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_create_or_update.py
@@ -42,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomDomains_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomDomains_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_delete.py
index 5d595237b95e..ba3dcfc05408 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomDomains_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomDomains_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_get.py
index 7542e9c89fd4..9e8240f8c187 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomDomains_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomDomains_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_list.py
index ec123de193ef..fce9ff4046fc 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomDomains_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomDomains_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_update.py
index 28fd0ec74950..d42c02a7d57d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/custom_domains_update.py
@@ -42,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomDomains_Update.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomDomains_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_create_or_update.py
index 682067633568..f789b56ddec0 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_create_or_update.py
@@ -61,6 +61,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomizedAccelerators_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomizedAccelerators_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_delete.py
index 660187d044e9..98d80d72396a 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomizedAccelerators_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomizedAccelerators_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_get.py
index 1bd95b6efa78..6ac42ab05a2d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomizedAccelerators_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomizedAccelerators_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_list.py
index 5a82b5389388..ad361e86a392 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomizedAccelerators_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomizedAccelerators_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_validate.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_validate.py
index b194b27332ff..ef6d59a621d4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_validate.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/customized_accelerators_validate.py
@@ -58,6 +58,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/CustomizedAccelerators_Validate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/CustomizedAccelerators_Validate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update.py
index 68a0a343ba81..6434a88866c6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update.py
@@ -77,6 +77,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update_custom_container.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update_custom_container.py
index 1eabf7c375f9..ec7e33285f32 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update_custom_container.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_create_or_update_custom_container.py
@@ -75,6 +75,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_CreateOrUpdate_CustomContainer.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_CreateOrUpdate_CustomContainer.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_delete.py
index af7bf1c768da..712f12d651d3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_disable_remote_debugging.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_disable_remote_debugging.py
index 8b0431b8503d..0ad8d41afd21 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_disable_remote_debugging.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_disable_remote_debugging.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_DisableRemoteDebugging.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_DisableRemoteDebugging.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_enable_remote_debugging.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_enable_remote_debugging.py
index 07bef878b1c9..7717c7de29d2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_enable_remote_debugging.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_enable_remote_debugging.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_EnableRemoteDebugging.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_EnableRemoteDebugging.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_heap_dump.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_heap_dump.py
index c2a18572358b..7cdefabd9b5f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_heap_dump.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_heap_dump.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_GenerateHeapDump.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_GenerateHeapDump.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_thread_dump.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_thread_dump.py
index 91021bb323bd..d6b5b41ce31f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_thread_dump.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_generate_thread_dump.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_GenerateThreadDump.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_GenerateThreadDump.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get.py
index ac80e5d289b8..ce1eecf29c1f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_custom_container.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_custom_container.py
index cca6181167f0..7f511d522ec6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_custom_container.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_custom_container.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Get_CustomContainer.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Get_CustomContainer.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_log_file_url.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_log_file_url.py
index ef203ae624fe..bbc7b144eca8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_log_file_url.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_log_file_url.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_GetLogFileUrl.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_GetLogFileUrl.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_remote_debugging_config.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_remote_debugging_config.py
index 321e763d132a..3205a7b6afb1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_remote_debugging_config.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_get_remote_debugging_config.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_GetRemoteDebuggingConfig.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_GetRemoteDebuggingConfig.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list.py
index ec34c3540604..7734c915c6e9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list_for_cluster.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list_for_cluster.py
index 98d045a46934..9151f3afbe35 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list_for_cluster.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_list_for_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_ListForCluster.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_ListForCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_restart.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_restart.py
index 3c1f61cd831b..7bd043d861d4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_restart.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_restart.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Restart.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Restart.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start.py
index c242fdc96916..d19f02d58939 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Start.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Start.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start_jfr.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start_jfr.py
index 6d2a6eb069dd..6219550ce9d6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start_jfr.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_start_jfr.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_StartJFR.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_StartJFR.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_stop.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_stop.py
index 2b9fcea73670..425d0ff6b752 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_stop.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_stop.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Stop.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Stop.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update.py
index 84157b39edeb..29116344786f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update.py
@@ -50,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Update.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update_custom_container.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update_custom_container.py
index 8ce5dee8f582..a93064c91c6c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update_custom_container.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/deployments_update_custom_container.py
@@ -54,6 +54,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Deployments_Update_CustomContainer.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Deployments_Update_CustomContainer.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portal_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portal_delete.py
index e30e6251b936..63fc456869eb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portal_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portal_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/DevToolPortal_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/DevToolPortal_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_get.py
index 6b4d6f7a1812..2b6832a8f997 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/DevToolPortals_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/DevToolPortals_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_list.py
index e151a00a6d43..32a0b191fc77 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/dev_tool_portals_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/DevToolPortals_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/DevToolPortals_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_get_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_get_consumption.py
new file mode 100644
index 000000000000..2fcb34d73b2c
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_get_consumption.py
@@ -0,0 +1,42 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python eureka_servers_get_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.eureka_servers.get(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/EurekaServers_Get_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_list_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_list_consumption.py
new file mode 100644
index 000000000000..604c06a13cf3
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_list_consumption.py
@@ -0,0 +1,42 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python eureka_servers_list_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.eureka_servers.list(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/EurekaServers_List_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_update_patch_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_update_patch_consumption.py
new file mode 100644
index 000000000000..16b3ddd618bb
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_update_patch_consumption.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python eureka_servers_update_patch_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.eureka_servers.begin_update_patch(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ eureka_server_resource={"properties": {"enabledState": "Enabled"}},
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/EurekaServers_UpdatePatch_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_update_put_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_update_put_consumption.py
new file mode 100644
index 000000000000..51f081b2d850
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/eureka_servers_update_put_consumption.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python eureka_servers_update_put_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.eureka_servers.begin_update_put(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ eureka_server_resource={"properties": {"enabledState": "Enabled"}},
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/EurekaServers_UpdatePut_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_create_or_update.py
index 4c28296f3ccc..5c636168f368 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_create_or_update.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayCustomDomains_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayCustomDomains_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_delete.py
index b0cb71714c17..88b4a9505def 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayCustomDomains_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayCustomDomains_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_get.py
index 53f621020fc5..fb8063a97f65 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayCustomDomains_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayCustomDomains_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_list.py
index a16137987c24..80bb22f1ba17 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_custom_domains_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayCustomDomains_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayCustomDomains_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_create_or_update.py
index 0fe21c3e4500..40db0dfe9525 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_create_or_update.py
@@ -56,6 +56,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayRouteConfigs_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayRouteConfigs_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_delete.py
index 88e778aae5e0..12fa3bec15c2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_delete.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayRouteConfigs_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayRouteConfigs_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_get.py
index f77f061991b8..a49e3cada5d2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayRouteConfigs_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayRouteConfigs_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_list.py
index 28ae2fc5732f..721090823271 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_route_configs_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/GatewayRouteConfigs_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/GatewayRouteConfigs_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_scale.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_scale.py
new file mode 100644
index 000000000000..35755d4be8ef
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateway_scale.py
@@ -0,0 +1,44 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python gateway_scale.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.gateways.begin_update_capacity(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ gateway_name="default",
+ gateway_capacity_resource={"sku": {"capacity": 2, "name": "E0", "tier": "Enterprise"}},
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateway_Scale.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_create_or_update.py
index 5c819ea59836..839c3bf89a15 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_create_or_update.py
@@ -43,6 +43,11 @@ def main():
],
"public": True,
"resourceRequests": {"cpu": "1", "memory": "1G"},
+ "responseCacheProperties": {
+ "responseCacheType": "LocalCachePerRoute",
+ "size": "5MB",
+ "timeToLive": "300s",
+ },
},
"sku": {"capacity": 2, "name": "E0", "tier": "Enterprise"},
},
@@ -50,6 +55,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_delete.py
index e92bfa737a8e..d0b6e1888775 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_get.py
index 31740c0378b6..1cedd33e4137 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list.py
index 93f8001af1c2..800739236924 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list_env_secrets.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list_env_secrets.py
index 5d8c66a118df..fd4c82074393 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list_env_secrets.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_list_env_secrets.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_ListEnvSecrets.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_ListEnvSecrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_restart.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_restart.py
index d26e3dfb92a0..62b853577d5a 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_restart.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_restart.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_Restart.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_Restart.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_validate_domain.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_validate_domain.py
index 0578511ba663..0b434b374925 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_validate_domain.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/gateways_validate_domain.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Gateways_ValidateDomain.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Gateways_ValidateDomain.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_create_or_update.py
new file mode 100644
index 000000000000..82d6bd82cb0a
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_create_or_update.py
@@ -0,0 +1,57 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_create_or_update.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job.begin_create_or_update(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ job_resource={
+ "properties": {
+ "source": {"buildResultId": "", "type": "BuildResult"},
+ "template": {
+ "args": ["arg1", "arg2"],
+ "environmentVariables": [
+ {"name": "key1", "value": "value1"},
+ {"name": "env2", "value": "value2"},
+ {"name": "secretKey1", "secretValue": "secretValue1"},
+ ],
+ },
+ "triggerConfig": {"triggerType": "Manual"},
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Job_CreateOrUpdate.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_delete.py
new file mode 100644
index 000000000000..a8fbb3912f1b
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_delete.py
@@ -0,0 +1,42 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_delete.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.job.begin_delete(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ ).result()
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Job_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_cancel.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_cancel.py
new file mode 100644
index 000000000000..33c2b6f87367
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_cancel.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_execution_cancel.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.job_execution.begin_cancel(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ job_execution_name="test-execution",
+ ).result()
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/JobExecution_Cancel.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_get.py
new file mode 100644
index 000000000000..25dec7892ff1
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_get.py
@@ -0,0 +1,44 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_execution_get.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job_execution.get(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ job_execution_name="test-job-execution",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/JobExecution_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_list_env_secrets.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_list_env_secrets.py
new file mode 100644
index 000000000000..fbc928be08c6
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_execution_list_env_secrets.py
@@ -0,0 +1,44 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_execution_list_env_secrets.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job_execution.list_env_secrets(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ job_execution_name="test-execution",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/JobExecution_ListEnvSecrets.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_executions_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_executions_list.py
new file mode 100644
index 000000000000..3a070b0c9a2b
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_executions_list.py
@@ -0,0 +1,44 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_executions_list.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job_executions.list(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/JobExecutions_List.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_get.py
new file mode 100644
index 000000000000..e0605d03e5c7
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_get.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_get.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job.get(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Job_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_list_env_secrets.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_list_env_secrets.py
new file mode 100644
index 000000000000..6196d717d188
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_list_env_secrets.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_list_env_secrets.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job.list_env_secrets(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="test-job",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Job_ListEnvSecrets.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_start.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_start.py
new file mode 100644
index 000000000000..049e46c63d04
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/job_start.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python job_start.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.job.begin_start(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ job_name="myjob",
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Job_Start.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/jobs_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/jobs_list.py
new file mode 100644
index 000000000000..b71fa52653c3
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/jobs_list.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python jobs_list.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.jobs.list(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Jobs_List.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_get.py
index ccf4764a00a2..5f7175f043d3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/MonitoringSettings_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/MonitoringSettings_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_patch.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_patch.py
index e38a4452565e..75d6f6d8b54d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_patch.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_patch.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/MonitoringSettings_UpdatePatch.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/MonitoringSettings_UpdatePatch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_put.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_put.py
index 3142ce3170d5..0a1541b17ffb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_put.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/monitoring_settings_update_put.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/MonitoringSettings_UpdatePut.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/MonitoringSettings_UpdatePut.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/operations_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/operations_list.py
index 0c0d7844889b..38a605538e08 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/operations_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/operations_list.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Operations_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Operations_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_disable.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_disable.py
index 986dc21fddd9..59b7db5567b8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_disable.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_disable.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/PredefinedAccelerators_Disable.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/PredefinedAccelerators_Disable.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_enable.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_enable.py
index 67ce25bb6118..34fdd2dc9716 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_enable.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_enable.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/PredefinedAccelerators_Enable.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/PredefinedAccelerators_Enable.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_get.py
index 3346d0404c64..c0074e04481c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_get.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/PredefinedAccelerators_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/PredefinedAccelerators_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_list.py
index 54985ed918f4..e5add04697ac 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/predefined_accelerators_list.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/PredefinedAccelerators_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/PredefinedAccelerators_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/runtime_versions_list_runtime_versions.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/runtime_versions_list_runtime_versions.py
index 060eb907a5b7..16c0b0b06635 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/runtime_versions_list_runtime_versions.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/runtime_versions_list_runtime_versions.py
@@ -34,6 +34,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/RuntimeVersions_ListRuntimeVersions.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/RuntimeVersions_ListRuntimeVersions.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_create_or_update.py
index 275951fd18f0..f286033a7b52 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_create_or_update.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ServiceRegistries_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ServiceRegistries_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_delete.py
index 91579e0d98ea..91345e5ac2a2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ServiceRegistries_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ServiceRegistries_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_get.py
index cec898a10ce9..f0638df154f4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ServiceRegistries_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ServiceRegistries_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_list.py
index d4ba07095aee..f79463c855bc 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/service_registries_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/ServiceRegistries_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/ServiceRegistries_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_check_name_availability.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_check_name_availability.py
index a4e18ac7aa73..5c0ffb02447d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_check_name_availability.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_check_name_availability.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_CheckNameAvailability.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CheckNameAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update.py
index 35fe1cffffed..0e6ee262cf8c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update.py
@@ -33,11 +33,17 @@ def main():
response = client.services.begin_create_or_update(
resource_group_name="myResourceGroup",
service_name="myservice",
- resource={"location": "eastus", "sku": {"name": "S0", "tier": "Standard"}, "tags": {"key1": "value1"}},
+ resource={
+ "identity": {"type": "SystemAssigned"},
+ "location": "eastus",
+ "properties": {"maintenanceScheduleConfiguration": {"day": "Sunday", "frequency": "Weekly", "hour": 10}},
+ "sku": {"name": "S0", "tier": "Standard"},
+ "tags": {"key1": "value1"},
+ },
).result()
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_consumption.py
new file mode 100644
index 000000000000..3504bbf67cd2
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_consumption.py
@@ -0,0 +1,51 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python services_create_or_update_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.services.begin_create_or_update(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ resource={
+ "identity": {"type": "SystemAssigned"},
+ "location": "eastus",
+ "properties": {
+ "managedEnvironmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.App/managedEnvironments/myenvironment"
+ },
+ "sku": {"name": "S0", "tier": "StandardGen2"},
+ "tags": {"key1": "value1"},
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_enterprise.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_enterprise.py
index 28401964d77c..1ce2815fe07b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_enterprise.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_enterprise.py
@@ -34,6 +34,7 @@ def main():
resource_group_name="myResourceGroup",
service_name="myservice",
resource={
+ "identity": {"type": "SystemAssigned"},
"location": "eastus",
"properties": {
"marketplaceResource": {
@@ -49,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_CreateOrUpdate_Enterprise.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_Enterprise.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_vnet_injection.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_vnet_injection.py
index 3b4405af671b..88fc3aab7c2f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_vnet_injection.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_create_or_update_vnet_injection.py
@@ -34,6 +34,7 @@ def main():
resource_group_name="myResourceGroup",
service_name="myservice",
resource={
+ "identity": {"type": "SystemAssigned"},
"location": "eastus",
"properties": {
"networkProfile": {
@@ -44,7 +45,12 @@ def main():
"serviceRuntimeNetworkResourceGroup": "my-service-runtime-network-rg",
"serviceRuntimeSubnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/serviceRuntime",
},
- "vnetAddons": {"dataPlanePublicEndpoint": True, "logStreamPublicEndpoint": True},
+ "vnetAddons": {
+ "dataPlanePublicEndpoint": True,
+ "logStreamPublicEndpoint": True,
+ "privateDnsZoneId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateDnsZones/myPrivateDnsZone",
+ "privateStorageAccess": "Enabled",
+ },
},
"sku": {"name": "S0", "tier": "Standard"},
"tags": {"key1": "value1"},
@@ -53,6 +59,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_CreateOrUpdate_VNetInjection.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_CreateOrUpdate_VNetInjection.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_delete.py
index 34c537da7d05..004c1e4b2295 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_delete.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_apm_globally.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_apm_globally.py
index eecf32614de5..ede0f5ba9d79 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_apm_globally.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_apm_globally.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_DisableApmGlobally.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_DisableApmGlobally.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_test_endpoint.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_test_endpoint.py
index 20a5b2b54b29..eadf26b48731 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_test_endpoint.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_disable_test_endpoint.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_DisableTestEndpoint.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_DisableTestEndpoint.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_apm_globally.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_apm_globally.py
index 8c7b7b70bd8e..88a183f5c484 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_apm_globally.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_apm_globally.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_EnableApmGlobally.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_EnableApmGlobally.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_test_endpoint.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_test_endpoint.py
index c32c61c7d090..ef2a3013fe72 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_test_endpoint.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_enable_test_endpoint.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_EnableTestEndpoint.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_EnableTestEndpoint.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_flush_vnet_dns_setting.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_flush_vnet_dns_setting.py
index 075347cf6739..82f9b528bfc9 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_flush_vnet_dns_setting.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_flush_vnet_dns_setting.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_FlushVnetDnsSetting.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_FlushVnetDnsSetting.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get.py
index e73dbb67fc26..475446ca3b60 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get_consumption.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get_consumption.py
new file mode 100644
index 000000000000..049217df1845
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_get_consumption.py
@@ -0,0 +1,42 @@
+# 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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appplatform
+# USAGE
+ python services_get_consumption.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AppPlatformManagementClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.services.get(
+ resource_group_name="myResourceGroup",
+ service_name="myservice",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_Get_Consumption.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list.py
index a002fe46dfb5..27e5bf01c2a4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_by_subscription.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_by_subscription.py
index 6598c220dcb9..5bace0648d0d 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_by_subscription.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_by_subscription.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_ListBySubscription.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_ListBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_globally_enabled_apms.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_globally_enabled_apms.py
index 1ce0a208f6ba..41e4f3982cde 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_globally_enabled_apms.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_globally_enabled_apms.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_ListGloballyEnabledApms.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_ListGloballyEnabledApms.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_apm_types.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_apm_types.py
index 3e6e5dd1b0d3..ba1444878f99 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_apm_types.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_apm_types.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_ListSupportedApmTypes.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_ListSupportedApmTypes.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_server_versions.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_server_versions.py
index 96836f75cd0c..5dd099ac4591 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_server_versions.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_supported_server_versions.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_ListSupportedServerVersions.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_ListSupportedServerVersions.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_test_keys.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_test_keys.py
index 076fe3237a60..ab1fb7025650 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_test_keys.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_list_test_keys.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_ListTestKeys.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_ListTestKeys.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_regenerate_test_key.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_regenerate_test_key.py
index 9392ee1fefd1..147ef1753ef3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_regenerate_test_key.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_regenerate_test_key.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_RegenerateTestKey.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_RegenerateTestKey.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_start.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_start.py
index c31300a92819..00b64651e630 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_start.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_start.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Start.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_Start.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_stop.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_stop.py
index fdd8988d9276..0bdd161a5452 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_stop.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_stop.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Stop.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_Stop.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_update.py
index 63d92a26069b..02cb529a3e5f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/services_update.py
@@ -34,6 +34,7 @@ def main():
resource_group_name="myResourceGroup",
service_name="myservice",
resource={
+ "identity": {"type": "SystemAssigned"},
"location": "eastus",
"properties": {},
"sku": {"name": "S0", "tier": "Standard"},
@@ -43,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Services_Update.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Services_Update.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/skus_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/skus_list.py
index c5f7da3822ac..2c95ffafdfd7 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/skus_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/skus_list.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Skus_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Skus_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_create_or_update.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_create_or_update.py
index 1d0578295f4d..ba70d103bd5b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_create_or_update.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_create_or_update.py
@@ -45,6 +45,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Storages_CreateOrUpdate.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Storages_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_delete.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_delete.py
index 17bd5a05fa25..cb5a52118eb2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_delete.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_delete.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Storages_Delete.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Storages_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_get.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_get.py
index ff137415331c..e2c9cbb7f05c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_get.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Storages_Get.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Storages_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_list.py b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_list.py
index cf8c995fa0d3..42e81f5d1086 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_list.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_samples/storages_list.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/Storages_List.json
+# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2024-05-01-preview/examples/Storages_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/conftest.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/conftest.py
index ad8adbe6d16e..c033f5af743f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/conftest.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/conftest.py
@@ -18,7 +18,7 @@
load_dotenv()
-# aovid record sensitive identity information in recordings
+# For security, please avoid record sensitive identity information in recordings
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
appplatformmanagement_subscription_id = os.environ.get(
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations.py
index cc4fde2d8f8b..f917daf996f6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_api_portal_custom_domains_get(self, resource_group):
response = self.client.api_portal_custom_domains.get(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_api_portal_custom_domains_begin_create_or_update(self, resource_group):
response = self.client.api_portal_custom_domains.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -54,7 +54,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -62,13 +62,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_api_portal_custom_domains_begin_delete(self, resource_group):
response = self.client.api_portal_custom_domains.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -76,12 +76,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_api_portal_custom_domains_list(self, resource_group):
response = self.client.api_portal_custom_domains.list(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations_async.py
index 346bbe8a6e60..90d3c8c723cb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portal_custom_domains_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_api_portal_custom_domains_get(self, resource_group):
response = await self.client.api_portal_custom_domains.get(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_api_portal_custom_domains_begin_create_or_update(self, resource_group):
response = await (
await self.client.api_portal_custom_domains.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -56,7 +56,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -65,14 +65,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_api_portal_custom_domains_begin_delete(self, resource_group):
response = await (
await self.client.api_portal_custom_domains.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -81,12 +81,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_api_portal_custom_domains_list(self, resource_group):
response = self.client.api_portal_custom_domains.list(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations.py
index a3fe2b0041b7..500d7dbf0491 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_api_portals_get(self, resource_group):
response = self.client.api_portals.get(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_api_portals_begin_create_or_update(self, resource_group):
response = self.client.api_portals.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -64,7 +64,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -72,12 +72,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_api_portals_begin_delete(self, resource_group):
response = self.client.api_portals.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -85,11 +85,11 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_api_portals_list(self, resource_group):
response = self.client.api_portals.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -97,13 +97,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_validate_domain(self, resource_group):
+ def test_api_portals_validate_domain(self, resource_group):
response = self.client.api_portals.validate_domain(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
validate_payload={"name": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations_async.py
index c341fabc9288..0447a1c93f75 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_api_portals_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_api_portals_get(self, resource_group):
response = await self.client.api_portals.get(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_api_portals_begin_create_or_update(self, resource_group):
response = await (
await self.client.api_portals.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -71,7 +71,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -80,13 +80,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_api_portals_begin_delete(self, resource_group):
response = await (
await self.client.api_portals.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -95,11 +95,11 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_api_portals_list(self, resource_group):
response = self.client.api_portals.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -107,13 +107,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_validate_domain(self, resource_group):
+ async def test_api_portals_validate_domain(self, resource_group):
response = await self.client.api_portals.validate_domain(
resource_group_name=resource_group.name,
service_name="str",
api_portal_name="str",
validate_payload={"name": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations.py
index 940247247b3f..b29deb6c88d5 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_apms_list(self, resource_group):
response = self.client.apms.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_apms_get(self, resource_group):
response = self.client.apms.get(
resource_group_name=resource_group.name,
service_name="str",
apm_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_apms_begin_create_or_update(self, resource_group):
response = self.client.apms.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -69,7 +69,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -77,12 +77,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_apms_begin_delete(self, resource_group):
response = self.client.apms.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
apm_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -90,12 +90,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_secret_keys(self, resource_group):
+ def test_apms_list_secret_keys(self, resource_group):
response = self.client.apms.list_secret_keys(
resource_group_name=resource_group.name,
service_name="str",
apm_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations_async.py
index 114aaede85b8..f037f9de1b6e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apms_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_apms_list(self, resource_group):
response = self.client.apms.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_apms_get(self, resource_group):
response = await self.client.apms.get(
resource_group_name=resource_group.name,
service_name="str",
apm_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_apms_begin_create_or_update(self, resource_group):
response = await (
await self.client.apms.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -71,7 +71,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -80,13 +80,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_apms_begin_delete(self, resource_group):
response = await (
await self.client.apms.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
apm_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -95,12 +95,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_secret_keys(self, resource_group):
+ async def test_apms_list_secret_keys(self, resource_group):
response = await self.client.apms.list_secret_keys(
resource_group_name=resource_group.name,
service_name="str",
apm_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations.py
index a496adccf1e2..d30227360391 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_application_accelerators_list(self, resource_group):
response = self.client.application_accelerators.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_application_accelerators_get(self, resource_group):
response = self.client.application_accelerators.get(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_application_accelerators_begin_create_or_update(self, resource_group):
response = self.client.application_accelerators.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -74,7 +74,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -82,12 +82,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_application_accelerators_begin_delete(self, resource_group):
response = self.client.application_accelerators.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations_async.py
index f7b1c233e616..688327307ca2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_accelerators_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_application_accelerators_list(self, resource_group):
response = self.client.application_accelerators.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_application_accelerators_get(self, resource_group):
response = await self.client.application_accelerators.get(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_application_accelerators_begin_create_or_update(self, resource_group):
response = await (
await self.client.application_accelerators.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -76,7 +76,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -85,13 +85,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_application_accelerators_begin_delete(self, resource_group):
response = await (
await self.client.application_accelerators.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations.py
index abcf20abb192..ac6ce1fbc655 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_application_live_views_list(self, resource_group):
response = self.client.application_live_views.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_application_live_views_get(self, resource_group):
response = self.client.application_live_views.get(
resource_group_name=resource_group.name,
service_name="str",
application_live_view_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_application_live_views_begin_create_or_update(self, resource_group):
response = self.client.application_live_views.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -73,7 +73,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -81,12 +81,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_application_live_views_begin_delete(self, resource_group):
response = self.client.application_live_views.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
application_live_view_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations_async.py
index 852a5164336a..7312f2776c84 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_application_live_views_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_application_live_views_list(self, resource_group):
response = self.client.application_live_views.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_application_live_views_get(self, resource_group):
response = await self.client.application_live_views.get(
resource_group_name=resource_group.name,
service_name="str",
application_live_view_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_application_live_views_begin_create_or_update(self, resource_group):
response = await (
await self.client.application_live_views.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -75,7 +75,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -84,13 +84,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_application_live_views_begin_delete(self, resource_group):
response = await (
await self.client.application_live_views.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
application_live_view_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations.py
index 20affa5a7c19..d8bff296637c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_apps_get(self, resource_group):
response = self.client.apps.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_apps_begin_create_or_update(self, resource_group):
response = self.client.apps.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -68,9 +68,12 @@ def test_begin_create_or_update(self, resource_group):
"persistentDisk": {"mountPath": "str", "sizeInGB": 0, "usedInGB": 0},
"provisioningState": "str",
"public": bool,
+ "secrets": [{"name": "str", "value": "str"}],
"temporaryDisk": {"mountPath": "/tmp", "sizeInGB": 0},
+ "testEndpointAuthState": "Enabled",
"url": "str",
"vnetAddons": {"publicEndpoint": False, "publicEndpointUrl": "str"},
+ "workloadProfileName": "str",
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -82,7 +85,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -90,12 +93,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_apps_begin_delete(self, resource_group):
response = self.client.apps.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -103,7 +106,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update(self, resource_group):
+ def test_apps_begin_update(self, resource_group):
response = self.client.apps.begin_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -138,9 +141,12 @@ def test_begin_update(self, resource_group):
"persistentDisk": {"mountPath": "str", "sizeInGB": 0, "usedInGB": 0},
"provisioningState": "str",
"public": bool,
+ "secrets": [{"name": "str", "value": "str"}],
"temporaryDisk": {"mountPath": "/tmp", "sizeInGB": 0},
+ "testEndpointAuthState": "Enabled",
"url": "str",
"vnetAddons": {"publicEndpoint": False, "publicEndpointUrl": "str"},
+ "workloadProfileName": "str",
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -152,7 +158,7 @@ def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -160,11 +166,11 @@ def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_apps_list(self, resource_group):
response = self.client.apps.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -172,12 +178,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_resource_upload_url(self, resource_group):
+ def test_apps_get_resource_upload_url(self, resource_group):
response = self.client.apps.get_resource_upload_url(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -185,13 +191,13 @@ def test_get_resource_upload_url(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_set_active_deployments(self, resource_group):
+ def test_apps_begin_set_active_deployments(self, resource_group):
response = self.client.apps.begin_set_active_deployments(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
active_deployment_collection={"activeDeploymentNames": ["str"]},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -199,13 +205,13 @@ def test_begin_set_active_deployments(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_validate_domain(self, resource_group):
+ def test_apps_validate_domain(self, resource_group):
response = self.client.apps.validate_domain(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
validate_payload={"name": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations_async.py
index 99d3bfb9d7a9..72a7a91ae6d0 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_apps_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_apps_get(self, resource_group):
response = await self.client.apps.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_apps_begin_create_or_update(self, resource_group):
response = await (
await self.client.apps.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -70,9 +70,12 @@ async def test_begin_create_or_update(self, resource_group):
"persistentDisk": {"mountPath": "str", "sizeInGB": 0, "usedInGB": 0},
"provisioningState": "str",
"public": bool,
+ "secrets": [{"name": "str", "value": "str"}],
"temporaryDisk": {"mountPath": "/tmp", "sizeInGB": 0},
+ "testEndpointAuthState": "Enabled",
"url": "str",
"vnetAddons": {"publicEndpoint": False, "publicEndpointUrl": "str"},
+ "workloadProfileName": "str",
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -84,7 +87,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -93,13 +96,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_apps_begin_delete(self, resource_group):
response = await (
await self.client.apps.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -108,7 +111,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update(self, resource_group):
+ async def test_apps_begin_update(self, resource_group):
response = await (
await self.client.apps.begin_update(
resource_group_name=resource_group.name,
@@ -144,9 +147,12 @@ async def test_begin_update(self, resource_group):
"persistentDisk": {"mountPath": "str", "sizeInGB": 0, "usedInGB": 0},
"provisioningState": "str",
"public": bool,
+ "secrets": [{"name": "str", "value": "str"}],
"temporaryDisk": {"mountPath": "/tmp", "sizeInGB": 0},
+ "testEndpointAuthState": "Enabled",
"url": "str",
"vnetAddons": {"publicEndpoint": False, "publicEndpointUrl": "str"},
+ "workloadProfileName": "str",
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -158,7 +164,7 @@ async def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -167,11 +173,11 @@ async def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_apps_list(self, resource_group):
response = self.client.apps.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -179,12 +185,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_resource_upload_url(self, resource_group):
+ async def test_apps_get_resource_upload_url(self, resource_group):
response = await self.client.apps.get_resource_upload_url(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -192,14 +198,14 @@ async def test_get_resource_upload_url(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_set_active_deployments(self, resource_group):
+ async def test_apps_begin_set_active_deployments(self, resource_group):
response = await (
await self.client.apps.begin_set_active_deployments(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
active_deployment_collection={"activeDeploymentNames": ["str"]},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -208,13 +214,13 @@ async def test_begin_set_active_deployments(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_validate_domain(self, resource_group):
+ async def test_apps_validate_domain(self, resource_group):
response = await self.client.apps.validate_domain(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
validate_payload={"name": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations.py
index 06f6f5a25570..46057b4f0dbf 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_bindings_get(self, resource_group):
response = self.client.bindings.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_bindings_begin_create_or_update(self, resource_group):
response = self.client.bindings.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -63,7 +63,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -71,13 +71,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_bindings_begin_delete(self, resource_group):
response = self.client.bindings.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -85,7 +85,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update(self, resource_group):
+ def test_bindings_begin_update(self, resource_group):
response = self.client.bindings.begin_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -114,7 +114,7 @@ def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -122,12 +122,12 @@ def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_bindings_list(self, resource_group):
response = self.client.bindings.list(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations_async.py
index c1c7f9c4b70e..4b1aa21455ab 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_bindings_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_bindings_get(self, resource_group):
response = await self.client.bindings.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_bindings_begin_create_or_update(self, resource_group):
response = await (
await self.client.bindings.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -74,14 +74,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_bindings_begin_delete(self, resource_group):
response = await (
await self.client.bindings.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -90,7 +90,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update(self, resource_group):
+ async def test_bindings_begin_update(self, resource_group):
response = await (
await self.client.bindings.begin_update(
resource_group_name=resource_group.name,
@@ -120,7 +120,7 @@ async def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -129,12 +129,12 @@ async def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_bindings_list(self, resource_group):
response = self.client.bindings.list(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations.py
index 202ca798158f..a39af74c658b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_build_service_agent_pool_list(self, resource_group):
response = self.client.build_service_agent_pool.list(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_build_service_agent_pool_get(self, resource_group):
response = self.client.build_service_agent_pool.get(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
agent_pool_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update_put(self, resource_group):
+ def test_build_service_agent_pool_begin_update_put(self, resource_group):
response = self.client.build_service_agent_pool.begin_update_put(
resource_group_name=resource_group.name,
service_name="str",
@@ -67,7 +67,7 @@ def test_begin_update_put(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations_async.py
index 352fb8bb1c70..196f8418401e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_agent_pool_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_build_service_agent_pool_list(self, resource_group):
response = self.client.build_service_agent_pool.list(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_build_service_agent_pool_get(self, resource_group):
response = await self.client.build_service_agent_pool.get(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
agent_pool_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -48,7 +48,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update_put(self, resource_group):
+ async def test_build_service_agent_pool_begin_update_put(self, resource_group):
response = await (
await self.client.build_service_agent_pool.begin_update_put(
resource_group_name=resource_group.name,
@@ -72,7 +72,7 @@ async def test_begin_update_put(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations.py
index 29d1aef3c0ee..b1ef015cd9af 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_build_service_builder_get(self, resource_group):
response = self.client.build_service_builder.get(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_build_service_builder_begin_create_or_update(self, resource_group):
response = self.client.build_service_builder.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -44,7 +44,7 @@ def test_begin_create_or_update(self, resource_group):
"id": "str",
"name": "str",
"properties": {
- "buildpackGroups": [{"buildpacks": [{"id": "str"}], "name": "str"}],
+ "buildpackGroups": [{"buildpacks": [{"id": "str", "version": "str"}], "name": "str"}],
"provisioningState": "str",
"stack": {"id": "str", "version": "str"},
},
@@ -58,7 +58,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -66,13 +66,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_build_service_builder_begin_delete(self, resource_group):
response = self.client.build_service_builder.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -80,12 +80,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_build_service_builder_list(self, resource_group):
response = self.client.build_service_builder.list(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -93,13 +93,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_deployments(self, resource_group):
+ def test_build_service_builder_list_deployments(self, resource_group):
response = self.client.build_service_builder.list_deployments(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations_async.py
index c192e1200d09..ae521ffc40fb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_builder_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_build_service_builder_get(self, resource_group):
response = await self.client.build_service_builder.get(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_build_service_builder_begin_create_or_update(self, resource_group):
response = await (
await self.client.build_service_builder.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -46,7 +46,7 @@ async def test_begin_create_or_update(self, resource_group):
"id": "str",
"name": "str",
"properties": {
- "buildpackGroups": [{"buildpacks": [{"id": "str"}], "name": "str"}],
+ "buildpackGroups": [{"buildpacks": [{"id": "str", "version": "str"}], "name": "str"}],
"provisioningState": "str",
"stack": {"id": "str", "version": "str"},
},
@@ -60,7 +60,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -69,14 +69,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_build_service_builder_begin_delete(self, resource_group):
response = await (
await self.client.build_service_builder.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -85,12 +85,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_build_service_builder_list(self, resource_group):
response = self.client.build_service_builder.list(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -98,13 +98,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_deployments(self, resource_group):
+ async def test_build_service_builder_list_deployments(self, resource_group):
response = await self.client.build_service_builder.list_deployments(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations.py
index a6cdb3be67ce..bde7378456d3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_build_services(self, resource_group):
+ def test_build_service_list_build_services(self, resource_group):
response = self.client.build_service.list_build_services(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list_build_services(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_build_service(self, resource_group):
+ def test_build_service_get_build_service(self, resource_group):
response = self.client.build_service.get_build_service(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get_build_service(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_build_service_begin_create_or_update(self, resource_group):
response = self.client.build_service.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -69,7 +69,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -77,12 +77,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_builds(self, resource_group):
+ def test_build_service_list_builds(self, resource_group):
response = self.client.build_service.list_builds(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -90,13 +90,13 @@ def test_list_builds(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_build(self, resource_group):
+ def test_build_service_get_build(self, resource_group):
response = self.client.build_service.get_build(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -104,7 +104,7 @@ def test_get_build(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update_build(self, resource_group):
+ def test_build_service_create_or_update_build(self, resource_group):
response = self.client.build_service.create_or_update_build(
resource_group_name=resource_group.name,
service_name="str",
@@ -141,7 +141,7 @@ def test_create_or_update_build(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -149,13 +149,13 @@ def test_create_or_update_build(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete_build(self, resource_group):
+ def test_build_service_begin_delete_build(self, resource_group):
response = self.client.build_service.begin_delete_build(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -163,13 +163,13 @@ def test_begin_delete_build(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_build_results(self, resource_group):
+ def test_build_service_list_build_results(self, resource_group):
response = self.client.build_service.list_build_results(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -177,14 +177,14 @@ def test_list_build_results(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_build_result(self, resource_group):
+ def test_build_service_get_build_result(self, resource_group):
response = self.client.build_service.get_build_result(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
build_result_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -192,14 +192,14 @@ def test_get_build_result(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_build_result_log(self, resource_group):
+ def test_build_service_get_build_result_log(self, resource_group):
response = self.client.build_service.get_build_result_log(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
build_result_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -207,12 +207,12 @@ def test_get_build_result_log(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_resource_upload_url(self, resource_group):
+ def test_build_service_get_resource_upload_url(self, resource_group):
response = self.client.build_service.get_resource_upload_url(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -220,12 +220,12 @@ def test_get_resource_upload_url(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_supported_buildpacks(self, resource_group):
+ def test_build_service_list_supported_buildpacks(self, resource_group):
response = self.client.build_service.list_supported_buildpacks(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -233,13 +233,13 @@ def test_list_supported_buildpacks(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_supported_buildpack(self, resource_group):
+ def test_build_service_get_supported_buildpack(self, resource_group):
response = self.client.build_service.get_supported_buildpack(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
buildpack_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -247,12 +247,12 @@ def test_get_supported_buildpack(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_supported_stacks(self, resource_group):
+ def test_build_service_list_supported_stacks(self, resource_group):
response = self.client.build_service.list_supported_stacks(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -260,13 +260,13 @@ def test_list_supported_stacks(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_supported_stack(self, resource_group):
+ def test_build_service_get_supported_stack(self, resource_group):
response = self.client.build_service.get_supported_stack(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
stack_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations_async.py
index eb626889af70..fb55a3ccc5bb 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_build_service_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_build_services(self, resource_group):
+ async def test_build_service_list_build_services(self, resource_group):
response = self.client.build_service.list_build_services(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list_build_services(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_build_service(self, resource_group):
+ async def test_build_service_get_build_service(self, resource_group):
response = await self.client.build_service.get_build_service(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get_build_service(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_build_service_begin_create_or_update(self, resource_group):
response = await (
await self.client.build_service.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -71,7 +71,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -80,12 +80,12 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_builds(self, resource_group):
+ async def test_build_service_list_builds(self, resource_group):
response = self.client.build_service.list_builds(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -93,13 +93,13 @@ async def test_list_builds(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_build(self, resource_group):
+ async def test_build_service_get_build(self, resource_group):
response = await self.client.build_service.get_build(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -107,7 +107,7 @@ async def test_get_build(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update_build(self, resource_group):
+ async def test_build_service_create_or_update_build(self, resource_group):
response = await self.client.build_service.create_or_update_build(
resource_group_name=resource_group.name,
service_name="str",
@@ -144,7 +144,7 @@ async def test_create_or_update_build(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -152,14 +152,14 @@ async def test_create_or_update_build(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete_build(self, resource_group):
+ async def test_build_service_begin_delete_build(self, resource_group):
response = await (
await self.client.build_service.begin_delete_build(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -168,13 +168,13 @@ async def test_begin_delete_build(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_build_results(self, resource_group):
+ async def test_build_service_list_build_results(self, resource_group):
response = self.client.build_service.list_build_results(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -182,14 +182,14 @@ async def test_list_build_results(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_build_result(self, resource_group):
+ async def test_build_service_get_build_result(self, resource_group):
response = await self.client.build_service.get_build_result(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
build_result_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -197,14 +197,14 @@ async def test_get_build_result(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_build_result_log(self, resource_group):
+ async def test_build_service_get_build_result_log(self, resource_group):
response = await self.client.build_service.get_build_result_log(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
build_name="str",
build_result_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -212,12 +212,12 @@ async def test_get_build_result_log(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_resource_upload_url(self, resource_group):
+ async def test_build_service_get_resource_upload_url(self, resource_group):
response = await self.client.build_service.get_resource_upload_url(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -225,12 +225,12 @@ async def test_get_resource_upload_url(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_supported_buildpacks(self, resource_group):
+ async def test_build_service_list_supported_buildpacks(self, resource_group):
response = await self.client.build_service.list_supported_buildpacks(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -238,13 +238,13 @@ async def test_list_supported_buildpacks(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_supported_buildpack(self, resource_group):
+ async def test_build_service_get_supported_buildpack(self, resource_group):
response = await self.client.build_service.get_supported_buildpack(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
buildpack_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -252,12 +252,12 @@ async def test_get_supported_buildpack(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_supported_stacks(self, resource_group):
+ async def test_build_service_list_supported_stacks(self, resource_group):
response = await self.client.build_service.list_supported_stacks(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -265,13 +265,13 @@ async def test_list_supported_stacks(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_supported_stack(self, resource_group):
+ async def test_build_service_get_supported_stack(self, resource_group):
response = await self.client.build_service.get_supported_stack(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
stack_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations.py
index 532977020d1e..4e9e334143f4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_for_cluster(self, resource_group):
+ def test_buildpack_binding_list_for_cluster(self, resource_group):
response = self.client.buildpack_binding.list_for_cluster(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,14 +32,14 @@ def test_list_for_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_buildpack_binding_get(self, resource_group):
response = self.client.buildpack_binding.get(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
buildpack_binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_buildpack_binding_begin_create_or_update(self, resource_group):
response = self.client.buildpack_binding.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -72,7 +72,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -80,14 +80,14 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_buildpack_binding_begin_delete(self, resource_group):
response = self.client.buildpack_binding.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
buildpack_binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -95,13 +95,13 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_buildpack_binding_list(self, resource_group):
response = self.client.buildpack_binding.list(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations_async.py
index 6595afbf0d4f..5a711541da87 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_buildpack_binding_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_for_cluster(self, resource_group):
+ async def test_buildpack_binding_list_for_cluster(self, resource_group):
response = self.client.buildpack_binding.list_for_cluster(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,14 +33,14 @@ async def test_list_for_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_buildpack_binding_get(self, resource_group):
response = await self.client.buildpack_binding.get(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
buildpack_binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -48,7 +48,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_buildpack_binding_begin_create_or_update(self, resource_group):
response = await (
await self.client.buildpack_binding.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -74,7 +74,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -83,7 +83,7 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_buildpack_binding_begin_delete(self, resource_group):
response = await (
await self.client.buildpack_binding.begin_delete(
resource_group_name=resource_group.name,
@@ -91,7 +91,7 @@ async def test_begin_delete(self, resource_group):
build_service_name="str",
builder_name="str",
buildpack_binding_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -100,13 +100,13 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_buildpack_binding_list(self, resource_group):
response = self.client.buildpack_binding.list(
resource_group_name=resource_group.name,
service_name="str",
build_service_name="str",
builder_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations.py
index 013e6eecd9d9..48b336b91100 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_certificates_get(self, resource_group):
response = self.client.certificates.get(
resource_group_name=resource_group.name,
service_name="str",
certificate_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_certificates_begin_create_or_update(self, resource_group):
response = self.client.certificates.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -52,7 +52,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -60,12 +60,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_certificates_begin_delete(self, resource_group):
response = self.client.certificates.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
certificate_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -73,11 +73,11 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_certificates_list(self, resource_group):
response = self.client.certificates.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations_async.py
index 819fbd1aa9bf..ca234d7c27ae 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_certificates_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_certificates_get(self, resource_group):
response = await self.client.certificates.get(
resource_group_name=resource_group.name,
service_name="str",
certificate_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_certificates_begin_create_or_update(self, resource_group):
response = await (
await self.client.certificates.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -54,7 +54,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -63,13 +63,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_certificates_begin_delete(self, resource_group):
response = await (
await self.client.certificates.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
certificate_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -78,11 +78,11 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_certificates_list(self, resource_group):
response = self.client.certificates.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations.py
index fabd090ae560..ca0c87061096 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_config_servers_get(self, resource_group):
response = self.client.config_servers.get(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -32,7 +32,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update_put(self, resource_group):
+ def test_config_servers_begin_update_put(self, resource_group):
response = self.client.config_servers.begin_update_put(
resource_group_name=resource_group.name,
service_name="str",
@@ -68,8 +68,11 @@ def test_begin_update_put(self, resource_group):
"username": "str",
}
},
+ "enabledState": "str",
"error": {"code": "str", "message": "str"},
+ "instances": [{"name": "str", "status": "str"}],
"provisioningState": "str",
+ "resourceRequests": {"cpu": "str", "instanceCount": 0, "memory": "str"},
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -81,7 +84,7 @@ def test_begin_update_put(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -89,7 +92,7 @@ def test_begin_update_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update_patch(self, resource_group):
+ def test_config_servers_begin_update_patch(self, resource_group):
response = self.client.config_servers.begin_update_patch(
resource_group_name=resource_group.name,
service_name="str",
@@ -125,8 +128,11 @@ def test_begin_update_patch(self, resource_group):
"username": "str",
}
},
+ "enabledState": "str",
"error": {"code": "str", "message": "str"},
+ "instances": [{"name": "str", "status": "str"}],
"provisioningState": "str",
+ "resourceRequests": {"cpu": "str", "instanceCount": 0, "memory": "str"},
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -138,7 +144,7 @@ def test_begin_update_patch(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -146,7 +152,31 @@ def test_begin_update_patch(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_validate(self, resource_group):
+ def test_config_servers_begin_delete(self, resource_group):
+ response = self.client.config_servers.begin_delete(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_config_servers_list(self, resource_group):
+ response = self.client.config_servers.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_config_servers_begin_validate(self, resource_group):
response = self.client.config_servers.begin_validate(
resource_group_name=resource_group.name,
service_name="str",
@@ -178,7 +208,7 @@ def test_begin_validate(self, resource_group):
"username": "str",
}
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations_async.py
index 8a95e1f0f971..e4e8e5c7bc75 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_config_servers_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_config_servers_get(self, resource_group):
response = await self.client.config_servers.get(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update_put(self, resource_group):
+ async def test_config_servers_begin_update_put(self, resource_group):
response = await (
await self.client.config_servers.begin_update_put(
resource_group_name=resource_group.name,
@@ -70,8 +70,11 @@ async def test_begin_update_put(self, resource_group):
"username": "str",
}
},
+ "enabledState": "str",
"error": {"code": "str", "message": "str"},
+ "instances": [{"name": "str", "status": "str"}],
"provisioningState": "str",
+ "resourceRequests": {"cpu": "str", "instanceCount": 0, "memory": "str"},
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -83,7 +86,7 @@ async def test_begin_update_put(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -92,7 +95,7 @@ async def test_begin_update_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update_patch(self, resource_group):
+ async def test_config_servers_begin_update_patch(self, resource_group):
response = await (
await self.client.config_servers.begin_update_patch(
resource_group_name=resource_group.name,
@@ -129,8 +132,11 @@ async def test_begin_update_patch(self, resource_group):
"username": "str",
}
},
+ "enabledState": "str",
"error": {"code": "str", "message": "str"},
+ "instances": [{"name": "str", "status": "str"}],
"provisioningState": "str",
+ "resourceRequests": {"cpu": "str", "instanceCount": 0, "memory": "str"},
},
"systemData": {
"createdAt": "2020-02-20 00:00:00",
@@ -142,7 +148,7 @@ async def test_begin_update_patch(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -151,7 +157,33 @@ async def test_begin_update_patch(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_validate(self, resource_group):
+ async def test_config_servers_begin_delete(self, resource_group):
+ response = await (
+ await self.client.config_servers.begin_delete(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_config_servers_list(self, resource_group):
+ response = self.client.config_servers.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_config_servers_begin_validate(self, resource_group):
response = await (
await self.client.config_servers.begin_validate(
resource_group_name=resource_group.name,
@@ -184,7 +216,7 @@ async def test_begin_validate(self, resource_group):
"username": "str",
}
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations.py
index 4bcc208828cb..e41bdb36ee8e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_configuration_services_get(self, resource_group):
response = self.client.configuration_services.get(
resource_group_name=resource_group.name,
service_name="str",
configuration_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_configuration_services_begin_create_or_update(self, resource_group):
response = self.client.configuration_services.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -65,7 +65,8 @@ def test_begin_create_or_update(self, resource_group):
"username": "str",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 0,
},
},
"systemData": {
@@ -78,7 +79,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -86,12 +87,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_configuration_services_begin_delete(self, resource_group):
response = self.client.configuration_services.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
configuration_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -99,11 +100,11 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_configuration_services_list(self, resource_group):
response = self.client.configuration_services.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -111,7 +112,7 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_validate(self, resource_group):
+ def test_configuration_services_begin_validate(self, resource_group):
response = self.client.configuration_services.begin_validate(
resource_group_name=resource_group.name,
service_name="str",
@@ -135,9 +136,10 @@ def test_begin_validate(self, resource_group):
"username": "str",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 0,
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -145,7 +147,7 @@ def test_begin_validate(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_validate_resource(self, resource_group):
+ def test_configuration_services_begin_validate_resource(self, resource_group):
response = self.client.configuration_services.begin_validate_resource(
resource_group_name=resource_group.name,
service_name="str",
@@ -177,7 +179,8 @@ def test_begin_validate_resource(self, resource_group):
"username": "str",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 0,
},
},
"systemData": {
@@ -190,7 +193,7 @@ def test_begin_validate_resource(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations_async.py
index a367ec7ef3b4..55f65fe56ab6 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_configuration_services_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_configuration_services_get(self, resource_group):
response = await self.client.configuration_services.get(
resource_group_name=resource_group.name,
service_name="str",
configuration_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_configuration_services_begin_create_or_update(self, resource_group):
response = await (
await self.client.configuration_services.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -67,7 +67,8 @@ async def test_begin_create_or_update(self, resource_group):
"username": "str",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 0,
},
},
"systemData": {
@@ -80,7 +81,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -89,13 +90,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_configuration_services_begin_delete(self, resource_group):
response = await (
await self.client.configuration_services.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
configuration_service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -104,11 +105,11 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_configuration_services_list(self, resource_group):
response = self.client.configuration_services.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -116,7 +117,7 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_validate(self, resource_group):
+ async def test_configuration_services_begin_validate(self, resource_group):
response = await (
await self.client.configuration_services.begin_validate(
resource_group_name=resource_group.name,
@@ -141,9 +142,10 @@ async def test_begin_validate(self, resource_group):
"username": "str",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 0,
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -152,7 +154,7 @@ async def test_begin_validate(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_validate_resource(self, resource_group):
+ async def test_configuration_services_begin_validate_resource(self, resource_group):
response = await (
await self.client.configuration_services.begin_validate_resource(
resource_group_name=resource_group.name,
@@ -185,7 +187,8 @@ async def test_begin_validate_resource(self, resource_group):
"username": "str",
}
]
- }
+ },
+ "refreshIntervalInSeconds": 0,
},
},
"systemData": {
@@ -198,7 +201,7 @@ async def test_begin_validate_resource(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations.py
index 0c7c7b622ab8..4dff64e0a41f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_container_registries_list(self, resource_group):
response = self.client.container_registries.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_container_registries_get(self, resource_group):
response = self.client.container_registries.get(
resource_group_name=resource_group.name,
service_name="str",
container_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_container_registries_begin_create_or_update(self, resource_group):
response = self.client.container_registries.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -64,7 +64,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -72,12 +72,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_container_registries_begin_delete(self, resource_group):
response = self.client.container_registries.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
container_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -85,13 +85,13 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_validate(self, resource_group):
+ def test_container_registries_begin_validate(self, resource_group):
response = self.client.container_registries.begin_validate(
resource_group_name=resource_group.name,
service_name="str",
container_registry_name="str",
container_registry_properties={"credentials": "container_registry_credentials", "provisioningState": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations_async.py
index db9829f8b236..77393fddf8b5 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_container_registries_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_container_registries_list(self, resource_group):
response = self.client.container_registries.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_container_registries_get(self, resource_group):
response = await self.client.container_registries.get(
resource_group_name=resource_group.name,
service_name="str",
container_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_container_registries_begin_create_or_update(self, resource_group):
response = await (
await self.client.container_registries.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -66,7 +66,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -75,13 +75,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_container_registries_begin_delete(self, resource_group):
response = await (
await self.client.container_registries.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
container_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -90,7 +90,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_validate(self, resource_group):
+ async def test_container_registries_begin_validate(self, resource_group):
response = await (
await self.client.container_registries.begin_validate(
resource_group_name=resource_group.name,
@@ -100,7 +100,7 @@ async def test_begin_validate(self, resource_group):
"credentials": "container_registry_credentials",
"provisioningState": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations.py
index c565da9c391b..481d93ce7d5b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_custom_domains_get(self, resource_group):
response = self.client.custom_domains.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_custom_domains_begin_create_or_update(self, resource_group):
response = self.client.custom_domains.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -54,7 +54,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -62,13 +62,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_custom_domains_begin_delete(self, resource_group):
response = self.client.custom_domains.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -76,7 +76,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update(self, resource_group):
+ def test_custom_domains_begin_update(self, resource_group):
response = self.client.custom_domains.begin_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -96,7 +96,7 @@ def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -104,12 +104,12 @@ def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_custom_domains_list(self, resource_group):
response = self.client.custom_domains.list(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations_async.py
index ff345b7d577a..74c61fd7ff2e 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_custom_domains_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_custom_domains_get(self, resource_group):
response = await self.client.custom_domains.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_custom_domains_begin_create_or_update(self, resource_group):
response = await (
await self.client.custom_domains.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -61,7 +61,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -70,14 +70,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_custom_domains_begin_delete(self, resource_group):
response = await (
await self.client.custom_domains.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -86,7 +86,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update(self, resource_group):
+ async def test_custom_domains_begin_update(self, resource_group):
response = await (
await self.client.custom_domains.begin_update(
resource_group_name=resource_group.name,
@@ -112,7 +112,7 @@ async def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -121,12 +121,12 @@ async def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_custom_domains_list(self, resource_group):
response = self.client.custom_domains.list(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations.py
index 708db6de1875..c2c51884558a 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_customized_accelerators_list(self, resource_group):
response = self.client.customized_accelerators.list(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_customized_accelerators_get(self, resource_group):
response = self.client.customized_accelerators.get(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
customized_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_customized_accelerators_begin_create_or_update(self, resource_group):
response = self.client.customized_accelerators.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -85,7 +85,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -93,13 +93,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_customized_accelerators_begin_delete(self, resource_group):
response = self.client.customized_accelerators.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
customized_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -107,7 +107,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_validate(self, resource_group):
+ def test_customized_accelerators_begin_validate(self, resource_group):
response = self.client.customized_accelerators.begin_validate(
resource_group_name=resource_group.name,
service_name="str",
@@ -131,7 +131,7 @@ def test_begin_validate(self, resource_group):
"imports": ["str"],
"provisioningState": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations_async.py
index 4e9f25d4cbca..8ca970e12b1b 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_customized_accelerators_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_customized_accelerators_list(self, resource_group):
response = self.client.customized_accelerators.list(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_customized_accelerators_get(self, resource_group):
response = await self.client.customized_accelerators.get(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
customized_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -48,7 +48,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_customized_accelerators_begin_create_or_update(self, resource_group):
response = await (
await self.client.customized_accelerators.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -87,7 +87,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -96,14 +96,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_customized_accelerators_begin_delete(self, resource_group):
response = await (
await self.client.customized_accelerators.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
customized_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -112,7 +112,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_validate(self, resource_group):
+ async def test_customized_accelerators_begin_validate(self, resource_group):
response = await (
await self.client.customized_accelerators.begin_validate(
resource_group_name=resource_group.name,
@@ -137,7 +137,7 @@ async def test_begin_validate(self, resource_group):
"imports": ["str"],
"provisioningState": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations.py
index 24d35ee27ed6..86a04620caf1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_deployments_get(self, resource_group):
response = self.client.deployments.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_deployments_begin_create_or_update(self, resource_group):
response = self.client.deployments.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -69,6 +69,33 @@ def test_begin_create_or_update(self, resource_group):
"timeoutSeconds": 0,
},
"resourceRequests": {"cpu": "str", "memory": "str"},
+ "scale": {
+ "maxReplicas": 10,
+ "minReplicas": 0,
+ "rules": [
+ {
+ "azureQueue": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "queueLength": 0,
+ "queueName": "str",
+ },
+ "custom": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ "type": "str",
+ },
+ "http": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ "name": "str",
+ "tcp": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ }
+ ],
+ },
"startupProbe": {
"disableProbe": False,
"failureThreshold": 0,
@@ -105,7 +132,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -113,13 +140,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_deployments_begin_delete(self, resource_group):
response = self.client.deployments.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -127,7 +154,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update(self, resource_group):
+ def test_deployments_begin_update(self, resource_group):
response = self.client.deployments.begin_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -162,6 +189,33 @@ def test_begin_update(self, resource_group):
"timeoutSeconds": 0,
},
"resourceRequests": {"cpu": "str", "memory": "str"},
+ "scale": {
+ "maxReplicas": 10,
+ "minReplicas": 0,
+ "rules": [
+ {
+ "azureQueue": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "queueLength": 0,
+ "queueName": "str",
+ },
+ "custom": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ "type": "str",
+ },
+ "http": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ "name": "str",
+ "tcp": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ }
+ ],
+ },
"startupProbe": {
"disableProbe": False,
"failureThreshold": 0,
@@ -198,7 +252,7 @@ def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -206,12 +260,12 @@ def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_deployments_list(self, resource_group):
response = self.client.deployments.list(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -219,11 +273,11 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_for_cluster(self, resource_group):
+ def test_deployments_list_for_cluster(self, resource_group):
response = self.client.deployments.list_for_cluster(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -231,13 +285,13 @@ def test_list_for_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_start(self, resource_group):
+ def test_deployments_begin_start(self, resource_group):
response = self.client.deployments.begin_start(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -245,13 +299,13 @@ def test_begin_start(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_stop(self, resource_group):
+ def test_deployments_begin_stop(self, resource_group):
response = self.client.deployments.begin_stop(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -259,13 +313,13 @@ def test_begin_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_restart(self, resource_group):
+ def test_deployments_begin_restart(self, resource_group):
response = self.client.deployments.begin_restart(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -273,13 +327,13 @@ def test_begin_restart(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_enable_remote_debugging(self, resource_group):
+ def test_deployments_begin_enable_remote_debugging(self, resource_group):
response = self.client.deployments.begin_enable_remote_debugging(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -287,13 +341,13 @@ def test_begin_enable_remote_debugging(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_disable_remote_debugging(self, resource_group):
+ def test_deployments_begin_disable_remote_debugging(self, resource_group):
response = self.client.deployments.begin_disable_remote_debugging(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -301,13 +355,13 @@ def test_begin_disable_remote_debugging(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_remote_debugging_config(self, resource_group):
+ def test_deployments_get_remote_debugging_config(self, resource_group):
response = self.client.deployments.get_remote_debugging_config(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -315,13 +369,13 @@ def test_get_remote_debugging_config(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_log_file_url(self, resource_group):
+ def test_deployments_get_log_file_url(self, resource_group):
response = self.client.deployments.get_log_file_url(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -329,14 +383,14 @@ def test_get_log_file_url(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_generate_heap_dump(self, resource_group):
+ def test_deployments_begin_generate_heap_dump(self, resource_group):
response = self.client.deployments.begin_generate_heap_dump(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
diagnostic_parameters={"appInstance": "str", "duration": "str", "filePath": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -344,14 +398,14 @@ def test_begin_generate_heap_dump(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_generate_thread_dump(self, resource_group):
+ def test_deployments_begin_generate_thread_dump(self, resource_group):
response = self.client.deployments.begin_generate_thread_dump(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
diagnostic_parameters={"appInstance": "str", "duration": "str", "filePath": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -359,14 +413,14 @@ def test_begin_generate_thread_dump(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_start_jfr(self, resource_group):
+ def test_deployments_begin_start_jfr(self, resource_group):
response = self.client.deployments.begin_start_jfr(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
diagnostic_parameters={"appInstance": "str", "duration": "str", "filePath": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations_async.py
index ddd1fe8e0936..f3150aa32715 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_deployments_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_deployments_get(self, resource_group):
response = await self.client.deployments.get(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_deployments_begin_create_or_update(self, resource_group):
response = await (
await self.client.deployments.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -71,6 +71,33 @@ async def test_begin_create_or_update(self, resource_group):
"timeoutSeconds": 0,
},
"resourceRequests": {"cpu": "str", "memory": "str"},
+ "scale": {
+ "maxReplicas": 10,
+ "minReplicas": 0,
+ "rules": [
+ {
+ "azureQueue": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "queueLength": 0,
+ "queueName": "str",
+ },
+ "custom": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ "type": "str",
+ },
+ "http": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ "name": "str",
+ "tcp": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ }
+ ],
+ },
"startupProbe": {
"disableProbe": False,
"failureThreshold": 0,
@@ -107,7 +134,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -116,14 +143,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_deployments_begin_delete(self, resource_group):
response = await (
await self.client.deployments.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -132,7 +159,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update(self, resource_group):
+ async def test_deployments_begin_update(self, resource_group):
response = await (
await self.client.deployments.begin_update(
resource_group_name=resource_group.name,
@@ -168,6 +195,33 @@ async def test_begin_update(self, resource_group):
"timeoutSeconds": 0,
},
"resourceRequests": {"cpu": "str", "memory": "str"},
+ "scale": {
+ "maxReplicas": 10,
+ "minReplicas": 0,
+ "rules": [
+ {
+ "azureQueue": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "queueLength": 0,
+ "queueName": "str",
+ },
+ "custom": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ "type": "str",
+ },
+ "http": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ "name": "str",
+ "tcp": {
+ "auth": [{"secretRef": "str", "triggerParameter": "str"}],
+ "metadata": {"str": "str"},
+ },
+ }
+ ],
+ },
"startupProbe": {
"disableProbe": False,
"failureThreshold": 0,
@@ -204,7 +258,7 @@ async def test_begin_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -213,12 +267,12 @@ async def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_deployments_list(self, resource_group):
response = self.client.deployments.list(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -226,11 +280,11 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_for_cluster(self, resource_group):
+ async def test_deployments_list_for_cluster(self, resource_group):
response = self.client.deployments.list_for_cluster(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -238,14 +292,14 @@ async def test_list_for_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_start(self, resource_group):
+ async def test_deployments_begin_start(self, resource_group):
response = await (
await self.client.deployments.begin_start(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -254,14 +308,14 @@ async def test_begin_start(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_stop(self, resource_group):
+ async def test_deployments_begin_stop(self, resource_group):
response = await (
await self.client.deployments.begin_stop(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -270,14 +324,14 @@ async def test_begin_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_restart(self, resource_group):
+ async def test_deployments_begin_restart(self, resource_group):
response = await (
await self.client.deployments.begin_restart(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -286,14 +340,14 @@ async def test_begin_restart(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_enable_remote_debugging(self, resource_group):
+ async def test_deployments_begin_enable_remote_debugging(self, resource_group):
response = await (
await self.client.deployments.begin_enable_remote_debugging(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -302,14 +356,14 @@ async def test_begin_enable_remote_debugging(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_disable_remote_debugging(self, resource_group):
+ async def test_deployments_begin_disable_remote_debugging(self, resource_group):
response = await (
await self.client.deployments.begin_disable_remote_debugging(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -318,13 +372,13 @@ async def test_begin_disable_remote_debugging(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_remote_debugging_config(self, resource_group):
+ async def test_deployments_get_remote_debugging_config(self, resource_group):
response = await self.client.deployments.get_remote_debugging_config(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -332,13 +386,13 @@ async def test_get_remote_debugging_config(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_log_file_url(self, resource_group):
+ async def test_deployments_get_log_file_url(self, resource_group):
response = await self.client.deployments.get_log_file_url(
resource_group_name=resource_group.name,
service_name="str",
app_name="str",
deployment_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -346,7 +400,7 @@ async def test_get_log_file_url(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_generate_heap_dump(self, resource_group):
+ async def test_deployments_begin_generate_heap_dump(self, resource_group):
response = await (
await self.client.deployments.begin_generate_heap_dump(
resource_group_name=resource_group.name,
@@ -354,7 +408,7 @@ async def test_begin_generate_heap_dump(self, resource_group):
app_name="str",
deployment_name="str",
diagnostic_parameters={"appInstance": "str", "duration": "str", "filePath": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -363,7 +417,7 @@ async def test_begin_generate_heap_dump(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_generate_thread_dump(self, resource_group):
+ async def test_deployments_begin_generate_thread_dump(self, resource_group):
response = await (
await self.client.deployments.begin_generate_thread_dump(
resource_group_name=resource_group.name,
@@ -371,7 +425,7 @@ async def test_begin_generate_thread_dump(self, resource_group):
app_name="str",
deployment_name="str",
diagnostic_parameters={"appInstance": "str", "duration": "str", "filePath": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -380,7 +434,7 @@ async def test_begin_generate_thread_dump(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_start_jfr(self, resource_group):
+ async def test_deployments_begin_start_jfr(self, resource_group):
response = await (
await self.client.deployments.begin_start_jfr(
resource_group_name=resource_group.name,
@@ -388,7 +442,7 @@ async def test_begin_start_jfr(self, resource_group):
app_name="str",
deployment_name="str",
diagnostic_parameters={"appInstance": "str", "duration": "str", "filePath": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations.py
index 9b9d9d045589..c10aa2b32b36 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_dev_tool_portals_list(self, resource_group):
response = self.client.dev_tool_portals.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_dev_tool_portals_get(self, resource_group):
response = self.client.dev_tool_portals.get(
resource_group_name=resource_group.name,
service_name="str",
dev_tool_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_dev_tool_portals_begin_create_or_update(self, resource_group):
response = self.client.dev_tool_portals.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -85,7 +85,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -93,12 +93,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_dev_tool_portals_begin_delete(self, resource_group):
response = self.client.dev_tool_portals.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
dev_tool_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations_async.py
index f1be0a622084..ae76c43c8223 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_dev_tool_portals_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_dev_tool_portals_list(self, resource_group):
response = self.client.dev_tool_portals.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_dev_tool_portals_get(self, resource_group):
response = await self.client.dev_tool_portals.get(
resource_group_name=resource_group.name,
service_name="str",
dev_tool_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_dev_tool_portals_begin_create_or_update(self, resource_group):
response = await (
await self.client.dev_tool_portals.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -87,7 +87,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -96,13 +96,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_dev_tool_portals_begin_delete(self, resource_group):
response = await (
await self.client.dev_tool_portals.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
dev_tool_portal_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_eureka_servers_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_eureka_servers_operations.py
new file mode 100644
index 000000000000..3a19ba552884
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_eureka_servers_operations.py
@@ -0,0 +1,103 @@
+# 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 pytest
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementEurekaServersOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_eureka_servers_list(self, resource_group):
+ response = self.client.eureka_servers.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_eureka_servers_get(self, resource_group):
+ response = self.client.eureka_servers.get(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_eureka_servers_begin_update_put(self, resource_group):
+ response = self.client.eureka_servers.begin_update_put(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ eureka_server_resource={
+ "id": "str",
+ "name": "str",
+ "properties": {
+ "enabledState": "str",
+ "error": {"code": "str", "message": "str"},
+ "provisioningState": "str",
+ },
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_eureka_servers_begin_update_patch(self, resource_group):
+ response = self.client.eureka_servers.begin_update_patch(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ eureka_server_resource={
+ "id": "str",
+ "name": "str",
+ "properties": {
+ "enabledState": "str",
+ "error": {"code": "str", "message": "str"},
+ "provisioningState": "str",
+ },
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_eureka_servers_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_eureka_servers_operations_async.py
new file mode 100644
index 000000000000..2529dfeee57d
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_eureka_servers_operations_async.py
@@ -0,0 +1,108 @@
+# 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 pytest
+from azure.mgmt.appplatform.aio import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementEurekaServersOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_eureka_servers_list(self, resource_group):
+ response = await self.client.eureka_servers.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_eureka_servers_get(self, resource_group):
+ response = await self.client.eureka_servers.get(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_eureka_servers_begin_update_put(self, resource_group):
+ response = await (
+ await self.client.eureka_servers.begin_update_put(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ eureka_server_resource={
+ "id": "str",
+ "name": "str",
+ "properties": {
+ "enabledState": "str",
+ "error": {"code": "str", "message": "str"},
+ "provisioningState": "str",
+ },
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_eureka_servers_begin_update_patch(self, resource_group):
+ response = await (
+ await self.client.eureka_servers.begin_update_patch(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ eureka_server_resource={
+ "id": "str",
+ "name": "str",
+ "properties": {
+ "enabledState": "str",
+ "error": {"code": "str", "message": "str"},
+ "provisioningState": "str",
+ },
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations.py
index d123c810efb0..2fc83b94233f 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_gateway_custom_domains_get(self, resource_group):
response = self.client.gateway_custom_domains.get(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_gateway_custom_domains_begin_create_or_update(self, resource_group):
response = self.client.gateway_custom_domains.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -54,7 +54,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -62,13 +62,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_gateway_custom_domains_begin_delete(self, resource_group):
response = self.client.gateway_custom_domains.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -76,12 +76,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_gateway_custom_domains_list(self, resource_group):
response = self.client.gateway_custom_domains.list(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations_async.py
index 46199fdef556..5278b81355b4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_custom_domains_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_gateway_custom_domains_get(self, resource_group):
response = await self.client.gateway_custom_domains.get(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_gateway_custom_domains_begin_create_or_update(self, resource_group):
response = await (
await self.client.gateway_custom_domains.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -56,7 +56,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -65,14 +65,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_gateway_custom_domains_begin_delete(self, resource_group):
response = await (
await self.client.gateway_custom_domains.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
domain_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -81,12 +81,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_gateway_custom_domains_list(self, resource_group):
response = self.client.gateway_custom_domains.list(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations.py
index 84a45cebc986..13cc7f2413fa 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_gateway_route_configs_get(self, resource_group):
response = self.client.gateway_route_configs.get(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
route_config_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_gateway_route_configs_begin_create_or_update(self, resource_group):
response = self.client.gateway_route_configs.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -75,7 +75,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -83,13 +83,13 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_gateway_route_configs_begin_delete(self, resource_group):
response = self.client.gateway_route_configs.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
route_config_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -97,12 +97,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_gateway_route_configs_list(self, resource_group):
response = self.client.gateway_route_configs.list(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations_async.py
index b7c3dcad9d0c..897cc85baab1 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateway_route_configs_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_gateway_route_configs_get(self, resource_group):
response = await self.client.gateway_route_configs.get(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
route_config_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -35,7 +35,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_gateway_route_configs_begin_create_or_update(self, resource_group):
response = await (
await self.client.gateway_route_configs.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -77,7 +77,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -86,14 +86,14 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_gateway_route_configs_begin_delete(self, resource_group):
response = await (
await self.client.gateway_route_configs.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
route_config_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -102,12 +102,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_gateway_route_configs_list(self, resource_group):
response = self.client.gateway_route_configs.list(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations.py
index 1e39e0071d38..45299aa96200 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_gateways_get(self, resource_group):
response = self.client.gateways.get(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_gateways_begin_create_or_update(self, resource_group):
response = self.client.gateways.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -42,6 +42,7 @@ def test_begin_create_or_update(self, resource_group):
"id": "str",
"name": "str",
"properties": {
+ "addonConfigs": {"str": {}},
"apiMetadataProperties": {
"description": "str",
"documentation": "str",
@@ -49,6 +50,7 @@ def test_begin_create_or_update(self, resource_group):
"title": "str",
"version": "str",
},
+ "apmTypes": ["str"],
"apms": [{"resourceId": "str"}],
"clientAuth": {"certificateVerification": "Disabled", "certificates": ["str"]},
"corsProperties": {
@@ -70,6 +72,7 @@ def test_begin_create_or_update(self, resource_group):
"provisioningState": "str",
"public": False,
"resourceRequests": {"cpu": "1", "memory": "2Gi"},
+ "responseCacheProperties": "gateway_response_cache_properties",
"ssoProperties": {"clientId": "str", "clientSecret": "str", "issuerUri": "str", "scope": ["str"]},
"url": "str",
},
@@ -84,7 +87,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -92,12 +95,26 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_gateways_begin_update_capacity(self, resource_group):
+ response = self.client.gateways.begin_update_capacity(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ gateway_name="str",
+ gateway_capacity_resource={"sku": {"capacity": 0, "name": "S0", "tier": "Standard"}},
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_gateways_begin_delete(self, resource_group):
response = self.client.gateways.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -105,12 +122,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_env_secrets(self, resource_group):
+ def test_gateways_list_env_secrets(self, resource_group):
response = self.client.gateways.list_env_secrets(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -118,12 +135,12 @@ def test_list_env_secrets(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_restart(self, resource_group):
+ def test_gateways_begin_restart(self, resource_group):
response = self.client.gateways.begin_restart(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -131,11 +148,11 @@ def test_begin_restart(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_gateways_list(self, resource_group):
response = self.client.gateways.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -143,13 +160,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_validate_domain(self, resource_group):
+ def test_gateways_validate_domain(self, resource_group):
response = self.client.gateways.validate_domain(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
validate_payload={"name": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations_async.py
index c687a1578913..9934d45e6bf2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_gateways_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_gateways_get(self, resource_group):
response = await self.client.gateways.get(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_gateways_begin_create_or_update(self, resource_group):
response = await (
await self.client.gateways.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -44,6 +44,7 @@ async def test_begin_create_or_update(self, resource_group):
"id": "str",
"name": "str",
"properties": {
+ "addonConfigs": {"str": {}},
"apiMetadataProperties": {
"description": "str",
"documentation": "str",
@@ -51,6 +52,7 @@ async def test_begin_create_or_update(self, resource_group):
"title": "str",
"version": "str",
},
+ "apmTypes": ["str"],
"apms": [{"resourceId": "str"}],
"clientAuth": {"certificateVerification": "Disabled", "certificates": ["str"]},
"corsProperties": {
@@ -72,6 +74,7 @@ async def test_begin_create_or_update(self, resource_group):
"provisioningState": "str",
"public": False,
"resourceRequests": {"cpu": "1", "memory": "2Gi"},
+ "responseCacheProperties": "gateway_response_cache_properties",
"ssoProperties": {
"clientId": "str",
"clientSecret": "str",
@@ -91,7 +94,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -100,13 +103,29 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_gateways_begin_update_capacity(self, resource_group):
+ response = await (
+ await self.client.gateways.begin_update_capacity(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ gateway_name="str",
+ gateway_capacity_resource={"sku": {"capacity": 0, "name": "S0", "tier": "Standard"}},
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_gateways_begin_delete(self, resource_group):
response = await (
await self.client.gateways.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -115,12 +134,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_env_secrets(self, resource_group):
+ async def test_gateways_list_env_secrets(self, resource_group):
response = await self.client.gateways.list_env_secrets(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -128,13 +147,13 @@ async def test_list_env_secrets(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_restart(self, resource_group):
+ async def test_gateways_begin_restart(self, resource_group):
response = await (
await self.client.gateways.begin_restart(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -143,11 +162,11 @@ async def test_begin_restart(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_gateways_list(self, resource_group):
response = self.client.gateways.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -155,13 +174,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_validate_domain(self, resource_group):
+ async def test_gateways_validate_domain(self, resource_group):
response = await self.client.gateways.validate_domain(
resource_group_name=resource_group.name,
service_name="str",
gateway_name="str",
validate_payload={"name": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_execution_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_execution_operations.py
new file mode 100644
index 000000000000..3e74833ae12e
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_execution_operations.py
@@ -0,0 +1,61 @@
+# 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 pytest
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobExecutionOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_execution_begin_cancel(self, resource_group):
+ response = self.client.job_execution.begin_cancel(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_execution_name="str",
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_execution_get(self, resource_group):
+ response = self.client.job_execution.get(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_execution_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_execution_list_env_secrets(self, resource_group):
+ response = self.client.job_execution.list_env_secrets(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_execution_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_execution_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_execution_operations_async.py
new file mode 100644
index 000000000000..e7937493e8c9
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_execution_operations_async.py
@@ -0,0 +1,64 @@
+# 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 pytest
+from azure.mgmt.appplatform.aio import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobExecutionOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_execution_begin_cancel(self, resource_group):
+ response = await (
+ await self.client.job_execution.begin_cancel(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_execution_name="str",
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_execution_get(self, resource_group):
+ response = await self.client.job_execution.get(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_execution_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_execution_list_env_secrets(self, resource_group):
+ response = await self.client.job_execution.list_env_secrets(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_execution_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_executions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_executions_operations.py
new file mode 100644
index 000000000000..1ea9870c425a
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_executions_operations.py
@@ -0,0 +1,32 @@
+# 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 pytest
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobExecutionsOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_executions_list(self, resource_group):
+ response = self.client.job_executions.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_executions_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_executions_operations_async.py
new file mode 100644
index 000000000000..2d1ff2ae3478
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_executions_operations_async.py
@@ -0,0 +1,33 @@
+# 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 pytest
+from azure.mgmt.appplatform.aio import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobExecutionsOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_executions_list(self, resource_group):
+ response = self.client.job_executions.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_operations.py
new file mode 100644
index 000000000000..4431cb97f0c4
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_operations.py
@@ -0,0 +1,108 @@
+# 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 pytest
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_get(self, resource_group):
+ response = self.client.job.get(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_begin_create_or_update(self, resource_group):
+ response = self.client.job.begin_create_or_update(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_resource={
+ "id": "str",
+ "name": "str",
+ "properties": {
+ "managedComponentReferences": [{"resourceId": "str"}],
+ "provisioningState": "str",
+ "source": "user_source_info",
+ "template": {
+ "args": ["str"],
+ "environmentVariables": [{"name": "str", "secretValue": "str", "value": "str"}],
+ "resourceRequests": {"cpu": "1", "memory": "2Gi"},
+ },
+ "triggerConfig": "job_trigger_config",
+ },
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_begin_delete(self, resource_group):
+ response = self.client.job.begin_delete(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_begin_start(self, resource_group):
+ response = self.client.job.begin_start(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_job_list_env_secrets(self, resource_group):
+ response = self.client.job.list_env_secrets(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_operations_async.py
new file mode 100644
index 000000000000..b36812d9f162
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_job_operations_async.py
@@ -0,0 +1,115 @@
+# 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 pytest
+from azure.mgmt.appplatform.aio import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_get(self, resource_group):
+ response = await self.client.job.get(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_begin_create_or_update(self, resource_group):
+ response = await (
+ await self.client.job.begin_create_or_update(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ job_resource={
+ "id": "str",
+ "name": "str",
+ "properties": {
+ "managedComponentReferences": [{"resourceId": "str"}],
+ "provisioningState": "str",
+ "source": "user_source_info",
+ "template": {
+ "args": ["str"],
+ "environmentVariables": [{"name": "str", "secretValue": "str", "value": "str"}],
+ "resourceRequests": {"cpu": "1", "memory": "2Gi"},
+ },
+ "triggerConfig": "job_trigger_config",
+ },
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_begin_delete(self, resource_group):
+ response = await (
+ await self.client.job.begin_delete(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_begin_start(self, resource_group):
+ response = await (
+ await self.client.job.begin_start(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_job_list_env_secrets(self, resource_group):
+ response = await self.client.job.list_env_secrets(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ job_name="str",
+ api_version="2024-05-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_jobs_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_jobs_operations.py
new file mode 100644
index 000000000000..716e32068165
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_jobs_operations.py
@@ -0,0 +1,31 @@
+# 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 pytest
+from azure.mgmt.appplatform import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobsOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_jobs_list(self, resource_group):
+ response = self.client.jobs.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_jobs_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_jobs_operations_async.py
new file mode 100644
index 000000000000..b74960525139
--- /dev/null
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_jobs_operations_async.py
@@ -0,0 +1,32 @@
+# 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 pytest
+from azure.mgmt.appplatform.aio import AppPlatformManagementClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAppPlatformManagementJobsOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AppPlatformManagementClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_jobs_list(self, resource_group):
+ response = self.client.jobs.list(
+ resource_group_name=resource_group.name,
+ service_name="str",
+ api_version="2024-05-01-preview",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations.py
index 49153a3909f5..57feee090e4c 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_monitoring_settings_get(self, resource_group):
response = self.client.monitoring_settings.get(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -32,7 +32,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update_put(self, resource_group):
+ def test_monitoring_settings_begin_update_put(self, resource_group):
response = self.client.monitoring_settings.begin_update_put(
resource_group_name=resource_group.name,
service_name="str",
@@ -57,7 +57,7 @@ def test_begin_update_put(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -65,7 +65,7 @@ def test_begin_update_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update_patch(self, resource_group):
+ def test_monitoring_settings_begin_update_patch(self, resource_group):
response = self.client.monitoring_settings.begin_update_patch(
resource_group_name=resource_group.name,
service_name="str",
@@ -90,7 +90,7 @@ def test_begin_update_patch(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations_async.py
index 226b4f68e7c1..57a081cffda2 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_monitoring_settings_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_monitoring_settings_get(self, resource_group):
response = await self.client.monitoring_settings.get(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update_put(self, resource_group):
+ async def test_monitoring_settings_begin_update_put(self, resource_group):
response = await (
await self.client.monitoring_settings.begin_update_put(
resource_group_name=resource_group.name,
@@ -59,7 +59,7 @@ async def test_begin_update_put(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -68,7 +68,7 @@ async def test_begin_update_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update_patch(self, resource_group):
+ async def test_monitoring_settings_begin_update_patch(self, resource_group):
response = await (
await self.client.monitoring_settings.begin_update_patch(
resource_group_name=resource_group.name,
@@ -94,7 +94,7 @@ async def test_begin_update_patch(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations.py
index 951ad278b0b9..c91aa526fda7 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations.py
@@ -20,9 +20,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_operations_list(self, resource_group):
response = self.client.operations.list(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations_async.py
index 531affd8feca..139593cc2855 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_operations_async.py
@@ -21,9 +21,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_operations_list(self, resource_group):
response = self.client.operations.list(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations.py
index bfce766d4261..4ee0bf479252 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_predefined_accelerators_list(self, resource_group):
response = self.client.predefined_accelerators.list(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_predefined_accelerators_get(self, resource_group):
response = self.client.predefined_accelerators.get(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
predefined_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -47,13 +47,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_disable(self, resource_group):
+ def test_predefined_accelerators_begin_disable(self, resource_group):
response = self.client.predefined_accelerators.begin_disable(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
predefined_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -61,13 +61,13 @@ def test_begin_disable(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_enable(self, resource_group):
+ def test_predefined_accelerators_begin_enable(self, resource_group):
response = self.client.predefined_accelerators.begin_enable(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
predefined_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations_async.py
index d3c4890c071f..af62238e36e4 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_predefined_accelerators_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_predefined_accelerators_list(self, resource_group):
response = self.client.predefined_accelerators.list(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_predefined_accelerators_get(self, resource_group):
response = await self.client.predefined_accelerators.get(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
predefined_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -48,14 +48,14 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_disable(self, resource_group):
+ async def test_predefined_accelerators_begin_disable(self, resource_group):
response = await (
await self.client.predefined_accelerators.begin_disable(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
predefined_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -64,14 +64,14 @@ async def test_begin_disable(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_enable(self, resource_group):
+ async def test_predefined_accelerators_begin_enable(self, resource_group):
response = await (
await self.client.predefined_accelerators.begin_enable(
resource_group_name=resource_group.name,
service_name="str",
application_accelerator_name="str",
predefined_accelerator_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations.py
index 0dc96c5bfaf3..4ba4434ff813 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations.py
@@ -20,9 +20,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_runtime_versions(self, resource_group):
+ def test_runtime_versions_list_runtime_versions(self, resource_group):
response = self.client.runtime_versions.list_runtime_versions(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations_async.py
index a8916a163876..8d4cc5606139 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_runtime_versions_operations_async.py
@@ -21,9 +21,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_runtime_versions(self, resource_group):
+ async def test_runtime_versions_list_runtime_versions(self, resource_group):
response = await self.client.runtime_versions.list_runtime_versions(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations.py
index ab26ec6af446..5bb7619e13d3 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_service_registries_get(self, resource_group):
response = self.client.service_registries.get(
resource_group_name=resource_group.name,
service_name="str",
service_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_service_registries_begin_create_or_update(self, resource_group):
response = self.client.service_registries.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
service_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -46,12 +46,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_service_registries_begin_delete(self, resource_group):
response = self.client.service_registries.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
service_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -59,11 +59,11 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_service_registries_list(self, resource_group):
response = self.client.service_registries.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations_async.py
index f96fe9e1c133..55a6bd1e1fcf 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_service_registries_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_service_registries_get(self, resource_group):
response = await self.client.service_registries.get(
resource_group_name=resource_group.name,
service_name="str",
service_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_service_registries_begin_create_or_update(self, resource_group):
response = await (
await self.client.service_registries.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
service_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -49,13 +49,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_service_registries_begin_delete(self, resource_group):
response = await (
await self.client.service_registries.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
service_registry_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -64,11 +64,11 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_service_registries_list(self, resource_group):
response = self.client.service_registries.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations.py
index 49ad6342d828..31630004d304 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_services_get(self, resource_group):
response = self.client.services.get(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -32,16 +32,20 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_services_begin_create_or_update(self, resource_group):
response = self.client.services.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
resource={
"id": "str",
+ "identity": {"type": "str", "principalId": "str", "tenantId": "str"},
"location": "str",
"name": "str",
"properties": {
"fqdn": "str",
+ "infraResourceGroup": "str",
+ "maintenanceScheduleConfiguration": "maintenance_schedule_configuration",
+ "managedEnvironmentId": "str",
"marketplaceResource": {"plan": "str", "product": "str", "publisher": "str"},
"networkProfile": {
"appNetworkResourceGroup": "str",
@@ -60,7 +64,12 @@ def test_begin_create_or_update(self, resource_group):
"provisioningState": "str",
"serviceId": "str",
"version": 0,
- "vnetAddons": {"dataPlanePublicEndpoint": False, "logStreamPublicEndpoint": False},
+ "vnetAddons": {
+ "dataPlanePublicEndpoint": False,
+ "logStreamPublicEndpoint": False,
+ "privateDnsZoneId": "str",
+ "privateStorageAccess": "str",
+ },
"zoneRedundant": False,
},
"sku": {"capacity": 0, "name": "S0", "tier": "Standard"},
@@ -75,7 +84,7 @@ def test_begin_create_or_update(self, resource_group):
"tags": {"str": "str"},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -83,11 +92,11 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_services_begin_delete(self, resource_group):
response = self.client.services.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -95,16 +104,20 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update(self, resource_group):
+ def test_services_begin_update(self, resource_group):
response = self.client.services.begin_update(
resource_group_name=resource_group.name,
service_name="str",
resource={
"id": "str",
+ "identity": {"type": "str", "principalId": "str", "tenantId": "str"},
"location": "str",
"name": "str",
"properties": {
"fqdn": "str",
+ "infraResourceGroup": "str",
+ "maintenanceScheduleConfiguration": "maintenance_schedule_configuration",
+ "managedEnvironmentId": "str",
"marketplaceResource": {"plan": "str", "product": "str", "publisher": "str"},
"networkProfile": {
"appNetworkResourceGroup": "str",
@@ -123,7 +136,12 @@ def test_begin_update(self, resource_group):
"provisioningState": "str",
"serviceId": "str",
"version": 0,
- "vnetAddons": {"dataPlanePublicEndpoint": False, "logStreamPublicEndpoint": False},
+ "vnetAddons": {
+ "dataPlanePublicEndpoint": False,
+ "logStreamPublicEndpoint": False,
+ "privateDnsZoneId": "str",
+ "privateStorageAccess": "str",
+ },
"zoneRedundant": False,
},
"sku": {"capacity": 0, "name": "S0", "tier": "Standard"},
@@ -138,7 +156,7 @@ def test_begin_update(self, resource_group):
"tags": {"str": "str"},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -146,11 +164,11 @@ def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_test_keys(self, resource_group):
+ def test_services_list_test_keys(self, resource_group):
response = self.client.services.list_test_keys(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -158,12 +176,12 @@ def test_list_test_keys(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_regenerate_test_key(self, resource_group):
+ def test_services_regenerate_test_key(self, resource_group):
response = self.client.services.regenerate_test_key(
resource_group_name=resource_group.name,
service_name="str",
regenerate_test_key_request={"keyType": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -171,11 +189,11 @@ def test_regenerate_test_key(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_disable_test_endpoint(self, resource_group):
+ def test_services_disable_test_endpoint(self, resource_group):
response = self.client.services.disable_test_endpoint(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -183,11 +201,11 @@ def test_disable_test_endpoint(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_enable_test_endpoint(self, resource_group):
+ def test_services_enable_test_endpoint(self, resource_group):
response = self.client.services.enable_test_endpoint(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -195,11 +213,11 @@ def test_enable_test_endpoint(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_stop(self, resource_group):
+ def test_services_begin_stop(self, resource_group):
response = self.client.services.begin_stop(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -207,11 +225,11 @@ def test_begin_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_start(self, resource_group):
+ def test_services_begin_start(self, resource_group):
response = self.client.services.begin_start(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -219,11 +237,11 @@ def test_begin_start(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_flush_vnet_dns_setting(self, resource_group):
+ def test_services_begin_flush_vnet_dns_setting(self, resource_group):
response = self.client.services.begin_flush_vnet_dns_setting(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -231,11 +249,11 @@ def test_begin_flush_vnet_dns_setting(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_supported_apm_types(self, resource_group):
+ def test_services_list_supported_apm_types(self, resource_group):
response = self.client.services.list_supported_apm_types(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -243,11 +261,11 @@ def test_list_supported_apm_types(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_globally_enabled_apms(self, resource_group):
+ def test_services_list_globally_enabled_apms(self, resource_group):
response = self.client.services.list_globally_enabled_apms(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -255,12 +273,12 @@ def test_list_globally_enabled_apms(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_enable_apm_globally(self, resource_group):
+ def test_services_begin_enable_apm_globally(self, resource_group):
response = self.client.services.begin_enable_apm_globally(
resource_group_name=resource_group.name,
service_name="str",
apm={"resourceId": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -268,12 +286,12 @@ def test_begin_enable_apm_globally(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_disable_apm_globally(self, resource_group):
+ def test_services_begin_disable_apm_globally(self, resource_group):
response = self.client.services.begin_disable_apm_globally(
resource_group_name=resource_group.name,
service_name="str",
apm={"resourceId": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -281,11 +299,11 @@ def test_begin_disable_apm_globally(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_check_name_availability(self, resource_group):
+ def test_services_check_name_availability(self, resource_group):
response = self.client.services.check_name_availability(
location="str",
availability_parameters={"name": "str", "type": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -293,9 +311,9 @@ def test_check_name_availability(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_subscription(self, resource_group):
+ def test_services_list_by_subscription(self, resource_group):
response = self.client.services.list_by_subscription(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -303,10 +321,10 @@ def test_list_by_subscription(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_services_list(self, resource_group):
response = self.client.services.list(
resource_group_name=resource_group.name,
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -314,11 +332,11 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_supported_server_versions(self, resource_group):
+ def test_services_list_supported_server_versions(self, resource_group):
response = self.client.services.list_supported_server_versions(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations_async.py
index d7577b2d3a05..f18708cc9a64 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_services_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_services_get(self, resource_group):
response = await self.client.services.get(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,17 +33,21 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_services_begin_create_or_update(self, resource_group):
response = await (
await self.client.services.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
resource={
"id": "str",
+ "identity": {"type": "str", "principalId": "str", "tenantId": "str"},
"location": "str",
"name": "str",
"properties": {
"fqdn": "str",
+ "infraResourceGroup": "str",
+ "maintenanceScheduleConfiguration": "maintenance_schedule_configuration",
+ "managedEnvironmentId": "str",
"marketplaceResource": {"plan": "str", "product": "str", "publisher": "str"},
"networkProfile": {
"appNetworkResourceGroup": "str",
@@ -62,7 +66,12 @@ async def test_begin_create_or_update(self, resource_group):
"provisioningState": "str",
"serviceId": "str",
"version": 0,
- "vnetAddons": {"dataPlanePublicEndpoint": False, "logStreamPublicEndpoint": False},
+ "vnetAddons": {
+ "dataPlanePublicEndpoint": False,
+ "logStreamPublicEndpoint": False,
+ "privateDnsZoneId": "str",
+ "privateStorageAccess": "str",
+ },
"zoneRedundant": False,
},
"sku": {"capacity": 0, "name": "S0", "tier": "Standard"},
@@ -77,7 +86,7 @@ async def test_begin_create_or_update(self, resource_group):
"tags": {"str": "str"},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -86,12 +95,12 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_services_begin_delete(self, resource_group):
response = await (
await self.client.services.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -100,17 +109,21 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update(self, resource_group):
+ async def test_services_begin_update(self, resource_group):
response = await (
await self.client.services.begin_update(
resource_group_name=resource_group.name,
service_name="str",
resource={
"id": "str",
+ "identity": {"type": "str", "principalId": "str", "tenantId": "str"},
"location": "str",
"name": "str",
"properties": {
"fqdn": "str",
+ "infraResourceGroup": "str",
+ "maintenanceScheduleConfiguration": "maintenance_schedule_configuration",
+ "managedEnvironmentId": "str",
"marketplaceResource": {"plan": "str", "product": "str", "publisher": "str"},
"networkProfile": {
"appNetworkResourceGroup": "str",
@@ -129,7 +142,12 @@ async def test_begin_update(self, resource_group):
"provisioningState": "str",
"serviceId": "str",
"version": 0,
- "vnetAddons": {"dataPlanePublicEndpoint": False, "logStreamPublicEndpoint": False},
+ "vnetAddons": {
+ "dataPlanePublicEndpoint": False,
+ "logStreamPublicEndpoint": False,
+ "privateDnsZoneId": "str",
+ "privateStorageAccess": "str",
+ },
"zoneRedundant": False,
},
"sku": {"capacity": 0, "name": "S0", "tier": "Standard"},
@@ -144,7 +162,7 @@ async def test_begin_update(self, resource_group):
"tags": {"str": "str"},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -153,11 +171,11 @@ async def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_test_keys(self, resource_group):
+ async def test_services_list_test_keys(self, resource_group):
response = await self.client.services.list_test_keys(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -165,12 +183,12 @@ async def test_list_test_keys(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_regenerate_test_key(self, resource_group):
+ async def test_services_regenerate_test_key(self, resource_group):
response = await self.client.services.regenerate_test_key(
resource_group_name=resource_group.name,
service_name="str",
regenerate_test_key_request={"keyType": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -178,11 +196,11 @@ async def test_regenerate_test_key(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_disable_test_endpoint(self, resource_group):
+ async def test_services_disable_test_endpoint(self, resource_group):
response = await self.client.services.disable_test_endpoint(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -190,11 +208,11 @@ async def test_disable_test_endpoint(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_enable_test_endpoint(self, resource_group):
+ async def test_services_enable_test_endpoint(self, resource_group):
response = await self.client.services.enable_test_endpoint(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -202,12 +220,12 @@ async def test_enable_test_endpoint(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_stop(self, resource_group):
+ async def test_services_begin_stop(self, resource_group):
response = await (
await self.client.services.begin_stop(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -216,12 +234,12 @@ async def test_begin_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_start(self, resource_group):
+ async def test_services_begin_start(self, resource_group):
response = await (
await self.client.services.begin_start(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -230,12 +248,12 @@ async def test_begin_start(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_flush_vnet_dns_setting(self, resource_group):
+ async def test_services_begin_flush_vnet_dns_setting(self, resource_group):
response = await (
await self.client.services.begin_flush_vnet_dns_setting(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -244,11 +262,11 @@ async def test_begin_flush_vnet_dns_setting(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_supported_apm_types(self, resource_group):
+ async def test_services_list_supported_apm_types(self, resource_group):
response = self.client.services.list_supported_apm_types(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -256,11 +274,11 @@ async def test_list_supported_apm_types(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_globally_enabled_apms(self, resource_group):
+ async def test_services_list_globally_enabled_apms(self, resource_group):
response = await self.client.services.list_globally_enabled_apms(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -268,13 +286,13 @@ async def test_list_globally_enabled_apms(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_enable_apm_globally(self, resource_group):
+ async def test_services_begin_enable_apm_globally(self, resource_group):
response = await (
await self.client.services.begin_enable_apm_globally(
resource_group_name=resource_group.name,
service_name="str",
apm={"resourceId": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -283,13 +301,13 @@ async def test_begin_enable_apm_globally(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_disable_apm_globally(self, resource_group):
+ async def test_services_begin_disable_apm_globally(self, resource_group):
response = await (
await self.client.services.begin_disable_apm_globally(
resource_group_name=resource_group.name,
service_name="str",
apm={"resourceId": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -298,11 +316,11 @@ async def test_begin_disable_apm_globally(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_check_name_availability(self, resource_group):
+ async def test_services_check_name_availability(self, resource_group):
response = await self.client.services.check_name_availability(
location="str",
availability_parameters={"name": "str", "type": "str"},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -310,9 +328,9 @@ async def test_check_name_availability(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_subscription(self, resource_group):
+ async def test_services_list_by_subscription(self, resource_group):
response = self.client.services.list_by_subscription(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -320,10 +338,10 @@ async def test_list_by_subscription(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_services_list(self, resource_group):
response = self.client.services.list(
resource_group_name=resource_group.name,
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -331,11 +349,11 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_supported_server_versions(self, resource_group):
+ async def test_services_list_supported_server_versions(self, resource_group):
response = self.client.services.list_supported_server_versions(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations.py
index cdfe991b5f6b..5edbef9d91b8 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations.py
@@ -20,9 +20,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_skus_list(self, resource_group):
response = self.client.skus.list(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations_async.py
index 84ef2fc4e449..f8c92f6738be 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_skus_operations_async.py
@@ -21,9 +21,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_skus_list(self, resource_group):
response = self.client.skus.list(
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations.py
index 56ddc2fc9a9c..aa9c07e789e5 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_storages_get(self, resource_group):
response = self.client.storages.get(
resource_group_name=resource_group.name,
service_name="str",
storage_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -33,7 +33,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_storages_begin_create_or_update(self, resource_group):
response = self.client.storages.begin_create_or_update(
resource_group_name=resource_group.name,
service_name="str",
@@ -52,7 +52,7 @@ def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -60,12 +60,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_storages_begin_delete(self, resource_group):
response = self.client.storages.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
storage_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -73,11 +73,11 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_storages_list(self, resource_group):
response = self.client.storages.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations_async.py b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations_async.py
index f88d5975894b..c2b01c40ea3a 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations_async.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/generated_tests/test_app_platform_management_storages_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_storages_get(self, resource_group):
response = await self.client.storages.get(
resource_group_name=resource_group.name,
service_name="str",
storage_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
# please add some check logic here by yourself
@@ -34,7 +34,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_storages_begin_create_or_update(self, resource_group):
response = await (
await self.client.storages.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -54,7 +54,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"type": "str",
},
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -63,13 +63,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_storages_begin_delete(self, resource_group):
response = await (
await self.client.storages.begin_delete(
resource_group_name=resource_group.name,
service_name="str",
storage_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -78,11 +78,11 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_storages_list(self, resource_group):
response = self.client.storages.list(
resource_group_name=resource_group.name,
service_name="str",
- api_version="2023-12-01",
+ api_version="2024-05-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/appplatform/azure-mgmt-appplatform/setup.py b/sdk/appplatform/azure-mgmt-appplatform/setup.py
index 7a26efe84f17..0d0726858c39 100644
--- a/sdk/appplatform/azure-mgmt-appplatform/setup.py
+++ b/sdk/appplatform/azure-mgmt-appplatform/setup.py
@@ -22,11 +22,9 @@
# Version extraction inspired from 'requests'
with open(
- (
- os.path.join(package_folder_path, "version.py")
- if os.path.exists(os.path.join(package_folder_path, "version.py"))
- else os.path.join(package_folder_path, "_version.py")
- ),
+ os.path.join(package_folder_path, "version.py")
+ if os.path.exists(os.path.join(package_folder_path, "version.py"))
+ else os.path.join(package_folder_path, "_version.py"),
"r",
) as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)