diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json b/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
index 2b97d51948d3..b28cb3bb5cf3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "4cd95123fb961c68740565a1efcaa5e43bd35802",
+ "commit": "7351a69682622681d6f8daa6a000f7827443dd7d",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
- "autorest_command": "autorest specification/app/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
+ "autorest_command": "autorest specification/app/resource-manager/readme.md --generate-sample=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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/app/resource-manager/readme.md"
}
\ No newline at end of file
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_configuration.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_configuration.py
index 8c597d56b1c9..2fe01d5cd124 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_configuration.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_configuration.py
@@ -29,14 +29,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
- :keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2023-08-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:
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
- api_version: str = kwargs.pop("api_version", "2023-05-01")
+ api_version: str = kwargs.pop("api_version", "2023-08-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py
index a40beedb16fa..08f410baef00 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py
@@ -18,6 +18,8 @@
from .operations import (
AvailableWorkloadProfilesOperations,
BillingMetersOperations,
+ BuildersOperations,
+ BuildsOperations,
CertificatesOperations,
ConnectedEnvironmentsCertificatesOperations,
ConnectedEnvironmentsDaprComponentsOperations,
@@ -35,11 +37,14 @@
JobsOperations,
ManagedCertificatesOperations,
ManagedEnvironmentDiagnosticsOperations,
+ ManagedEnvironmentUsagesOperations,
ManagedEnvironmentsDiagnosticsOperations,
ManagedEnvironmentsOperations,
ManagedEnvironmentsStoragesOperations,
NamespacesOperations,
Operations,
+ PatchesOperations,
+ UsagesOperations,
)
if TYPE_CHECKING:
@@ -60,6 +65,10 @@ class ContainerAppsAPIClient(
azure.mgmt.appcontainers.operations.AvailableWorkloadProfilesOperations
:ivar billing_meters: BillingMetersOperations operations
:vartype billing_meters: azure.mgmt.appcontainers.operations.BillingMetersOperations
+ :ivar builders: BuildersOperations operations
+ :vartype builders: azure.mgmt.appcontainers.operations.BuildersOperations
+ :ivar builds: BuildsOperations operations
+ :vartype builds: azure.mgmt.appcontainers.operations.BuildsOperations
:ivar connected_environments: ConnectedEnvironmentsOperations operations
:vartype connected_environments:
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsOperations
@@ -112,17 +121,24 @@ class ContainerAppsAPIClient(
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
:vartype managed_environments_storages:
azure.mgmt.appcontainers.operations.ManagedEnvironmentsStoragesOperations
+ :ivar patches: PatchesOperations operations
+ :vartype patches: azure.mgmt.appcontainers.operations.PatchesOperations
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
:vartype container_apps_source_controls:
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
+ :ivar usages: UsagesOperations operations
+ :vartype usages: azure.mgmt.appcontainers.operations.UsagesOperations
+ :ivar managed_environment_usages: ManagedEnvironmentUsagesOperations operations
+ :vartype managed_environment_usages:
+ azure.mgmt.appcontainers.operations.ManagedEnvironmentUsagesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
: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-05-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2023-08-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.
@@ -151,6 +167,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.builders = BuildersOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.builds = BuildsOperations(self._client, self._config, self._serialize, self._deserialize)
self.connected_environments = ConnectedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -194,9 +212,14 @@ def __init__(
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.patches = PatchesOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.managed_environment_usages = ManagedEnvironmentUsagesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_version.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_version.py
index cac9f5d10f8b..e5754a47ce68 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_version.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "3.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_configuration.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_configuration.py
index 9047e10b128d..ab1b4e964261 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_configuration.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_configuration.py
@@ -29,14 +29,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
- :keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2023-08-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:
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
- api_version: str = kwargs.pop("api_version", "2023-05-01")
+ api_version: str = kwargs.pop("api_version", "2023-08-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_container_apps_api_client.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_container_apps_api_client.py
index fc093b7cef63..fd8932f9d536 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_container_apps_api_client.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_container_apps_api_client.py
@@ -18,6 +18,8 @@
from .operations import (
AvailableWorkloadProfilesOperations,
BillingMetersOperations,
+ BuildersOperations,
+ BuildsOperations,
CertificatesOperations,
ConnectedEnvironmentsCertificatesOperations,
ConnectedEnvironmentsDaprComponentsOperations,
@@ -35,11 +37,14 @@
JobsOperations,
ManagedCertificatesOperations,
ManagedEnvironmentDiagnosticsOperations,
+ ManagedEnvironmentUsagesOperations,
ManagedEnvironmentsDiagnosticsOperations,
ManagedEnvironmentsOperations,
ManagedEnvironmentsStoragesOperations,
NamespacesOperations,
Operations,
+ PatchesOperations,
+ UsagesOperations,
)
if TYPE_CHECKING:
@@ -60,6 +65,10 @@ class ContainerAppsAPIClient(
azure.mgmt.appcontainers.aio.operations.AvailableWorkloadProfilesOperations
:ivar billing_meters: BillingMetersOperations operations
:vartype billing_meters: azure.mgmt.appcontainers.aio.operations.BillingMetersOperations
+ :ivar builders: BuildersOperations operations
+ :vartype builders: azure.mgmt.appcontainers.aio.operations.BuildersOperations
+ :ivar builds: BuildsOperations operations
+ :vartype builds: azure.mgmt.appcontainers.aio.operations.BuildsOperations
:ivar connected_environments: ConnectedEnvironmentsOperations operations
:vartype connected_environments:
azure.mgmt.appcontainers.aio.operations.ConnectedEnvironmentsOperations
@@ -112,17 +121,24 @@ class ContainerAppsAPIClient(
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
:vartype managed_environments_storages:
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsStoragesOperations
+ :ivar patches: PatchesOperations operations
+ :vartype patches: azure.mgmt.appcontainers.aio.operations.PatchesOperations
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
:vartype container_apps_source_controls:
azure.mgmt.appcontainers.aio.operations.ContainerAppsSourceControlsOperations
+ :ivar usages: UsagesOperations operations
+ :vartype usages: azure.mgmt.appcontainers.aio.operations.UsagesOperations
+ :ivar managed_environment_usages: ManagedEnvironmentUsagesOperations operations
+ :vartype managed_environment_usages:
+ azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentUsagesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
: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-05-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2023-08-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.
@@ -151,6 +167,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.builders = BuildersOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.builds = BuildsOperations(self._client, self._config, self._serialize, self._deserialize)
self.connected_environments = ConnectedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -194,9 +212,14 @@ def __init__(
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.patches = PatchesOperations(self._client, self._config, self._serialize, self._deserialize)
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.managed_environment_usages = ManagedEnvironmentUsagesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/__init__.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/__init__.py
index 839be84fdb2f..0aef78faf76a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/__init__.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/__init__.py
@@ -9,6 +9,8 @@
from ._container_apps_auth_configs_operations import ContainerAppsAuthConfigsOperations
from ._available_workload_profiles_operations import AvailableWorkloadProfilesOperations
from ._billing_meters_operations import BillingMetersOperations
+from ._builders_operations import BuildersOperations
+from ._builds_operations import BuildsOperations
from ._connected_environments_operations import ConnectedEnvironmentsOperations
from ._connected_environments_certificates_operations import ConnectedEnvironmentsCertificatesOperations
from ._connected_environments_dapr_components_operations import ConnectedEnvironmentsDaprComponentsOperations
@@ -29,7 +31,10 @@
from ._namespaces_operations import NamespacesOperations
from ._dapr_components_operations import DaprComponentsOperations
from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations
+from ._patches_operations import PatchesOperations
from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations
+from ._usages_operations import UsagesOperations
+from ._managed_environment_usages_operations import ManagedEnvironmentUsagesOperations
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
@@ -39,6 +44,8 @@
"ContainerAppsAuthConfigsOperations",
"AvailableWorkloadProfilesOperations",
"BillingMetersOperations",
+ "BuildersOperations",
+ "BuildsOperations",
"ConnectedEnvironmentsOperations",
"ConnectedEnvironmentsCertificatesOperations",
"ConnectedEnvironmentsDaprComponentsOperations",
@@ -59,7 +66,10 @@
"NamespacesOperations",
"DaprComponentsOperations",
"ManagedEnvironmentsStoragesOperations",
+ "PatchesOperations",
"ContainerAppsSourceControlsOperations",
+ "UsagesOperations",
+ "ManagedEnvironmentUsagesOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builders_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builders_operations.py
new file mode 100644
index 000000000000..381cb4fc9db1
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builders_operations.py
@@ -0,0 +1,882 @@
+# 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.
+# 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
+from typing import Any, AsyncIterable, 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,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import 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
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+from ..._vendor import _convert_request
+from ...operations._builders_operations import (
+ build_create_or_update_request,
+ build_delete_request,
+ build_get_request,
+ build_list_by_resource_group_request,
+ build_list_by_subscription_request,
+ build_update_request,
+)
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class BuildersOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`builders` 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_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.BuilderResource"]:
+ """List BuilderResource resources by subscription ID.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either BuilderResource or the result of cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderCollection] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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_by_subscription_request(
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list_by_subscription.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("BuilderCollection", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/builders"}
+
+ @distributed_trace
+ def list_by_resource_group(
+ self, resource_group_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.BuilderResource"]:
+ """List BuilderResource resources by resource group.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either BuilderResource or the result of cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderCollection] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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_by_resource_group_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list_by_resource_group.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("BuilderCollection", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ list_by_resource_group.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders"
+ }
+
+ @distributed_trace_async
+ async def get(self, resource_group_name: str, builder_name: str, **kwargs: Any) -> _models.BuilderResource:
+ """Get a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: BuilderResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.BuilderResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.BuilderResource] = kwargs.pop("cls", None)
+
+ request = build_get_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ async def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResource, IO],
+ **kwargs: Any
+ ) -> _models.BuilderResource:
+ error_map = {
+ 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[_models.BuilderResource] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(builder_envelope, (IOBase, bytes)):
+ _content = builder_envelope
+ else:
+ _json = self._serialize.body(builder_envelope, "BuilderResource")
+
+ request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ template_url=self._create_or_update_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if response.status_code == 201:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ _create_or_update_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: _models.BuilderResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuilderResource]:
+ """Create or update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: Resource create parameters. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: IO,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuilderResource]:
+ """Create or update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: Resource create parameters. Required.
+ :type builder_envelope: IO
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResource, IO],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuilderResource]:
+ """Create or update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: Resource create parameters. Is either a BuilderResource type or a IO
+ type. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResource or IO
+ :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
+ Default value is None.
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderResource] = 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,
+ builder_name=builder_name,
+ builder_envelope=builder_envelope,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_create_or_update.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ async def _update_initial(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResourceUpdate, IO],
+ **kwargs: Any
+ ) -> Optional[_models.BuilderResource]:
+ error_map = {
+ 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[Optional[_models.BuilderResource]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(builder_envelope, (IOBase, bytes)):
+ _content = builder_envelope
+ else:
+ _json = self._serialize.body(builder_envelope, "BuilderResourceUpdate")
+
+ request = build_update_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ template_url=self._update_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _update_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ @overload
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: _models.BuilderResourceUpdate,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuilderResource]:
+ """Update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: The resource properties to be updated. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResourceUpdate
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: IO,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuilderResource]:
+ """Update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: The resource properties to be updated. Required.
+ :type builder_envelope: IO
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResourceUpdate, IO],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuilderResource]:
+ """Update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: The resource properties to be updated. Is either a
+ BuilderResourceUpdate type or a IO type. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResourceUpdate or IO
+ :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
+ Default value is None.
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderResource] = 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_initial(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ builder_envelope=builder_envelope,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_update.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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[None] = kwargs.pop("cls", None)
+
+ request = build_delete_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._delete_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ @distributed_trace_async
+ async def begin_delete(self, resource_group_name: str, builder_name: str, **kwargs: Any) -> AsyncLROPoller[None]:
+ """Delete a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_delete.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_operations.py
new file mode 100644
index 000000000000..b4deab8c471e
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_operations.py
@@ -0,0 +1,593 @@
+# 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.
+# 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
+from typing import Any, AsyncIterable, 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,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import 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
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+from ..._vendor import _convert_request
+from ...operations._builds_operations import (
+ build_create_or_update_request,
+ build_delete_request,
+ build_get_request,
+ build_list_by_builder_resource_request,
+)
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class BuildsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`builds` 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_by_builder_resource(
+ self, resource_group_name: str, builder_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.BuildResource"]:
+ """List BuildResource resources by BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either BuildResource or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.BuildResource]
+ :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.BuildCollection] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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_by_builder_resource_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list_by_builder_resource.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("BuildCollection", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ list_by_builder_resource.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds"
+ }
+
+ @distributed_trace_async
+ async def get(
+ self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any
+ ) -> _models.BuildResource:
+ """Get a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: BuildResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.BuildResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.BuildResource] = kwargs.pop("cls", None)
+
+ request = build_get_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ async def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: Union[_models.BuildResource, IO],
+ **kwargs: Any
+ ) -> _models.BuildResource:
+ error_map = {
+ 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[_models.BuildResource] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(build_envelope, (IOBase, bytes)):
+ _content = build_envelope
+ else:
+ _json = self._serialize.body(build_envelope, "BuildResource")
+
+ request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ template_url=self._create_or_update_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+
+ if response.status_code == 201:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ _create_or_update_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: _models.BuildResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuildResource]:
+ """Create a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :param build_envelope: Resource create or update parameters. Required.
+ :type build_envelope: ~azure.mgmt.appcontainers.models.BuildResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuildResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuildResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: IO,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuildResource]:
+ """Create a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :param build_envelope: Resource create or update parameters. Required.
+ :type build_envelope: IO
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuildResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuildResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: Union[_models.BuildResource, IO],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.BuildResource]:
+ """Create a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :param build_envelope: Resource create or update parameters. Is either a BuildResource type or
+ a IO type. Required.
+ :type build_envelope: ~azure.mgmt.appcontainers.models.BuildResource or IO
+ :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
+ Default value is None.
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either BuildResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.BuildResource]
+ :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.BuildResource] = 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,
+ builder_name=builder_name,
+ build_name=build_name,
+ build_envelope=build_envelope,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_create_or_update.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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[None] = kwargs.pop("cls", None)
+
+ request = build_delete_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._delete_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Delete a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_delete.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_api_client_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_api_client_operations.py
index e7644744068f..6afdcbec68df 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_api_client_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_api_client_operations.py
@@ -25,7 +25,10 @@
from ... import models as _models
from ..._vendor import _convert_request
-from ...operations._container_apps_api_client_operations import build_job_execution_request
+from ...operations._container_apps_api_client_operations import (
+ build_get_custom_domain_verification_id_request,
+ build_job_execution_request,
+)
from .._vendor import ContainerAppsAPIClientMixinABC
T = TypeVar("T")
@@ -102,3 +105,59 @@ async def job_execution(
job_execution.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}"
}
+
+ @distributed_trace_async
+ async def get_custom_domain_verification_id(self, **kwargs: Any) -> str:
+ """Get the verification id of a subscription used for verifying custom domains.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: str or the result of cls(response)
+ :rtype: str
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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[str] = kwargs.pop("cls", None)
+
+ request = build_get_custom_domain_verification_id_request(
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get_custom_domain_verification_id.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("str", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get_custom_domain_verification_id.metadata = {
+ "url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_usages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_usages_operations.py
new file mode 100644
index 000000000000..c0f0dc37a360
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_usages_operations.py
@@ -0,0 +1,144 @@
+# 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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+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.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import 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 ..._vendor import _convert_request
+from ...operations._managed_environment_usages_operations import build_list_request
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ManagedEnvironmentUsagesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`managed_environment_usages` 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, environment_name: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]:
+ """Gets the current usage information as well as the limits for environment.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param environment_name: Name of the Environment. Required.
+ :type environment_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either Usage or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.Usage]
+ :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.ListUsagesResult] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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,
+ environment_name=environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("ListUsagesResult", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ list.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patches_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patches_operations.py
new file mode 100644
index 000000000000..dd53f35ea721
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_patches_operations.py
@@ -0,0 +1,590 @@
+# 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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import 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 ..._vendor import _convert_request
+from ...operations._patches_operations import (
+ build_apply_request,
+ build_delete_request,
+ build_get_request,
+ build_list_by_builder_resource_request,
+ build_skip_configure_request,
+)
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class PatchesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`patches` 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_by_builder_resource(
+ self, resource_group_name: str, builder_name: str, filter: Optional[str] = None, **kwargs: Any
+ ) -> _models.PatchCollection:
+ """List PatchResource resources by BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param filter: The filter to apply on the operation. Default value is None.
+ :type filter: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PatchCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.PatchCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.PatchCollection] = kwargs.pop("cls", None)
+
+ request = build_list_by_builder_resource_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ filter=filter,
+ api_version=api_version,
+ template_url=self.list_by_builder_resource.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("PatchCollection", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_by_builder_resource.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches"
+ }
+
+ @distributed_trace_async
+ async def get(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> _models.PatchResource:
+ """Get details for specific patch by patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PatchResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.PatchResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.PatchResource] = kwargs.pop("cls", None)
+
+ request = build_get_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("PatchResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}"
+ }
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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[None] = kwargs.pop("cls", None)
+
+ request = build_delete_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._delete_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}"
+ }
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Delete specific patch by patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_delete.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}"
+ }
+
+ async def _skip_configure_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, patch_name: str, patch_skip_config: bool, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json"))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+
+ _json = self._serialize.body(patch_skip_config, "bool")
+
+ request = build_skip_configure_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ template_url=self._skip_configure_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _skip_configure_initial.metadata = {
+ "url": "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig"
+ }
+
+ @distributed_trace_async
+ async def begin_skip_configure(
+ self, resource_group_name: str, builder_name: str, patch_name: str, patch_skip_config: bool, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Configure the patch skip option by patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :param patch_skip_config: Configure patcher to skip a patch or not. Required.
+ :type patch_skip_config: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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 = 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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json"))
+ 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._skip_configure_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ patch_skip_config=patch_skip_config,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_skip_configure.metadata = {
+ "url": "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig"
+ }
+
+ async def _apply_initial(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> Optional[_models.PatchResource]:
+ error_map = {
+ 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[Optional[_models.PatchResource]] = kwargs.pop("cls", None)
+
+ request = build_apply_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._apply_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("PatchResource", pipeline_response)
+
+ if response.status_code == 202:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _apply_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply"
+ }
+
+ @distributed_trace_async
+ async def begin_apply(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[_models.PatchResource]:
+ """Apply a PatchResource with patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either PatchResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.PatchResource]
+ :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.PatchResource] = 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._apply_initial(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("PatchResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_apply.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_usages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_usages_operations.py
new file mode 100644
index 000000000000..730415f260da
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_usages_operations.py
@@ -0,0 +1,139 @@
+# 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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+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.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import 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 ..._vendor import _convert_request
+from ...operations._usages_operations import build_list_request
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class UsagesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`usages` 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, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]:
+ """Gets, for the specified location, the current resource usage information as well as the limits
+ under the subscription.
+
+ :param location: The location for which resource usage is queried. Required.
+ :type location: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either Usage or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.Usage]
+ :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.ListUsagesResult] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("ListUsagesResult", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages"}
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/__init__.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/__init__.py
index 0c785f1782aa..f7579ac652d5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/__init__.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/__init__.py
@@ -8,6 +8,7 @@
from ._models_py3 import AllowedAudiencesValidation
from ._models_py3 import AllowedPrincipals
+from ._models_py3 import AppInsightsConfiguration
from ._models_py3 import AppLogsConfiguration
from ._models_py3 import AppRegistration
from ._models_py3 import Apple
@@ -31,6 +32,13 @@
from ._models_py3 import BillingMeter
from ._models_py3 import BillingMeterCollection
from ._models_py3 import BillingMeterProperties
+from ._models_py3 import BlobStorageTokenStore
+from ._models_py3 import BuildCollection
+from ._models_py3 import BuildConfiguration
+from ._models_py3 import BuildResource
+from ._models_py3 import BuilderCollection
+from ._models_py3 import BuilderResource
+from ._models_py3 import BuilderResourceUpdate
from ._models_py3 import Certificate
from ._models_py3 import CertificateCollection
from ._models_py3 import CertificatePatch
@@ -54,6 +62,8 @@
from ._models_py3 import ContainerAppProbeHttpGetHttpHeadersItem
from ._models_py3 import ContainerAppProbeTcpSocket
from ._models_py3 import ContainerAppSecret
+from ._models_py3 import ContainerRegistry
+from ._models_py3 import ContainerRegistryWithCustomImage
from ._models_py3 import ContainerResources
from ._models_py3 import CookieExpiration
from ._models_py3 import CorsPolicy
@@ -66,15 +76,19 @@
from ._models_py3 import CustomScaleRule
from ._models_py3 import Dapr
from ._models_py3 import DaprComponent
+from ._models_py3 import DaprComponentServiceBinding
from ._models_py3 import DaprComponentsCollection
from ._models_py3 import DaprConfiguration
from ._models_py3 import DaprMetadata
from ._models_py3 import DaprSecret
from ._models_py3 import DaprSecretsCollection
+from ._models_py3 import DaprServiceBindMetadata
+from ._models_py3 import DataDogConfiguration
from ._models_py3 import DefaultAuthorizationPolicy
from ._models_py3 import DefaultErrorResponse
from ._models_py3 import DefaultErrorResponseError
from ._models_py3 import DefaultErrorResponseErrorDetailsItem
+from ._models_py3 import DestinationsConfiguration
from ._models_py3 import DiagnosticDataProviderMetadata
from ._models_py3 import DiagnosticDataProviderMetadataPropertyBagItem
from ._models_py3 import DiagnosticDataTableResponseColumn
@@ -87,8 +101,10 @@
from ._models_py3 import DiagnosticsDefinition
from ._models_py3 import DiagnosticsProperties
from ._models_py3 import DiagnosticsStatus
+from ._models_py3 import EncryptionSettings
from ._models_py3 import EnvironmentAuthToken
from ._models_py3 import EnvironmentVar
+from ._models_py3 import EnvironmentVariable
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse
@@ -99,11 +115,13 @@
from ._models_py3 import GithubActionConfiguration
from ._models_py3 import GlobalValidation
from ._models_py3 import Google
+from ._models_py3 import HttpGet
from ._models_py3 import HttpScaleRule
from ._models_py3 import HttpSettings
from ._models_py3 import HttpSettingsRoutes
from ._models_py3 import IdentityProviders
from ._models_py3 import Ingress
+from ._models_py3 import IngressPortMapping
from ._models_py3 import IngressStickySessions
from ._models_py3 import InitContainer
from ._models_py3 import IpSecurityRestrictionRule
@@ -126,10 +144,12 @@
from ._models_py3 import JobsCollection
from ._models_py3 import JwtClaimChecks
from ._models_py3 import KedaConfiguration
+from ._models_py3 import ListUsagesResult
from ._models_py3 import LogAnalyticsConfiguration
from ._models_py3 import Login
from ._models_py3 import LoginRoutes
from ._models_py3 import LoginScopes
+from ._models_py3 import LogsConfiguration
from ._models_py3 import ManagedCertificate
from ._models_py3 import ManagedCertificateCollection
from ._models_py3 import ManagedCertificatePatch
@@ -141,14 +161,23 @@
from ._models_py3 import ManagedEnvironmentStoragesCollection
from ._models_py3 import ManagedEnvironmentsCollection
from ._models_py3 import ManagedServiceIdentity
+from ._models_py3 import MetricsConfiguration
from ._models_py3 import Mtls
from ._models_py3 import Nonce
from ._models_py3 import OpenIdConnectClientCredential
from ._models_py3 import OpenIdConnectConfig
from ._models_py3 import OpenIdConnectLogin
from ._models_py3 import OpenIdConnectRegistration
+from ._models_py3 import OpenTelemetryConfiguration
from ._models_py3 import OperationDetail
from ._models_py3 import OperationDisplay
+from ._models_py3 import PatchCollection
+from ._models_py3 import PatchDetails
+from ._models_py3 import PatchDetailsNewLayer
+from ._models_py3 import PatchDetailsOldLayer
+from ._models_py3 import PatchProperties
+from ._models_py3 import PatchResource
+from ._models_py3 import PreBuildStep
from ._models_py3 import ProxyResource
from ._models_py3 import QueueScaleRule
from ._models_py3 import RegistryCredentials
@@ -172,10 +201,14 @@
from ._models_py3 import SystemData
from ._models_py3 import TcpScaleRule
from ._models_py3 import Template
+from ._models_py3 import TokenStore
+from ._models_py3 import TracesConfiguration
from ._models_py3 import TrackedResource
from ._models_py3 import TrafficWeight
from ._models_py3 import Twitter
from ._models_py3 import TwitterRegistration
+from ._models_py3 import Usage
+from ._models_py3 import UsageName
from ._models_py3 import UserAssignedIdentity
from ._models_py3 import VnetConfiguration
from ._models_py3 import Volume
@@ -192,7 +225,11 @@
from ._container_apps_api_client_enums import AppProtocol
from ._container_apps_api_client_enums import Applicability
from ._container_apps_api_client_enums import BindingType
+from ._container_apps_api_client_enums import BuildProvisioningState
+from ._container_apps_api_client_enums import BuildStatus
+from ._container_apps_api_client_enums import BuilderProvisioningState
from ._container_apps_api_client_enums import CertificateProvisioningState
+from ._container_apps_api_client_enums import CertificateType
from ._container_apps_api_client_enums import CheckNameAvailabilityReason
from ._container_apps_api_client_enums import ConnectedEnvironmentProvisioningState
from ._container_apps_api_client_enums import ContainerAppContainerRunningState
@@ -200,6 +237,7 @@
from ._container_apps_api_client_enums import ContainerAppReplicaRunningState
from ._container_apps_api_client_enums import CookieExpirationConvention
from ._container_apps_api_client_enums import CreatedByType
+from ._container_apps_api_client_enums import DetectionStatus
from ._container_apps_api_client_enums import DnsVerificationTestResult
from ._container_apps_api_client_enums import EnvironmentProvisioningState
from ._container_apps_api_client_enums import ExtendedLocationTypes
@@ -211,6 +249,9 @@
from ._container_apps_api_client_enums import LogLevel
from ._container_apps_api_client_enums import ManagedCertificateDomainControlValidation
from ._container_apps_api_client_enums import ManagedServiceIdentityType
+from ._container_apps_api_client_enums import PatchApplyStatus
+from ._container_apps_api_client_enums import PatchProvisioningState
+from ._container_apps_api_client_enums import PatchType
from ._container_apps_api_client_enums import RevisionHealthState
from ._container_apps_api_client_enums import RevisionProvisioningState
from ._container_apps_api_client_enums import RevisionRunningState
@@ -227,6 +268,7 @@
__all__ = [
"AllowedAudiencesValidation",
"AllowedPrincipals",
+ "AppInsightsConfiguration",
"AppLogsConfiguration",
"AppRegistration",
"Apple",
@@ -250,6 +292,13 @@
"BillingMeter",
"BillingMeterCollection",
"BillingMeterProperties",
+ "BlobStorageTokenStore",
+ "BuildCollection",
+ "BuildConfiguration",
+ "BuildResource",
+ "BuilderCollection",
+ "BuilderResource",
+ "BuilderResourceUpdate",
"Certificate",
"CertificateCollection",
"CertificatePatch",
@@ -273,6 +322,8 @@
"ContainerAppProbeHttpGetHttpHeadersItem",
"ContainerAppProbeTcpSocket",
"ContainerAppSecret",
+ "ContainerRegistry",
+ "ContainerRegistryWithCustomImage",
"ContainerResources",
"CookieExpiration",
"CorsPolicy",
@@ -285,15 +336,19 @@
"CustomScaleRule",
"Dapr",
"DaprComponent",
+ "DaprComponentServiceBinding",
"DaprComponentsCollection",
"DaprConfiguration",
"DaprMetadata",
"DaprSecret",
"DaprSecretsCollection",
+ "DaprServiceBindMetadata",
+ "DataDogConfiguration",
"DefaultAuthorizationPolicy",
"DefaultErrorResponse",
"DefaultErrorResponseError",
"DefaultErrorResponseErrorDetailsItem",
+ "DestinationsConfiguration",
"DiagnosticDataProviderMetadata",
"DiagnosticDataProviderMetadataPropertyBagItem",
"DiagnosticDataTableResponseColumn",
@@ -306,8 +361,10 @@
"DiagnosticsDefinition",
"DiagnosticsProperties",
"DiagnosticsStatus",
+ "EncryptionSettings",
"EnvironmentAuthToken",
"EnvironmentVar",
+ "EnvironmentVariable",
"ErrorAdditionalInfo",
"ErrorDetail",
"ErrorResponse",
@@ -318,11 +375,13 @@
"GithubActionConfiguration",
"GlobalValidation",
"Google",
+ "HttpGet",
"HttpScaleRule",
"HttpSettings",
"HttpSettingsRoutes",
"IdentityProviders",
"Ingress",
+ "IngressPortMapping",
"IngressStickySessions",
"InitContainer",
"IpSecurityRestrictionRule",
@@ -345,10 +404,12 @@
"JobsCollection",
"JwtClaimChecks",
"KedaConfiguration",
+ "ListUsagesResult",
"LogAnalyticsConfiguration",
"Login",
"LoginRoutes",
"LoginScopes",
+ "LogsConfiguration",
"ManagedCertificate",
"ManagedCertificateCollection",
"ManagedCertificatePatch",
@@ -360,14 +421,23 @@
"ManagedEnvironmentStoragesCollection",
"ManagedEnvironmentsCollection",
"ManagedServiceIdentity",
+ "MetricsConfiguration",
"Mtls",
"Nonce",
"OpenIdConnectClientCredential",
"OpenIdConnectConfig",
"OpenIdConnectLogin",
"OpenIdConnectRegistration",
+ "OpenTelemetryConfiguration",
"OperationDetail",
"OperationDisplay",
+ "PatchCollection",
+ "PatchDetails",
+ "PatchDetailsNewLayer",
+ "PatchDetailsOldLayer",
+ "PatchProperties",
+ "PatchResource",
+ "PreBuildStep",
"ProxyResource",
"QueueScaleRule",
"RegistryCredentials",
@@ -391,10 +461,14 @@
"SystemData",
"TcpScaleRule",
"Template",
+ "TokenStore",
+ "TracesConfiguration",
"TrackedResource",
"TrafficWeight",
"Twitter",
"TwitterRegistration",
+ "Usage",
+ "UsageName",
"UserAssignedIdentity",
"VnetConfiguration",
"Volume",
@@ -410,7 +484,11 @@
"AppProtocol",
"Applicability",
"BindingType",
+ "BuildProvisioningState",
+ "BuildStatus",
+ "BuilderProvisioningState",
"CertificateProvisioningState",
+ "CertificateType",
"CheckNameAvailabilityReason",
"ConnectedEnvironmentProvisioningState",
"ContainerAppContainerRunningState",
@@ -418,6 +496,7 @@
"ContainerAppReplicaRunningState",
"CookieExpirationConvention",
"CreatedByType",
+ "DetectionStatus",
"DnsVerificationTestResult",
"EnvironmentProvisioningState",
"ExtendedLocationTypes",
@@ -429,6 +508,9 @@
"LogLevel",
"ManagedCertificateDomainControlValidation",
"ManagedServiceIdentityType",
+ "PatchApplyStatus",
+ "PatchProvisioningState",
+ "PatchType",
"RevisionHealthState",
"RevisionProvisioningState",
"RevisionRunningState",
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_container_apps_api_client_enums.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_container_apps_api_client_enums.py
index 694a6932ba5d..93d4b9c73fda 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_container_apps_api_client_enums.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_container_apps_api_client_enums.py
@@ -71,6 +71,38 @@ class BindingType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
SNI_ENABLED = "SniEnabled"
+class BuilderProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Resource instance provisioning state."""
+
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+ CREATING = "Creating"
+ UPDATING = "Updating"
+ DELETING = "Deleting"
+
+
+class BuildProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Resource instance provisioning state."""
+
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+ CREATING = "Creating"
+ UPDATING = "Updating"
+ DELETING = "Deleting"
+
+
+class BuildStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Status of the build once it has been provisioned."""
+
+ NOT_STARTED = "NotStarted"
+ IN_PROGRESS = "InProgress"
+ SUCCEEDED = "Succeeded"
+ CANCELED = "Canceled"
+ FAILED = "Failed"
+
+
class CertificateProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Provisioning state of the certificate."""
@@ -81,6 +113,15 @@ class CertificateProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta)
PENDING = "Pending"
+class CertificateType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The type of the certificate. Allowed values are ``ServerSSLCertificate`` and
+ ``ImagePullTrustedCA``.
+ """
+
+ SERVER_SSL_CERTIFICATE = "ServerSSLCertificate"
+ IMAGE_PULL_TRUSTED_CA = "ImagePullTrustedCA"
+
+
class CheckNameAvailabilityReason(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The reason why the given name is not available."""
@@ -143,6 +184,14 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
KEY = "Key"
+class DetectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The status of the patch detection."""
+
+ SUCCEEDED = "Succeeded"
+ REGISTRY_LOGIN_FAILED = "RegistryLoginFailed"
+ FAILED = "Failed"
+
+
class DnsVerificationTestResult(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""DNS verification test result."""
@@ -252,6 +301,37 @@ class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned"
+class PatchApplyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The status of the patch once it has been provisioned."""
+
+ NOT_STARTED = "NotStarted"
+ REBASE_IN_PROGRESS = "RebaseInProgress"
+ CREATING_REVISION = "CreatingRevision"
+ SUCCEEDED = "Succeeded"
+ CANCELED = "Canceled"
+ REBASE_FAILED = "RebaseFailed"
+ REVISION_CREATION_FAILED = "RevisionCreationFailed"
+ IMAGE_PUSH_PULL_FAILED = "ImagePushPullFailed"
+ MANUALLY_SKIPPED = "ManuallySkipped"
+
+
+class PatchProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Resource instance provisioning state."""
+
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+
+
+class PatchType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The type for the patch."""
+
+ FRAMEWORK_SECURITY = "FrameworkSecurity"
+ OS_SECURITY = "OSSecurity"
+ FRAMEWORK_AND_OS_SECURITY = "FrameworkAndOSSecurity"
+ OTHER = "Other"
+
+
class RevisionHealthState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Current health State of the revision."""
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_models_py3.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_models_py3.py
index 4451f6940f93..ca5c81a60cde 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_models_py3.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/models/_models_py3.py
@@ -78,6 +78,26 @@ def __init__(
self.identities = identities
+class AppInsightsConfiguration(_serialization.Model):
+ """Configuration of Application Insights.
+
+ :ivar connection_string: Application Insights connection string.
+ :vartype connection_string: str
+ """
+
+ _attribute_map = {
+ "connection_string": {"key": "connectionString", "type": "str"},
+ }
+
+ def __init__(self, *, connection_string: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword connection_string: Application Insights connection string.
+ :paramtype connection_string: str
+ """
+ super().__init__(**kwargs)
+ self.connection_string = connection_string
+
+
class Apple(_serialization.Model):
"""The configuration settings of the Apple provider.
@@ -323,6 +343,9 @@ class AuthConfig(ProxyResource):
:ivar http_settings: The configuration settings of the HTTP requests for authentication and
authorization requests made against ContainerApp Service Authentication/Authorization.
:vartype http_settings: ~azure.mgmt.appcontainers.models.HttpSettings
+ :ivar encryption_settings: The configuration settings of the secrets references of encryption
+ key and signing key for ContainerApp Service Authentication/Authorization.
+ :vartype encryption_settings: ~azure.mgmt.appcontainers.models.EncryptionSettings
"""
_validation = {
@@ -342,6 +365,7 @@ class AuthConfig(ProxyResource):
"identity_providers": {"key": "properties.identityProviders", "type": "IdentityProviders"},
"login": {"key": "properties.login", "type": "Login"},
"http_settings": {"key": "properties.httpSettings", "type": "HttpSettings"},
+ "encryption_settings": {"key": "properties.encryptionSettings", "type": "EncryptionSettings"},
}
def __init__(
@@ -352,6 +376,7 @@ def __init__(
identity_providers: Optional["_models.IdentityProviders"] = None,
login: Optional["_models.Login"] = None,
http_settings: Optional["_models.HttpSettings"] = None,
+ encryption_settings: Optional["_models.EncryptionSettings"] = None,
**kwargs: Any
) -> None:
"""
@@ -370,6 +395,9 @@ def __init__(
:keyword http_settings: The configuration settings of the HTTP requests for authentication and
authorization requests made against ContainerApp Service Authentication/Authorization.
:paramtype http_settings: ~azure.mgmt.appcontainers.models.HttpSettings
+ :keyword encryption_settings: The configuration settings of the secrets references of
+ encryption key and signing key for ContainerApp Service Authentication/Authorization.
+ :paramtype encryption_settings: ~azure.mgmt.appcontainers.models.EncryptionSettings
"""
super().__init__(**kwargs)
self.platform = platform
@@ -377,6 +405,7 @@ def __init__(
self.identity_providers = identity_providers
self.login = login
self.http_settings = http_settings
+ self.encryption_settings = encryption_settings
class AuthConfigCollection(_serialization.Model):
@@ -545,6 +574,8 @@ class AvailableWorkloadProfileProperties(_serialization.Model):
:vartype cores: int
:ivar memory_gi_b: Memory in GiB.
:vartype memory_gi_b: int
+ :ivar gpus: Number of GPUs.
+ :vartype gpus: int
:ivar display_name: The everyday name of the workload profile.
:vartype display_name: str
"""
@@ -554,6 +585,7 @@ class AvailableWorkloadProfileProperties(_serialization.Model):
"applicability": {"key": "applicability", "type": "str"},
"cores": {"key": "cores", "type": "int"},
"memory_gi_b": {"key": "memoryGiB", "type": "int"},
+ "gpus": {"key": "gpus", "type": "int"},
"display_name": {"key": "displayName", "type": "str"},
}
@@ -564,6 +596,7 @@ def __init__(
applicability: Optional[Union[str, "_models.Applicability"]] = None,
cores: Optional[int] = None,
memory_gi_b: Optional[int] = None,
+ gpus: Optional[int] = None,
display_name: Optional[str] = None,
**kwargs: Any
) -> None:
@@ -577,6 +610,8 @@ def __init__(
:paramtype cores: int
:keyword memory_gi_b: Memory in GiB.
:paramtype memory_gi_b: int
+ :keyword gpus: Number of GPUs.
+ :paramtype gpus: int
:keyword display_name: The everyday name of the workload profile.
:paramtype display_name: str
"""
@@ -585,6 +620,7 @@ def __init__(
self.applicability = applicability
self.cores = cores
self.memory_gi_b = memory_gi_b
+ self.gpus = gpus
self.display_name = display_name
@@ -1212,6 +1248,155 @@ def __init__(
self.display_name = display_name
+class BlobStorageTokenStore(_serialization.Model):
+ """The configuration settings of the storage of the tokens if blob storage is used.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar sas_url_setting_name: The name of the app secrets containing the SAS URL of the blob
+ storage containing the tokens. Required.
+ :vartype sas_url_setting_name: str
+ """
+
+ _validation = {
+ "sas_url_setting_name": {"required": True},
+ }
+
+ _attribute_map = {
+ "sas_url_setting_name": {"key": "sasUrlSettingName", "type": "str"},
+ }
+
+ def __init__(self, *, sas_url_setting_name: str, **kwargs: Any) -> None:
+ """
+ :keyword sas_url_setting_name: The name of the app secrets containing the SAS URL of the blob
+ storage containing the tokens. Required.
+ :paramtype sas_url_setting_name: str
+ """
+ super().__init__(**kwargs)
+ self.sas_url_setting_name = sas_url_setting_name
+
+
+class BuildCollection(_serialization.Model):
+ """The response of a BuildResource list operation.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar value: The BuildResource items on this page. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.BuildResource]
+ :ivar next_link: The link to the next page of items.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[BuildResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(self, *, value: List["_models.BuildResource"], next_link: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: The BuildResource items on this page. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.BuildResource]
+ :keyword next_link: The link to the next page of items.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class BuildConfiguration(_serialization.Model):
+ """Configuration of the build.
+
+ :ivar base_os: Base OS used to build and run the app.
+ :vartype base_os: str
+ :ivar platform: Platform to be used to build and run the app.
+ :vartype platform: str
+ :ivar platform_version: Platform version to be used to build and run the app.
+ :vartype platform_version: str
+ :ivar environment_variables: List of environment variables to be passed to the build and
+ application runtime.
+ :vartype environment_variables: list[~azure.mgmt.appcontainers.models.EnvironmentVariable]
+ :ivar pre_build_steps: List of steps to perform before the build.
+ :vartype pre_build_steps: list[~azure.mgmt.appcontainers.models.PreBuildStep]
+ """
+
+ _attribute_map = {
+ "base_os": {"key": "baseOs", "type": "str"},
+ "platform": {"key": "platform", "type": "str"},
+ "platform_version": {"key": "platformVersion", "type": "str"},
+ "environment_variables": {"key": "environmentVariables", "type": "[EnvironmentVariable]"},
+ "pre_build_steps": {"key": "preBuildSteps", "type": "[PreBuildStep]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ base_os: Optional[str] = None,
+ platform: Optional[str] = None,
+ platform_version: Optional[str] = None,
+ environment_variables: Optional[List["_models.EnvironmentVariable"]] = None,
+ pre_build_steps: Optional[List["_models.PreBuildStep"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword base_os: Base OS used to build and run the app.
+ :paramtype base_os: str
+ :keyword platform: Platform to be used to build and run the app.
+ :paramtype platform: str
+ :keyword platform_version: Platform version to be used to build and run the app.
+ :paramtype platform_version: str
+ :keyword environment_variables: List of environment variables to be passed to the build and
+ application runtime.
+ :paramtype environment_variables: list[~azure.mgmt.appcontainers.models.EnvironmentVariable]
+ :keyword pre_build_steps: List of steps to perform before the build.
+ :paramtype pre_build_steps: list[~azure.mgmt.appcontainers.models.PreBuildStep]
+ """
+ super().__init__(**kwargs)
+ self.base_os = base_os
+ self.platform = platform
+ self.platform_version = platform_version
+ self.environment_variables = environment_variables
+ self.pre_build_steps = pre_build_steps
+
+
+class BuilderCollection(_serialization.Model):
+ """The response of a BuilderResource list operation.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar value: The BuilderResource items on this page. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.BuilderResource]
+ :ivar next_link: The link to the next page of items.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[BuilderResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self, *, value: List["_models.BuilderResource"], next_link: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: The BuilderResource items on this page. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.BuilderResource]
+ :keyword next_link: The link to the next page of items.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
class TrackedResource(Resource):
"""The resource model definition for an Azure Resource Manager tracked top level resource which
has 'tags' and a 'location'.
@@ -1266,6 +1451,215 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw
self.location = location
+class BuilderResource(TrackedResource):
+ """Information about the SourceToCloud builder resource.
+
+ 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 Azure.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
+ :ivar identity: The managed service identities assigned to this resource.
+ :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
+ :ivar provisioning_state: Provisioning state of a builder resource. Known values are:
+ "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting".
+ :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.BuilderProvisioningState
+ :ivar environment_id: Resource ID of the container apps environment that the builder is
+ associated with.
+ :vartype environment_id: str
+ :ivar container_registries: List of mappings of container registries and the managed identity
+ used to connect to it.
+ :vartype container_registries: list[~azure.mgmt.appcontainers.models.ContainerRegistry]
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
+ "provisioning_state": {"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"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "location": {"key": "location", "type": "str"},
+ "identity": {"key": "identity", "type": "ManagedServiceIdentity"},
+ "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
+ "environment_id": {"key": "properties.environmentId", "type": "str"},
+ "container_registries": {"key": "properties.containerRegistries", "type": "[ContainerRegistry]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ identity: Optional["_models.ManagedServiceIdentity"] = None,
+ environment_id: Optional[str] = None,
+ container_registries: Optional[List["_models.ContainerRegistry"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword location: The geo-location where the resource lives. Required.
+ :paramtype location: str
+ :keyword identity: The managed service identities assigned to this resource.
+ :paramtype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
+ :keyword environment_id: Resource ID of the container apps environment that the builder is
+ associated with.
+ :paramtype environment_id: str
+ :keyword container_registries: List of mappings of container registries and the managed
+ identity used to connect to it.
+ :paramtype container_registries: list[~azure.mgmt.appcontainers.models.ContainerRegistry]
+ """
+ super().__init__(tags=tags, location=location, **kwargs)
+ self.identity = identity
+ self.provisioning_state = None
+ self.environment_id = environment_id
+ self.container_registries = container_registries
+
+
+class BuilderResourceUpdate(_serialization.Model):
+ """The type used for update operations of the BuilderResource.
+
+ :ivar identity: The managed service identities assigned to this resource.
+ :vartype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar environment_id: Resource ID of the container apps environment that the builder is
+ associated with.
+ :vartype environment_id: str
+ """
+
+ _attribute_map = {
+ "identity": {"key": "identity", "type": "ManagedServiceIdentity"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "environment_id": {"key": "properties.environmentId", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ identity: Optional["_models.ManagedServiceIdentity"] = None,
+ tags: Optional[Dict[str, str]] = None,
+ environment_id: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword identity: The managed service identities assigned to this resource.
+ :paramtype identity: ~azure.mgmt.appcontainers.models.ManagedServiceIdentity
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword environment_id: Resource ID of the container apps environment that the builder is
+ associated with.
+ :paramtype environment_id: str
+ """
+ super().__init__(**kwargs)
+ self.identity = identity
+ self.tags = tags
+ self.environment_id = environment_id
+
+
+class BuildResource(ProxyResource):
+ """Information pertaining to an individual build.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
+ :ivar provisioning_state: Build provisioning state. Known values are: "Succeeded", "Failed",
+ "Canceled", "Creating", "Updating", and "Deleting".
+ :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.BuildProvisioningState
+ :ivar build_status: Status of the build once it has been provisioned. Known values are:
+ "NotStarted", "InProgress", "Succeeded", "Canceled", and "Failed".
+ :vartype build_status: str or ~azure.mgmt.appcontainers.models.BuildStatus
+ :ivar destination_container_registry: Container registry that the final image will be uploaded
+ to.
+ :vartype destination_container_registry:
+ ~azure.mgmt.appcontainers.models.ContainerRegistryWithCustomImage
+ :ivar configuration: Configuration of the build.
+ :vartype configuration: ~azure.mgmt.appcontainers.models.BuildConfiguration
+ :ivar upload_endpoint: Endpoint to which the source code should be uploaded.
+ :vartype upload_endpoint: str
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "provisioning_state": {"readonly": True},
+ "build_status": {"readonly": True},
+ "upload_endpoint": {"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"},
+ "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
+ "build_status": {"key": "properties.buildStatus", "type": "str"},
+ "destination_container_registry": {
+ "key": "properties.destinationContainerRegistry",
+ "type": "ContainerRegistryWithCustomImage",
+ },
+ "configuration": {"key": "properties.configuration", "type": "BuildConfiguration"},
+ "upload_endpoint": {"key": "properties.uploadEndpoint", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ destination_container_registry: Optional["_models.ContainerRegistryWithCustomImage"] = None,
+ configuration: Optional["_models.BuildConfiguration"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword destination_container_registry: Container registry that the final image will be
+ uploaded to.
+ :paramtype destination_container_registry:
+ ~azure.mgmt.appcontainers.models.ContainerRegistryWithCustomImage
+ :keyword configuration: Configuration of the build.
+ :paramtype configuration: ~azure.mgmt.appcontainers.models.BuildConfiguration
+ """
+ super().__init__(**kwargs)
+ self.provisioning_state = None
+ self.build_status = None
+ self.destination_container_registry = destination_container_registry
+ self.configuration = configuration
+ self.upload_endpoint = None
+
+
class Certificate(TrackedResource):
"""Certificate used for Custom Domain bindings of Container Apps in a Managed Environment.
@@ -1412,6 +1806,9 @@ class CertificateProperties(_serialization.Model): # pylint: disable=too-many-i
:vartype valid: bool
:ivar public_key_hash: Public key hash.
:vartype public_key_hash: str
+ :ivar type: The type of the certificate. Allowed values are ``ServerSSLCertificate`` and
+ ``ImagePullTrustedCA``. Known values are: "ServerSSLCertificate" and "ImagePullTrustedCA".
+ :vartype type: str or ~azure.mgmt.appcontainers.models.CertificateType
"""
_validation = {
@@ -1438,14 +1835,25 @@ class CertificateProperties(_serialization.Model): # pylint: disable=too-many-i
"thumbprint": {"key": "thumbprint", "type": "str"},
"valid": {"key": "valid", "type": "bool"},
"public_key_hash": {"key": "publicKeyHash", "type": "str"},
+ "type": {"key": "type", "type": "str"},
}
- def __init__(self, *, password: Optional[str] = None, value: Optional[bytes] = None, **kwargs: Any) -> None:
+ def __init__(
+ self,
+ *,
+ password: Optional[str] = None,
+ value: Optional[bytes] = None,
+ type: Optional[Union[str, "_models.CertificateType"]] = None,
+ **kwargs: Any
+ ) -> None:
"""
:keyword password: Certificate password.
:paramtype password: str
:keyword value: PFX or PEM blob.
:paramtype value: bytes
+ :keyword type: The type of the certificate. Allowed values are ``ServerSSLCertificate`` and
+ ``ImagePullTrustedCA``. Known values are: "ServerSSLCertificate" and "ImagePullTrustedCA".
+ :paramtype type: str or ~azure.mgmt.appcontainers.models.CertificateType
"""
super().__init__(**kwargs)
self.provisioning_state = None
@@ -1459,6 +1867,7 @@ def __init__(self, *, password: Optional[str] = None, value: Optional[bytes] = N
self.thumbprint = None
self.valid = None
self.public_key_hash = None
+ self.type = type
class CheckNameAvailabilityRequest(_serialization.Model):
@@ -2523,26 +2932,97 @@ def __init__(self, **kwargs: Any) -> None:
self.key_vault_url = None
-class ContainerResources(_serialization.Model):
- """Container App container resource requirements.
+class ContainerRegistry(_serialization.Model):
+ """Model representing a mapping from a container registry to the identity used to connect to it.
- 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 Azure.
- :ivar cpu: Required CPU in cores, e.g. 0.5.
- :vartype cpu: float
- :ivar memory: Required memory, e.g. "250Mb".
- :vartype memory: str
- :ivar ephemeral_storage: Ephemeral Storage, e.g. "1Gi".
- :vartype ephemeral_storage: str
+ :ivar container_registry_server: Login server of the container registry. Required.
+ :vartype container_registry_server: str
+ :ivar identity_resource_id: Resource ID of the managed identity. Required.
+ :vartype identity_resource_id: str
"""
_validation = {
- "ephemeral_storage": {"readonly": True},
+ "container_registry_server": {"required": True},
+ "identity_resource_id": {"required": True},
}
_attribute_map = {
- "cpu": {"key": "cpu", "type": "float"},
- "memory": {"key": "memory", "type": "str"},
+ "container_registry_server": {"key": "containerRegistryServer", "type": "str"},
+ "identity_resource_id": {"key": "identityResourceId", "type": "str"},
+ }
+
+ def __init__(self, *, container_registry_server: str, identity_resource_id: str, **kwargs: Any) -> None:
+ """
+ :keyword container_registry_server: Login server of the container registry. Required.
+ :paramtype container_registry_server: str
+ :keyword identity_resource_id: Resource ID of the managed identity. Required.
+ :paramtype identity_resource_id: str
+ """
+ super().__init__(**kwargs)
+ self.container_registry_server = container_registry_server
+ self.identity_resource_id = identity_resource_id
+
+
+class ContainerRegistryWithCustomImage(_serialization.Model):
+ """Container registry that the final image will be uploaded to.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar server: Login server of the container registry that the final image should be uploaded
+ to. Builder resource needs to have this container registry defined along with an identity to
+ use to access it. Required.
+ :vartype server: str
+ :ivar image: Full name that the final image should be uploaded as, including both image name
+ and tag.
+ :vartype image: str
+ """
+
+ _validation = {
+ "server": {"required": True},
+ }
+
+ _attribute_map = {
+ "server": {"key": "server", "type": "str"},
+ "image": {"key": "image", "type": "str"},
+ }
+
+ def __init__(self, *, server: str, image: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword server: Login server of the container registry that the final image should be uploaded
+ to. Builder resource needs to have this container registry defined along with an identity to
+ use to access it. Required.
+ :paramtype server: str
+ :keyword image: Full name that the final image should be uploaded as, including both image name
+ and tag.
+ :paramtype image: str
+ """
+ super().__init__(**kwargs)
+ self.server = server
+ self.image = image
+
+
+class ContainerResources(_serialization.Model):
+ """Container App container resource requirements.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar cpu: Required CPU in cores, e.g. 0.5.
+ :vartype cpu: float
+ :ivar memory: Required memory, e.g. "250Mb".
+ :vartype memory: str
+ :ivar ephemeral_storage: Ephemeral Storage, e.g. "1Gi".
+ :vartype ephemeral_storage: str
+ """
+
+ _validation = {
+ "ephemeral_storage": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "cpu": {"key": "cpu", "type": "float"},
+ "memory": {"key": "memory", "type": "str"},
"ephemeral_storage": {"key": "ephemeralStorage", "type": "str"},
}
@@ -3165,6 +3645,10 @@ class DaprComponent(ProxyResource): # pylint: disable=too-many-instance-attribu
:vartype metadata: list[~azure.mgmt.appcontainers.models.DaprMetadata]
:ivar scopes: Names of container apps that can use this Dapr component.
:vartype scopes: list[str]
+ :ivar service_component_bind: List of container app services that are bound to the Dapr
+ component.
+ :vartype service_component_bind:
+ list[~azure.mgmt.appcontainers.models.DaprComponentServiceBinding]
"""
_validation = {
@@ -3187,6 +3671,7 @@ class DaprComponent(ProxyResource): # pylint: disable=too-many-instance-attribu
"secret_store_component": {"key": "properties.secretStoreComponent", "type": "str"},
"metadata": {"key": "properties.metadata", "type": "[DaprMetadata]"},
"scopes": {"key": "properties.scopes", "type": "[str]"},
+ "service_component_bind": {"key": "properties.serviceComponentBind", "type": "[DaprComponentServiceBinding]"},
}
def __init__(
@@ -3200,6 +3685,7 @@ def __init__(
secret_store_component: Optional[str] = None,
metadata: Optional[List["_models.DaprMetadata"]] = None,
scopes: Optional[List[str]] = None,
+ service_component_bind: Optional[List["_models.DaprComponentServiceBinding"]] = None,
**kwargs: Any
) -> None:
"""
@@ -3219,6 +3705,10 @@ def __init__(
:paramtype metadata: list[~azure.mgmt.appcontainers.models.DaprMetadata]
:keyword scopes: Names of container apps that can use this Dapr component.
:paramtype scopes: list[str]
+ :keyword service_component_bind: List of container app services that are bound to the Dapr
+ component.
+ :paramtype service_component_bind:
+ list[~azure.mgmt.appcontainers.models.DaprComponentServiceBinding]
"""
super().__init__(**kwargs)
self.component_type = component_type
@@ -3229,6 +3719,7 @@ def __init__(
self.secret_store_component = secret_store_component
self.metadata = metadata
self.scopes = scopes
+ self.service_component_bind = service_component_bind
class DaprComponentsCollection(_serialization.Model):
@@ -3264,6 +3755,45 @@ def __init__(self, *, value: List["_models.DaprComponent"], **kwargs: Any) -> No
self.next_link = None
+class DaprComponentServiceBinding(_serialization.Model):
+ """Configuration to bind a Dapr Component to a dev ContainerApp Service.
+
+ :ivar name: Name of the service bind.
+ :vartype name: str
+ :ivar service_id: Resource id of the target service.
+ :vartype service_id: str
+ :ivar metadata: Service bind metadata.
+ :vartype metadata: ~azure.mgmt.appcontainers.models.DaprServiceBindMetadata
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "service_id": {"key": "serviceId", "type": "str"},
+ "metadata": {"key": "metadata", "type": "DaprServiceBindMetadata"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ service_id: Optional[str] = None,
+ metadata: Optional["_models.DaprServiceBindMetadata"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Name of the service bind.
+ :paramtype name: str
+ :keyword service_id: Resource id of the target service.
+ :paramtype service_id: str
+ :keyword metadata: Service bind metadata.
+ :paramtype metadata: ~azure.mgmt.appcontainers.models.DaprServiceBindMetadata
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.service_id = service_id
+ self.metadata = metadata
+
+
class DaprConfiguration(_serialization.Model):
"""Configuration properties Dapr component.
@@ -3382,6 +3912,58 @@ def __init__(self, *, value: List["_models.DaprSecret"], **kwargs: Any) -> None:
self.value = value
+class DaprServiceBindMetadata(_serialization.Model):
+ """Dapr component metadata.
+
+ :ivar name: Service bind metadata property name.
+ :vartype name: str
+ :ivar value: Service bind metadata property 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: Service bind metadata property name.
+ :paramtype name: str
+ :keyword value: Service bind metadata property value.
+ :paramtype value: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.value = value
+
+
+class DataDogConfiguration(_serialization.Model):
+ """Configuration of datadog.
+
+ :ivar site: The data dog site.
+ :vartype site: str
+ :ivar key: The data dog api key.
+ :vartype key: str
+ """
+
+ _attribute_map = {
+ "site": {"key": "site", "type": "str"},
+ "key": {"key": "key", "type": "str"},
+ }
+
+ def __init__(self, *, site: Optional[str] = None, key: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword site: The data dog site.
+ :paramtype site: str
+ :keyword key: The data dog api key.
+ :paramtype key: str
+ """
+ super().__init__(**kwargs)
+ self.site = site
+ self.key = key
+
+
class DefaultAuthorizationPolicy(_serialization.Model):
"""The configuration settings of the Azure Active Directory default authorization policy.
@@ -3521,6 +4103,28 @@ def __init__(self, **kwargs: Any) -> None:
self.target = None
+class DestinationsConfiguration(_serialization.Model):
+ """Configuration of Open Telemetry destinations.
+
+ :ivar data_dog_configuration: Open telemetry datadog destination configuration.
+ :vartype data_dog_configuration: ~azure.mgmt.appcontainers.models.DataDogConfiguration
+ """
+
+ _attribute_map = {
+ "data_dog_configuration": {"key": "dataDogConfiguration", "type": "DataDogConfiguration"},
+ }
+
+ def __init__(
+ self, *, data_dog_configuration: Optional["_models.DataDogConfiguration"] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword data_dog_configuration: Open telemetry datadog destination configuration.
+ :paramtype data_dog_configuration: ~azure.mgmt.appcontainers.models.DataDogConfiguration
+ """
+ super().__init__(**kwargs)
+ self.data_dog_configuration = data_dog_configuration
+
+
class DiagnosticDataProviderMetadata(_serialization.Model):
"""Details of a diagnostics data provider.
@@ -3988,6 +4592,43 @@ def __init__(self, **kwargs: Any) -> None:
self.pes_id = None
+class EncryptionSettings(_serialization.Model):
+ """The configuration settings of the secrets references of encryption key and signing key for
+ ContainerApp Service Authentication/Authorization.
+
+ :ivar container_app_auth_encryption_secret_name: The secret name which is referenced for
+ EncryptionKey.
+ :vartype container_app_auth_encryption_secret_name: str
+ :ivar container_app_auth_signing_secret_name: The secret name which is referenced for
+ SigningKey.
+ :vartype container_app_auth_signing_secret_name: str
+ """
+
+ _attribute_map = {
+ "container_app_auth_encryption_secret_name": {"key": "containerAppAuthEncryptionSecretName", "type": "str"},
+ "container_app_auth_signing_secret_name": {"key": "containerAppAuthSigningSecretName", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ container_app_auth_encryption_secret_name: Optional[str] = None,
+ container_app_auth_signing_secret_name: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword container_app_auth_encryption_secret_name: The secret name which is referenced for
+ EncryptionKey.
+ :paramtype container_app_auth_encryption_secret_name: str
+ :keyword container_app_auth_signing_secret_name: The secret name which is referenced for
+ SigningKey.
+ :paramtype container_app_auth_signing_secret_name: str
+ """
+ super().__init__(**kwargs)
+ self.container_app_auth_encryption_secret_name = container_app_auth_encryption_secret_name
+ self.container_app_auth_signing_secret_name = container_app_auth_signing_secret_name
+
+
class EnvironmentAuthToken(TrackedResource):
"""Environment Auth Token.
@@ -4090,6 +4731,39 @@ def __init__(
self.secret_ref = secret_ref
+class EnvironmentVariable(_serialization.Model):
+ """Model representing an environment variable.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar name: Environment variable name. Required.
+ :vartype name: str
+ :ivar value: Environment variable value. Required.
+ :vartype value: str
+ """
+
+ _validation = {
+ "name": {"required": True},
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "value": {"key": "value", "type": "str"},
+ }
+
+ def __init__(self, *, name: str, value: str, **kwargs: Any) -> None:
+ """
+ :keyword name: Environment variable name. Required.
+ :paramtype name: str
+ :keyword value: Environment variable value. Required.
+ :paramtype value: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.value = value
+
+
class ErrorAdditionalInfo(_serialization.Model):
"""The resource management error additional info.
@@ -4535,6 +5209,46 @@ def __init__(
self.validation = validation
+class HttpGet(_serialization.Model):
+ """Model representing a http get request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar url: URL to make HTTP GET request against. Required.
+ :vartype url: str
+ :ivar file_name: Name of the file that the request should be saved to.
+ :vartype file_name: str
+ :ivar headers: List of headers to send with the request.
+ :vartype headers: list[str]
+ """
+
+ _validation = {
+ "url": {"required": True},
+ }
+
+ _attribute_map = {
+ "url": {"key": "url", "type": "str"},
+ "file_name": {"key": "fileName", "type": "str"},
+ "headers": {"key": "headers", "type": "[str]"},
+ }
+
+ def __init__(
+ self, *, url: str, file_name: Optional[str] = None, headers: Optional[List[str]] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword url: URL to make HTTP GET request against. Required.
+ :paramtype url: str
+ :keyword file_name: Name of the file that the request should be saved to.
+ :paramtype file_name: str
+ :keyword headers: List of headers to send with the request.
+ :paramtype headers: list[str]
+ """
+ super().__init__(**kwargs)
+ self.url = url
+ self.file_name = file_name
+ self.headers = headers
+
+
class HttpScaleRule(_serialization.Model):
"""Container App container Http scaling rule.
@@ -4753,6 +5467,8 @@ class Ingress(_serialization.Model): # pylint: disable=too-many-instance-attrib
~azure.mgmt.appcontainers.models.IngressClientCertificateMode
:ivar cors_policy: CORS policy for container app.
:vartype cors_policy: ~azure.mgmt.appcontainers.models.CorsPolicy
+ :ivar additional_port_mappings: Settings to expose additional ports on container app.
+ :vartype additional_port_mappings: list[~azure.mgmt.appcontainers.models.IngressPortMapping]
"""
_validation = {
@@ -4772,6 +5488,7 @@ class Ingress(_serialization.Model): # pylint: disable=too-many-instance-attrib
"sticky_sessions": {"key": "stickySessions", "type": "IngressStickySessions"},
"client_certificate_mode": {"key": "clientCertificateMode", "type": "str"},
"cors_policy": {"key": "corsPolicy", "type": "CorsPolicy"},
+ "additional_port_mappings": {"key": "additionalPortMappings", "type": "[IngressPortMapping]"},
}
def __init__(
@@ -4788,6 +5505,7 @@ def __init__(
sticky_sessions: Optional["_models.IngressStickySessions"] = None,
client_certificate_mode: Optional[Union[str, "_models.IngressClientCertificateMode"]] = None,
cors_policy: Optional["_models.CorsPolicy"] = None,
+ additional_port_mappings: Optional[List["_models.IngressPortMapping"]] = None,
**kwargs: Any
) -> None:
"""
@@ -4820,6 +5538,8 @@ def __init__(
~azure.mgmt.appcontainers.models.IngressClientCertificateMode
:keyword cors_policy: CORS policy for container app.
:paramtype cors_policy: ~azure.mgmt.appcontainers.models.CorsPolicy
+ :keyword additional_port_mappings: Settings to expose additional ports on container app.
+ :paramtype additional_port_mappings: list[~azure.mgmt.appcontainers.models.IngressPortMapping]
"""
super().__init__(**kwargs)
self.fqdn = None
@@ -4834,6 +5554,50 @@ def __init__(
self.sticky_sessions = sticky_sessions
self.client_certificate_mode = client_certificate_mode
self.cors_policy = cors_policy
+ self.additional_port_mappings = additional_port_mappings
+
+
+class IngressPortMapping(_serialization.Model):
+ """Port mappings of container app ingress.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar external: Specifies whether the app port is accessible outside of the environment.
+ Required.
+ :vartype external: bool
+ :ivar target_port: Specifies the port user's container listens on. Required.
+ :vartype target_port: int
+ :ivar exposed_port: Specifies the exposed port for the target port. If not specified, it
+ defaults to target port.
+ :vartype exposed_port: int
+ """
+
+ _validation = {
+ "external": {"required": True},
+ "target_port": {"required": True},
+ }
+
+ _attribute_map = {
+ "external": {"key": "external", "type": "bool"},
+ "target_port": {"key": "targetPort", "type": "int"},
+ "exposed_port": {"key": "exposedPort", "type": "int"},
+ }
+
+ def __init__(self, *, external: bool, target_port: int, exposed_port: Optional[int] = None, **kwargs: Any) -> None:
+ """
+ :keyword external: Specifies whether the app port is accessible outside of the environment.
+ Required.
+ :paramtype external: bool
+ :keyword target_port: Specifies the port user's container listens on. Required.
+ :paramtype target_port: int
+ :keyword exposed_port: Specifies the exposed port for the target port. If not specified, it
+ defaults to target port.
+ :paramtype exposed_port: int
+ """
+ super().__init__(**kwargs)
+ self.external = external
+ self.target_port = target_port
+ self.exposed_port = exposed_port
class IngressStickySessions(_serialization.Model):
@@ -5877,6 +6641,36 @@ def __init__(self, **kwargs: Any) -> None:
self.version = None
+class ListUsagesResult(_serialization.Model):
+ """ListUsagesResult.
+
+ :ivar value: The list of compute resource usages.
+ :vartype value: list[~azure.mgmt.appcontainers.models.Usage]
+ :ivar next_link: The URI to fetch the next page of compute resource usage information. Call
+ ListNext() with this to fetch the next page of compute resource usage information.
+ :vartype next_link: str
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[Usage]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self, *, value: Optional[List["_models.Usage"]] = None, next_link: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: The list of compute resource usages.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.Usage]
+ :keyword next_link: The URI to fetch the next page of compute resource usage information. Call
+ ListNext() with this to fetch the next page of compute resource usage information.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
class LogAnalyticsConfiguration(_serialization.Model):
"""Log Analytics configuration, must only be provided when destination is configured as
'log-analytics'.
@@ -5910,6 +6704,8 @@ class Login(_serialization.Model):
:ivar routes: The routes that specify the endpoints used for login and logout requests.
:vartype routes: ~azure.mgmt.appcontainers.models.LoginRoutes
+ :ivar token_store: The configuration settings of the token store.
+ :vartype token_store: ~azure.mgmt.appcontainers.models.TokenStore
:ivar preserve_url_fragments_for_logins: :code:`true
` if the fragments from the
request are preserved after the login request is made; otherwise, :code:`false
`.
:vartype preserve_url_fragments_for_logins: bool
@@ -5926,6 +6722,7 @@ class Login(_serialization.Model):
_attribute_map = {
"routes": {"key": "routes", "type": "LoginRoutes"},
+ "token_store": {"key": "tokenStore", "type": "TokenStore"},
"preserve_url_fragments_for_logins": {"key": "preserveUrlFragmentsForLogins", "type": "bool"},
"allowed_external_redirect_urls": {"key": "allowedExternalRedirectUrls", "type": "[str]"},
"cookie_expiration": {"key": "cookieExpiration", "type": "CookieExpiration"},
@@ -5936,6 +6733,7 @@ def __init__(
self,
*,
routes: Optional["_models.LoginRoutes"] = None,
+ token_store: Optional["_models.TokenStore"] = None,
preserve_url_fragments_for_logins: Optional[bool] = None,
allowed_external_redirect_urls: Optional[List[str]] = None,
cookie_expiration: Optional["_models.CookieExpiration"] = None,
@@ -5945,6 +6743,8 @@ def __init__(
"""
:keyword routes: The routes that specify the endpoints used for login and logout requests.
:paramtype routes: ~azure.mgmt.appcontainers.models.LoginRoutes
+ :keyword token_store: The configuration settings of the token store.
+ :paramtype token_store: ~azure.mgmt.appcontainers.models.TokenStore
:keyword preserve_url_fragments_for_logins: :code:`true
` if the fragments from the
request are preserved after the login request is made; otherwise, :code:`false
`.
:paramtype preserve_url_fragments_for_logins: bool
@@ -5960,6 +6760,7 @@ def __init__(
"""
super().__init__(**kwargs)
self.routes = routes
+ self.token_store = token_store
self.preserve_url_fragments_for_logins = preserve_url_fragments_for_logins
self.allowed_external_redirect_urls = allowed_external_redirect_urls
self.cookie_expiration = cookie_expiration
@@ -6006,6 +6807,26 @@ def __init__(self, *, scopes: Optional[List[str]] = None, **kwargs: Any) -> None
self.scopes = scopes
+class LogsConfiguration(_serialization.Model):
+ """Configuration of Open Telemetry logs.
+
+ :ivar destinations: Open telemetry logs destinations.
+ :vartype destinations: list[str]
+ """
+
+ _attribute_map = {
+ "destinations": {"key": "destinations", "type": "[str]"},
+ }
+
+ def __init__(self, *, destinations: Optional[List[str]] = None, **kwargs: Any) -> None:
+ """
+ :keyword destinations: Open telemetry logs destinations.
+ :paramtype destinations: list[str]
+ """
+ super().__init__(**kwargs)
+ self.destinations = destinations
+
+
class ManagedCertificate(TrackedResource):
"""Managed certificates used for Custom Domain bindings of Container Apps in a Managed
Environment.
@@ -6230,6 +7051,11 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
app logs to a destination. Currently only "log-analytics" is
supported.
:vartype app_logs_configuration: ~azure.mgmt.appcontainers.models.AppLogsConfiguration
+ :ivar app_insights_configuration: Environment level Application Insights configuration.
+ :vartype app_insights_configuration: ~azure.mgmt.appcontainers.models.AppInsightsConfiguration
+ :ivar open_telemetry_configuration: Environment Open Telemetry configuration.
+ :vartype open_telemetry_configuration:
+ ~azure.mgmt.appcontainers.models.OpenTelemetryConfiguration
:ivar zone_redundant: Whether or not this Managed Environment is zone-redundant.
:vartype zone_redundant: bool
:ivar custom_domain_configuration: Custom domain configuration for the environment.
@@ -6281,6 +7107,14 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
"default_domain": {"key": "properties.defaultDomain", "type": "str"},
"static_ip": {"key": "properties.staticIp", "type": "str"},
"app_logs_configuration": {"key": "properties.appLogsConfiguration", "type": "AppLogsConfiguration"},
+ "app_insights_configuration": {
+ "key": "properties.appInsightsConfiguration",
+ "type": "AppInsightsConfiguration",
+ },
+ "open_telemetry_configuration": {
+ "key": "properties.openTelemetryConfiguration",
+ "type": "OpenTelemetryConfiguration",
+ },
"zone_redundant": {"key": "properties.zoneRedundant", "type": "bool"},
"custom_domain_configuration": {
"key": "properties.customDomainConfiguration",
@@ -6297,7 +7131,7 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
},
}
- def __init__(
+ def __init__( # pylint: disable=too-many-locals
self,
*,
location: str,
@@ -6307,6 +7141,8 @@ def __init__(
dapr_ai_connection_string: Optional[str] = None,
vnet_configuration: Optional["_models.VnetConfiguration"] = None,
app_logs_configuration: Optional["_models.AppLogsConfiguration"] = None,
+ app_insights_configuration: Optional["_models.AppInsightsConfiguration"] = None,
+ open_telemetry_configuration: Optional["_models.OpenTelemetryConfiguration"] = None,
zone_redundant: Optional[bool] = None,
custom_domain_configuration: Optional["_models.CustomDomainConfiguration"] = None,
workload_profiles: Optional[List["_models.WorkloadProfile"]] = None,
@@ -6335,6 +7171,12 @@ def __init__(
app logs to a destination. Currently only "log-analytics" is
supported.
:paramtype app_logs_configuration: ~azure.mgmt.appcontainers.models.AppLogsConfiguration
+ :keyword app_insights_configuration: Environment level Application Insights configuration.
+ :paramtype app_insights_configuration:
+ ~azure.mgmt.appcontainers.models.AppInsightsConfiguration
+ :keyword open_telemetry_configuration: Environment Open Telemetry configuration.
+ :paramtype open_telemetry_configuration:
+ ~azure.mgmt.appcontainers.models.OpenTelemetryConfiguration
:keyword zone_redundant: Whether or not this Managed Environment is zone-redundant.
:paramtype zone_redundant: bool
:keyword custom_domain_configuration: Custom domain configuration for the environment.
@@ -6364,6 +7206,8 @@ def __init__(
self.default_domain = None
self.static_ip = None
self.app_logs_configuration = app_logs_configuration
+ self.app_insights_configuration = app_insights_configuration
+ self.open_telemetry_configuration = open_telemetry_configuration
self.zone_redundant = zone_redundant
self.custom_domain_configuration = custom_domain_configuration
self.event_stream_endpoint = None
@@ -6583,6 +7427,26 @@ def __init__(
self.user_assigned_identities = user_assigned_identities
+class MetricsConfiguration(_serialization.Model):
+ """Configuration of Open Telemetry metrics.
+
+ :ivar destinations: Open telemetry metrics destinations.
+ :vartype destinations: list[str]
+ """
+
+ _attribute_map = {
+ "destinations": {"key": "destinations", "type": "[str]"},
+ }
+
+ def __init__(self, *, destinations: Optional[List[str]] = None, **kwargs: Any) -> None:
+ """
+ :keyword destinations: Open telemetry metrics destinations.
+ :paramtype destinations: list[str]
+ """
+ super().__init__(**kwargs)
+ self.destinations = destinations
+
+
class Mtls(_serialization.Model):
"""Configuration properties for mutual TLS authentication.
@@ -6797,6 +7661,53 @@ def __init__(
self.open_id_connect_configuration = open_id_connect_configuration
+class OpenTelemetryConfiguration(_serialization.Model):
+ """Configuration of Open Telemetry.
+
+ :ivar destinations_configuration: Open telemetry destinations configuration.
+ :vartype destinations_configuration: ~azure.mgmt.appcontainers.models.DestinationsConfiguration
+ :ivar traces_configuration: Open telemetry trace configuration.
+ :vartype traces_configuration: ~azure.mgmt.appcontainers.models.TracesConfiguration
+ :ivar logs_configuration: Open telemetry logs configuration.
+ :vartype logs_configuration: ~azure.mgmt.appcontainers.models.LogsConfiguration
+ :ivar metrics_configuration: Open telemetry metrics configuration.
+ :vartype metrics_configuration: ~azure.mgmt.appcontainers.models.MetricsConfiguration
+ """
+
+ _attribute_map = {
+ "destinations_configuration": {"key": "destinationsConfiguration", "type": "DestinationsConfiguration"},
+ "traces_configuration": {"key": "tracesConfiguration", "type": "TracesConfiguration"},
+ "logs_configuration": {"key": "logsConfiguration", "type": "LogsConfiguration"},
+ "metrics_configuration": {"key": "metricsConfiguration", "type": "MetricsConfiguration"},
+ }
+
+ def __init__(
+ self,
+ *,
+ destinations_configuration: Optional["_models.DestinationsConfiguration"] = None,
+ traces_configuration: Optional["_models.TracesConfiguration"] = None,
+ logs_configuration: Optional["_models.LogsConfiguration"] = None,
+ metrics_configuration: Optional["_models.MetricsConfiguration"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword destinations_configuration: Open telemetry destinations configuration.
+ :paramtype destinations_configuration:
+ ~azure.mgmt.appcontainers.models.DestinationsConfiguration
+ :keyword traces_configuration: Open telemetry trace configuration.
+ :paramtype traces_configuration: ~azure.mgmt.appcontainers.models.TracesConfiguration
+ :keyword logs_configuration: Open telemetry logs configuration.
+ :paramtype logs_configuration: ~azure.mgmt.appcontainers.models.LogsConfiguration
+ :keyword metrics_configuration: Open telemetry metrics configuration.
+ :paramtype metrics_configuration: ~azure.mgmt.appcontainers.models.MetricsConfiguration
+ """
+ super().__init__(**kwargs)
+ self.destinations_configuration = destinations_configuration
+ self.traces_configuration = traces_configuration
+ self.logs_configuration = logs_configuration
+ self.metrics_configuration = metrics_configuration
+
+
class OperationDetail(_serialization.Model):
"""Operation detail payload.
@@ -6889,6 +7800,336 @@ def __init__(
self.description = description
+class PatchCollection(_serialization.Model):
+ """Container App SourceToCloud patch collection.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar value: Collection of patch resources. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.PatchResource]
+ :ivar next_link: the link to the next page of items.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[PatchResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(self, *, value: List["_models.PatchResource"], next_link: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: Collection of patch resources. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.PatchResource]
+ :keyword next_link: the link to the next page of items.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class PatchDetails(_serialization.Model):
+ """The detailed info of patch operation performing when applying a patch.
+
+ 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 Azure.
+
+ :ivar target_container_name: The name of the target container for the patch. Required.
+ :vartype target_container_name: str
+ :ivar target_image: The name of the target image for the patch. Required.
+ :vartype target_image: str
+ :ivar last_detection_time: The UTC timestamp that describes the latest detection was done.
+ Required.
+ :vartype last_detection_time: ~datetime.datetime
+ :ivar detection_status: The status of the patch detection. Required. Known values are:
+ "Succeeded", "RegistryLoginFailed", and "Failed".
+ :vartype detection_status: str or ~azure.mgmt.appcontainers.models.DetectionStatus
+ :ivar new_image_name: The name of the new image created by the patch.
+ :vartype new_image_name: str
+ :ivar new_layer: New layer update details in the target image.
+ :vartype new_layer: ~azure.mgmt.appcontainers.models.PatchDetailsNewLayer
+ :ivar old_layer: The old layer details in the target image.
+ :vartype old_layer: ~azure.mgmt.appcontainers.models.PatchDetailsOldLayer
+ :ivar patch_type: The type for the patch. Known values are: "FrameworkSecurity", "OSSecurity",
+ "FrameworkAndOSSecurity", and "Other".
+ :vartype patch_type: str or ~azure.mgmt.appcontainers.models.PatchType
+ """
+
+ _validation = {
+ "target_container_name": {"required": True, "readonly": True},
+ "target_image": {"required": True, "readonly": True},
+ "last_detection_time": {"required": True, "readonly": True},
+ "detection_status": {"required": True, "readonly": True},
+ "new_image_name": {"readonly": True},
+ "new_layer": {"readonly": True},
+ "old_layer": {"readonly": True},
+ "patch_type": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "target_container_name": {"key": "targetContainerName", "type": "str"},
+ "target_image": {"key": "targetImage", "type": "str"},
+ "last_detection_time": {"key": "lastDetectionTime", "type": "iso-8601"},
+ "detection_status": {"key": "detectionStatus", "type": "str"},
+ "new_image_name": {"key": "newImageName", "type": "str"},
+ "new_layer": {"key": "newLayer", "type": "PatchDetailsNewLayer"},
+ "old_layer": {"key": "oldLayer", "type": "PatchDetailsOldLayer"},
+ "patch_type": {"key": "patchType", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.target_container_name = None
+ self.target_image = None
+ self.last_detection_time = None
+ self.detection_status = None
+ self.new_image_name = None
+ self.new_layer = None
+ self.old_layer = None
+ self.patch_type = None
+
+
+class PatchDetailsNewLayer(_serialization.Model):
+ """New layer update details in the target image.
+
+ :ivar name: The details of the new layer for the target image.
+ :vartype name: str
+ :ivar framework_and_version: The framework and its version in the new run image for the target
+ image.
+ :vartype framework_and_version: str
+ :ivar os_and_version: The OS name and its version in the new run image for the target image.
+ :vartype os_and_version: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "framework_and_version": {"key": "frameworkAndVersion", "type": "str"},
+ "os_and_version": {"key": "osAndVersion", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ framework_and_version: Optional[str] = None,
+ os_and_version: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: The details of the new layer for the target image.
+ :paramtype name: str
+ :keyword framework_and_version: The framework and its version in the new run image for the
+ target image.
+ :paramtype framework_and_version: str
+ :keyword os_and_version: The OS name and its version in the new run image for the target image.
+ :paramtype os_and_version: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.framework_and_version = framework_and_version
+ self.os_and_version = os_and_version
+
+
+class PatchDetailsOldLayer(_serialization.Model):
+ """The old layer details in the target image.
+
+ :ivar name: The details of the old layer for the target image.
+ :vartype name: str
+ :ivar framework_and_version: The framework and its version in the old run image for the target
+ image.
+ :vartype framework_and_version: str
+ :ivar os_and_version: The OS name and its version in the old run image for the target image.
+ :vartype os_and_version: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "framework_and_version": {"key": "frameworkAndVersion", "type": "str"},
+ "os_and_version": {"key": "osAndVersion", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ framework_and_version: Optional[str] = None,
+ os_and_version: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: The details of the old layer for the target image.
+ :paramtype name: str
+ :keyword framework_and_version: The framework and its version in the old run image for the
+ target image.
+ :paramtype framework_and_version: str
+ :keyword os_and_version: The OS name and its version in the old run image for the target image.
+ :paramtype os_and_version: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.framework_and_version = framework_and_version
+ self.os_and_version = os_and_version
+
+
+class PatchProperties(_serialization.Model):
+ """PatchProperties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar target_environment_id: The id of the target environment for the patch.
+ :vartype target_environment_id: str
+ :ivar target_container_app_id: The id of the target container app for the patch.
+ :vartype target_container_app_id: str
+ :ivar target_revision_id: The id of the target revision for the patch.
+ :vartype target_revision_id: str
+ :ivar provisioning_state: Patch provisioning state. Known values are: "Succeeded", "Failed",
+ and "Canceled".
+ :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.PatchProvisioningState
+ :ivar patch_apply_status: The status of the patch operation once it has been provisioned. Known
+ values are: "NotStarted", "RebaseInProgress", "CreatingRevision", "Succeeded", "Canceled",
+ "RebaseFailed", "RevisionCreationFailed", "ImagePushPullFailed", and "ManuallySkipped".
+ :vartype patch_apply_status: str or ~azure.mgmt.appcontainers.models.PatchApplyStatus
+ :ivar created_time: The UTC timestamp that describes when the patch object was created.
+ :vartype created_time: ~datetime.datetime
+ :ivar updated_time: The UTC timestamp that describes when the patch object was last updated.
+ :vartype updated_time: ~datetime.datetime
+ :ivar patch_details: Detailed info describes the patch operation for the target container app.
+ :vartype patch_details: list[~azure.mgmt.appcontainers.models.PatchDetails]
+ """
+
+ _validation = {
+ "provisioning_state": {"readonly": True},
+ "patch_apply_status": {"readonly": True},
+ "created_time": {"readonly": True},
+ "updated_time": {"readonly": True},
+ "patch_details": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "target_environment_id": {"key": "targetEnvironmentId", "type": "str"},
+ "target_container_app_id": {"key": "targetContainerAppId", "type": "str"},
+ "target_revision_id": {"key": "targetRevisionId", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "patch_apply_status": {"key": "patchApplyStatus", "type": "str"},
+ "created_time": {"key": "createdTime", "type": "iso-8601"},
+ "updated_time": {"key": "updatedTime", "type": "iso-8601"},
+ "patch_details": {"key": "patchDetails", "type": "[PatchDetails]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ target_environment_id: Optional[str] = None,
+ target_container_app_id: Optional[str] = None,
+ target_revision_id: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword target_environment_id: The id of the target environment for the patch.
+ :paramtype target_environment_id: str
+ :keyword target_container_app_id: The id of the target container app for the patch.
+ :paramtype target_container_app_id: str
+ :keyword target_revision_id: The id of the target revision for the patch.
+ :paramtype target_revision_id: str
+ """
+ super().__init__(**kwargs)
+ self.target_environment_id = target_environment_id
+ self.target_container_app_id = target_container_app_id
+ self.target_revision_id = target_revision_id
+ self.provisioning_state = None
+ self.patch_apply_status = None
+ self.created_time = None
+ self.updated_time = None
+ self.patch_details = None
+
+
+class PatchResource(ProxyResource):
+ """Container App Patch.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
+ :ivar properties: Properties that describes current states of the patch resource.
+ :vartype properties: ~azure.mgmt.appcontainers.models.PatchProperties
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "properties": {"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": "PatchProperties"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.properties = None
+
+
+class PreBuildStep(_serialization.Model):
+ """Model representing a pre-build step.
+
+ :ivar description: Description of the pre-build step.
+ :vartype description: str
+ :ivar scripts: List of custom commands to run.
+ :vartype scripts: list[str]
+ :ivar http_get: Http get request to send before the build.
+ :vartype http_get: ~azure.mgmt.appcontainers.models.HttpGet
+ """
+
+ _attribute_map = {
+ "description": {"key": "description", "type": "str"},
+ "scripts": {"key": "scripts", "type": "[str]"},
+ "http_get": {"key": "httpGet", "type": "HttpGet"},
+ }
+
+ def __init__(
+ self,
+ *,
+ description: Optional[str] = None,
+ scripts: Optional[List[str]] = None,
+ http_get: Optional["_models.HttpGet"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword description: Description of the pre-build step.
+ :paramtype description: str
+ :keyword scripts: List of custom commands to run.
+ :paramtype scripts: list[str]
+ :keyword http_get: Http get request to send before the build.
+ :paramtype http_get: ~azure.mgmt.appcontainers.models.HttpGet
+ """
+ super().__init__(**kwargs)
+ self.description = description
+ self.scripts = scripts
+ self.http_get = http_get
+
+
class QueueScaleRule(_serialization.Model):
"""Container App container Azure Queue based scaling rule.
@@ -7890,6 +9131,75 @@ def __init__(
self.service_binds = service_binds
+class TokenStore(_serialization.Model):
+ """The configuration settings of the token store.
+
+ :ivar enabled: :code:`true
` to durably store platform-specific security tokens
+ that are obtained during login flows; otherwise, :code:`false
`.
+ The default is :code:`false
`.
+ :vartype enabled: bool
+ :ivar token_refresh_extension_hours: The number of hours after session token expiration that a
+ session token can be used to
+ call the token refresh API. The default is 72 hours.
+ :vartype token_refresh_extension_hours: float
+ :ivar azure_blob_storage: The configuration settings of the storage of the tokens if blob
+ storage is used.
+ :vartype azure_blob_storage: ~azure.mgmt.appcontainers.models.BlobStorageTokenStore
+ """
+
+ _attribute_map = {
+ "enabled": {"key": "enabled", "type": "bool"},
+ "token_refresh_extension_hours": {"key": "tokenRefreshExtensionHours", "type": "float"},
+ "azure_blob_storage": {"key": "azureBlobStorage", "type": "BlobStorageTokenStore"},
+ }
+
+ def __init__(
+ self,
+ *,
+ enabled: Optional[bool] = None,
+ token_refresh_extension_hours: Optional[float] = None,
+ azure_blob_storage: Optional["_models.BlobStorageTokenStore"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword enabled: :code:`true
` to durably store platform-specific security tokens
+ that are obtained during login flows; otherwise, :code:`false
`.
+ The default is :code:`false
`.
+ :paramtype enabled: bool
+ :keyword token_refresh_extension_hours: The number of hours after session token expiration that
+ a session token can be used to
+ call the token refresh API. The default is 72 hours.
+ :paramtype token_refresh_extension_hours: float
+ :keyword azure_blob_storage: The configuration settings of the storage of the tokens if blob
+ storage is used.
+ :paramtype azure_blob_storage: ~azure.mgmt.appcontainers.models.BlobStorageTokenStore
+ """
+ super().__init__(**kwargs)
+ self.enabled = enabled
+ self.token_refresh_extension_hours = token_refresh_extension_hours
+ self.azure_blob_storage = azure_blob_storage
+
+
+class TracesConfiguration(_serialization.Model):
+ """Configuration of Open Telemetry traces.
+
+ :ivar destinations: Open telemetry traces destinations.
+ :vartype destinations: list[str]
+ """
+
+ _attribute_map = {
+ "destinations": {"key": "destinations", "type": "[str]"},
+ }
+
+ def __init__(self, *, destinations: Optional[List[str]] = None, **kwargs: Any) -> None:
+ """
+ :keyword destinations: Open telemetry traces destinations.
+ :paramtype destinations: list[str]
+ """
+ super().__init__(**kwargs)
+ self.destinations = destinations
+
+
class TrafficWeight(_serialization.Model):
"""Traffic weight assigned to a revision.
@@ -8009,6 +9319,81 @@ def __init__(
self.consumer_secret_setting_name = consumer_secret_setting_name
+class Usage(_serialization.Model):
+ """Describes Compute Resource Usage.
+
+ 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 Azure.
+
+ :ivar unit: An enum describing the unit of usage measurement. Required. Default value is
+ "Count".
+ :vartype unit: str
+ :ivar current_value: The current usage of the resource. Required.
+ :vartype current_value: int
+ :ivar limit: The maximum permitted usage of the resource. Required.
+ :vartype limit: int
+ :ivar name: The name of the type of usage. Required.
+ :vartype name: ~azure.mgmt.appcontainers.models.UsageName
+ """
+
+ _validation = {
+ "unit": {"required": True, "constant": True},
+ "current_value": {"required": True},
+ "limit": {"required": True},
+ "name": {"required": True},
+ }
+
+ _attribute_map = {
+ "unit": {"key": "unit", "type": "str"},
+ "current_value": {"key": "currentValue", "type": "int"},
+ "limit": {"key": "limit", "type": "int"},
+ "name": {"key": "name", "type": "UsageName"},
+ }
+
+ unit = "Count"
+
+ def __init__(self, *, current_value: int, limit: int, name: "_models.UsageName", **kwargs: Any) -> None:
+ """
+ :keyword current_value: The current usage of the resource. Required.
+ :paramtype current_value: int
+ :keyword limit: The maximum permitted usage of the resource. Required.
+ :paramtype limit: int
+ :keyword name: The name of the type of usage. Required.
+ :paramtype name: ~azure.mgmt.appcontainers.models.UsageName
+ """
+ super().__init__(**kwargs)
+ self.current_value = current_value
+ self.limit = limit
+ self.name = name
+
+
+class UsageName(_serialization.Model):
+ """The Usage Names.
+
+ :ivar value: The name of the resource.
+ :vartype value: str
+ :ivar localized_value: The localized name of the resource.
+ :vartype localized_value: str
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "str"},
+ "localized_value": {"key": "localizedValue", "type": "str"},
+ }
+
+ def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: The name of the resource.
+ :paramtype value: str
+ :keyword localized_value: The localized name of the resource.
+ :paramtype localized_value: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.localized_value = localized_value
+
+
class UserAssignedIdentity(_serialization.Model):
"""User assigned identity properties.
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/__init__.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/__init__.py
index 839be84fdb2f..0aef78faf76a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/__init__.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/__init__.py
@@ -9,6 +9,8 @@
from ._container_apps_auth_configs_operations import ContainerAppsAuthConfigsOperations
from ._available_workload_profiles_operations import AvailableWorkloadProfilesOperations
from ._billing_meters_operations import BillingMetersOperations
+from ._builders_operations import BuildersOperations
+from ._builds_operations import BuildsOperations
from ._connected_environments_operations import ConnectedEnvironmentsOperations
from ._connected_environments_certificates_operations import ConnectedEnvironmentsCertificatesOperations
from ._connected_environments_dapr_components_operations import ConnectedEnvironmentsDaprComponentsOperations
@@ -29,7 +31,10 @@
from ._namespaces_operations import NamespacesOperations
from ._dapr_components_operations import DaprComponentsOperations
from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations
+from ._patches_operations import PatchesOperations
from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations
+from ._usages_operations import UsagesOperations
+from ._managed_environment_usages_operations import ManagedEnvironmentUsagesOperations
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
@@ -39,6 +44,8 @@
"ContainerAppsAuthConfigsOperations",
"AvailableWorkloadProfilesOperations",
"BillingMetersOperations",
+ "BuildersOperations",
+ "BuildsOperations",
"ConnectedEnvironmentsOperations",
"ConnectedEnvironmentsCertificatesOperations",
"ConnectedEnvironmentsDaprComponentsOperations",
@@ -59,7 +66,10 @@
"NamespacesOperations",
"DaprComponentsOperations",
"ManagedEnvironmentsStoragesOperations",
+ "PatchesOperations",
"ContainerAppsSourceControlsOperations",
+ "UsagesOperations",
+ "ManagedEnvironmentUsagesOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_available_workload_profiles_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_available_workload_profiles_operations.py
index a4512d46ae92..943cccc35f79 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_available_workload_profiles_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_available_workload_profiles_operations.py
@@ -40,7 +40,7 @@ def build_get_request(location: str, subscription_id: str, **kwargs: Any) -> Htt
_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_billing_meters_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_billing_meters_operations.py
index c14efc555e25..f4483307f544 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_billing_meters_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_billing_meters_operations.py
@@ -38,7 +38,7 @@ def build_get_request(location: str, subscription_id: str, **kwargs: Any) -> Htt
_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builders_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builders_operations.py
new file mode 100644
index 000000000000..6d06ae520504
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builders_operations.py
@@ -0,0 +1,1069 @@
+# 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.
+# 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
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
+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.pipeline.transport import HttpResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import 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 azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_by_subscription_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.App/builders")
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ }
+
+ _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_by_resource_group_request(resource_group_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ }
+
+ _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, builder_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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, builder_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-08-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.App/builders/{builderName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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_request(
+ resource_group_name: str, builder_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-08-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.App/builders/{builderName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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, builder_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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)
+
+
+class BuildersOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`builders` 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_by_subscription(self, **kwargs: Any) -> Iterable["_models.BuilderResource"]:
+ """List BuilderResource resources by subscription ID.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either BuilderResource or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderCollection] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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_by_subscription_request(
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list_by_subscription.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("BuilderCollection", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ list_by_subscription.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/builders"}
+
+ @distributed_trace
+ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.BuilderResource"]:
+ """List BuilderResource resources by resource group.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either BuilderResource or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderCollection] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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_by_resource_group_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list_by_resource_group.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("BuilderCollection", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ list_by_resource_group.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders"
+ }
+
+ @distributed_trace
+ def get(self, resource_group_name: str, builder_name: str, **kwargs: Any) -> _models.BuilderResource:
+ """Get a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: BuilderResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.BuilderResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.BuilderResource] = kwargs.pop("cls", None)
+
+ request = build_get_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResource, IO],
+ **kwargs: Any
+ ) -> _models.BuilderResource:
+ error_map = {
+ 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[_models.BuilderResource] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(builder_envelope, (IOBase, bytes)):
+ _content = builder_envelope
+ else:
+ _json = self._serialize.body(builder_envelope, "BuilderResource")
+
+ request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ template_url=self._create_or_update_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if response.status_code == 201:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ _create_or_update_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: _models.BuilderResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.BuilderResource]:
+ """Create or update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: Resource create parameters. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: IO,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.BuilderResource]:
+ """Create or update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: Resource create parameters. Required.
+ :type builder_envelope: IO
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResource, IO],
+ **kwargs: Any
+ ) -> LROPoller[_models.BuilderResource]:
+ """Create or update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: Resource create parameters. Is either a BuilderResource type or a IO
+ type. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResource or IO
+ :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
+ Default value is None.
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderResource] = 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,
+ builder_name=builder_name,
+ builder_envelope=builder_envelope,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_create_or_update.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ def _update_initial(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResourceUpdate, IO],
+ **kwargs: Any
+ ) -> Optional[_models.BuilderResource]:
+ error_map = {
+ 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[Optional[_models.BuilderResource]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(builder_envelope, (IOBase, bytes)):
+ _content = builder_envelope
+ else:
+ _json = self._serialize.body(builder_envelope, "BuilderResourceUpdate")
+
+ request = build_update_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ template_url=self._update_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _update_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ @overload
+ def begin_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: _models.BuilderResourceUpdate,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.BuilderResource]:
+ """Update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: The resource properties to be updated. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResourceUpdate
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: IO,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.BuilderResource]:
+ """Update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: The resource properties to be updated. Required.
+ :type builder_envelope: IO
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ builder_envelope: Union[_models.BuilderResourceUpdate, IO],
+ **kwargs: Any
+ ) -> LROPoller[_models.BuilderResource]:
+ """Update a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param builder_envelope: The resource properties to be updated. Is either a
+ BuilderResourceUpdate type or a IO type. Required.
+ :type builder_envelope: ~azure.mgmt.appcontainers.models.BuilderResourceUpdate or IO
+ :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
+ Default value is None.
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuilderResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuilderResource]
+ :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.BuilderResource] = 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_initial(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ builder_envelope=builder_envelope,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("BuilderResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_update.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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[None] = kwargs.pop("cls", None)
+
+ request = build_delete_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._delete_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
+
+ @distributed_trace
+ def begin_delete(self, resource_group_name: str, builder_name: str, **kwargs: Any) -> LROPoller[None]:
+ """Delete a BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_delete.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_operations.py
new file mode 100644
index 000000000000..b6e4d319a664
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_operations.py
@@ -0,0 +1,738 @@
+# 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.
+# 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
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
+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.pipeline.transport import HttpResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import 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 azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_by_builder_resource_request(
+ resource_group_name: str, builder_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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, builder_name: str, build_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "buildName": _SERIALIZER.url(
+ "build_name", build_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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, builder_name: str, build_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-08-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.App/builders/{builderName}/builds/{buildName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "buildName": _SERIALIZER.url(
+ "build_name", build_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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, builder_name: str, build_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "buildName": _SERIALIZER.url(
+ "build_name", build_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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)
+
+
+class BuildsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`builds` 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_by_builder_resource(
+ self, resource_group_name: str, builder_name: str, **kwargs: Any
+ ) -> Iterable["_models.BuildResource"]:
+ """List BuildResource resources by BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either BuildResource or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.BuildResource]
+ :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.BuildCollection] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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_by_builder_resource_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list_by_builder_resource.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("BuildCollection", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ list_by_builder_resource.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds"
+ }
+
+ @distributed_trace
+ def get(self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any) -> _models.BuildResource:
+ """Get a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: BuildResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.BuildResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.BuildResource] = kwargs.pop("cls", None)
+
+ request = build_get_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: Union[_models.BuildResource, IO],
+ **kwargs: Any
+ ) -> _models.BuildResource:
+ error_map = {
+ 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[_models.BuildResource] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(build_envelope, (IOBase, bytes)):
+ _content = build_envelope
+ else:
+ _json = self._serialize.body(build_envelope, "BuildResource")
+
+ request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ template_url=self._create_or_update_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+
+ if response.status_code == 201:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ _create_or_update_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: _models.BuildResource,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.BuildResource]:
+ """Create a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :param build_envelope: Resource create or update parameters. Required.
+ :type build_envelope: ~azure.mgmt.appcontainers.models.BuildResource
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuildResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuildResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: IO,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.BuildResource]:
+ """Create a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :param build_envelope: Resource create or update parameters. Required.
+ :type build_envelope: IO
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuildResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuildResource]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ builder_name: str,
+ build_name: str,
+ build_envelope: Union[_models.BuildResource, IO],
+ **kwargs: Any
+ ) -> LROPoller[_models.BuildResource]:
+ """Create a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :param build_envelope: Resource create or update parameters. Is either a BuildResource type or
+ a IO type. Required.
+ :type build_envelope: ~azure.mgmt.appcontainers.models.BuildResource or IO
+ :keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
+ Default value is None.
+ :paramtype content_type: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either BuildResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.BuildResource]
+ :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.BuildResource] = 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,
+ builder_name=builder_name,
+ build_name=build_name,
+ build_envelope=build_envelope,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("BuildResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_create_or_update.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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[None] = kwargs.pop("cls", None)
+
+ request = build_delete_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._delete_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete a BuildResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ build_name=build_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_delete.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_certificates_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_certificates_operations.py
index 27f61a142e07..47e51b738610 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_certificates_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_certificates_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +76,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +147,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +181,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_certificates_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_certificates_operations.py
index 62a998e48a9b..1c7aaac42a58 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_certificates_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_certificates_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -80,7 +80,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -118,7 +118,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -159,7 +159,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -197,7 +197,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_dapr_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_dapr_components_operations.py
index 231c1e56afd3..ff10faa33d74 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_dapr_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_dapr_components_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +76,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +147,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +181,7 @@ def build_list_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_operations.py
index df60ba17c572..7b3cf345ffa4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +67,7 @@ def build_list_by_resource_group_request(resource_group_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +99,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +132,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,7 +168,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -201,7 +201,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -234,7 +234,7 @@ def build_check_name_availability_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_storages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_storages_operations.py
index 137b91f69a70..094886e65603 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_storages_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_connected_environments_storages_operations.py
@@ -41,7 +41,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -74,7 +74,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -108,7 +108,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -145,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_api_client_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_api_client_operations.py
index 32fc8b154350..def16d057d48 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_api_client_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_api_client_operations.py
@@ -40,7 +40,7 @@ def build_job_execution_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -70,6 +70,32 @@ def build_job_execution_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+def build_get_custom_domain_verification_id_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId"
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ }
+
+ _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 ContainerAppsAPIClientOperationsMixin(ContainerAppsAPIClientMixinABC):
@distributed_trace
def job_execution(
@@ -140,3 +166,59 @@ def job_execution(
job_execution.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}"
}
+
+ @distributed_trace
+ def get_custom_domain_verification_id(self, **kwargs: Any) -> str:
+ """Get the verification id of a subscription used for verifying custom domains.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: str or the result of cls(response)
+ :rtype: str
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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[str] = kwargs.pop("cls", None)
+
+ request = build_get_custom_domain_verification_id_request(
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get_custom_domain_verification_id.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("str", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get_custom_domain_verification_id.metadata = {
+ "url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_auth_configs_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_auth_configs_operations.py
index 4d5a8ba42b0b..0a2bc5b543c3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_auth_configs_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_auth_configs_operations.py
@@ -43,7 +43,7 @@ def build_list_by_container_app_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +76,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +147,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_diagnostics_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_diagnostics_operations.py
index c0b74244ccaa..c2881aa8f267 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_diagnostics_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_diagnostics_operations.py
@@ -42,7 +42,7 @@ def build_list_detectors_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -75,7 +75,7 @@ def build_get_detector_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -114,7 +114,7 @@ def build_list_revisions_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -149,7 +149,7 @@ def build_get_revision_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -183,7 +183,7 @@ def build_get_root_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_operations.py
index c34634c1b3c5..d502b3db0c0c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +67,7 @@ def build_list_by_resource_group_request(resource_group_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +99,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +132,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,7 +168,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -201,7 +201,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -242,7 +242,7 @@ def build_list_custom_host_name_analysis_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -277,7 +277,7 @@ def build_list_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -310,7 +310,7 @@ def build_get_auth_token_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -343,7 +343,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -378,7 +378,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revision_replicas_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revision_replicas_operations.py
index 07d96073dab9..24c72bff7c08 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revision_replicas_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revision_replicas_operations.py
@@ -45,7 +45,7 @@ def build_get_replica_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -80,7 +80,7 @@ def build_list_replicas_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revisions_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revisions_operations.py
index f3b824f57146..316240ca9381 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revisions_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_revisions_operations.py
@@ -47,7 +47,7 @@ def build_list_revisions_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +82,7 @@ def build_get_revision_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -116,7 +116,7 @@ def build_activate_revision_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -150,7 +150,7 @@ def build_deactivate_revision_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -184,7 +184,7 @@ def build_restart_revision_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_source_controls_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_source_controls_operations.py
index b63b5e798db5..c98f220c4661 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_source_controls_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_source_controls_operations.py
@@ -45,7 +45,7 @@ def build_list_by_container_app_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -149,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_components_operations.py
index 13bdf064e305..dd4e4f47d83a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_components_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +76,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +147,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +181,7 @@ def build_list_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_executions_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_executions_operations.py
index 8fb796cc10bb..ce16ab6d3746 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_executions_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_executions_operations.py
@@ -42,7 +42,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_operations.py
index 8c365448a72c..4b792036e2a0 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_jobs_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +67,7 @@ def build_list_by_resource_group_request(resource_group_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -97,7 +97,7 @@ def build_get_request(resource_group_name: str, job_name: str, subscription_id:
_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -130,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -164,7 +164,7 @@ def build_delete_request(resource_group_name: str, job_name: str, subscription_i
_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -195,7 +195,7 @@ def build_update_request(resource_group_name: str, job_name: str, subscription_i
_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -229,7 +229,7 @@ def build_start_request(resource_group_name: str, job_name: str, subscription_id
_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -265,7 +265,7 @@ def build_stop_execution_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -301,7 +301,7 @@ def build_stop_multiple_executions_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -334,7 +334,7 @@ def build_list_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_certificates_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_certificates_operations.py
index fae571bdf1bf..71efd228a7af 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_certificates_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_certificates_operations.py
@@ -45,7 +45,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -116,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -150,7 +150,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_diagnostics_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_diagnostics_operations.py
index d1bcbc91fd4b..a8a53ce901c3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_diagnostics_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_diagnostics_operations.py
@@ -40,7 +40,7 @@ def build_list_detectors_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -73,7 +73,7 @@ def build_get_detector_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_usages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_usages_operations.py
new file mode 100644
index 000000000000..299f39e7f57e
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_usages_operations.py
@@ -0,0 +1,179 @@
+# 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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+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.pipeline.transport import HttpResponse
+from azure.core.rest import 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 .._serialization import Serializer
+from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+
+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, environment_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "environmentName": _SERIALIZER.url("environment_name", environment_name, "str", pattern=r"^[-\w\._]+$"),
+ }
+
+ _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 ManagedEnvironmentUsagesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`managed_environment_usages` 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, environment_name: str, **kwargs: Any) -> Iterable["_models.Usage"]:
+ """Gets the current usage information as well as the limits for environment.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param environment_name: Name of the Environment. Required.
+ :type environment_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either Usage or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.Usage]
+ :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.ListUsagesResult] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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,
+ environment_name=environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("ListUsagesResult", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ list.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_diagnostics_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_diagnostics_operations.py
index c3f01b2462f7..7cf52339db23 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_diagnostics_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_diagnostics_operations.py
@@ -40,7 +40,7 @@ def build_get_root_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_operations.py
index 79a74f4d0ccc..59d8561bd6b2 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_operations.py
@@ -43,7 +43,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +67,7 @@ def build_list_by_resource_group_request(resource_group_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +99,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +132,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,7 +168,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -201,7 +201,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -237,7 +237,7 @@ def build_get_auth_token_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -270,7 +270,7 @@ def build_list_workload_profile_states_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_operations.py
index 733f73c8967d..c2f8137d7938 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_operations.py
@@ -41,7 +41,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -74,7 +74,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -108,7 +108,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -145,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_namespaces_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_namespaces_operations.py
index c18e4e341a53..1cd0d92bd030 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_namespaces_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_namespaces_operations.py
@@ -41,7 +41,7 @@ def build_check_name_availability_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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_operations.py
index 72dfb15cee16..ff1598a09bc2 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_operations.py
@@ -40,7 +40,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-05-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-08-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patches_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patches_operations.py
new file mode 100644
index 000000000000..1575af9eca7a
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_patches_operations.py
@@ -0,0 +1,775 @@
+# 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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from typing import Any, Callable, Dict, Optional, TypeVar, Union, cast
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import 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 azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_by_builder_resource_request(
+ resource_group_name: str, builder_name: str, subscription_id: str, *, filter: 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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+ if filter is not None:
+ _params["$filter"] = _SERIALIZER.query("filter", filter, "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, builder_name: str, patch_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "patchName": _SERIALIZER.url(
+ "patch_name", patch_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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_delete_request(
+ resource_group_name: str, builder_name: str, patch_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "patchName": _SERIALIZER.url(
+ "patch_name", patch_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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_skip_configure_request(
+ resource_group_name: str, builder_name: str, patch_name: str, subscription_id: str, *, json: bool, **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-08-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",
+ "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "patchName": _SERIALIZER.url(
+ "patch_name", patch_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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, json=json, **kwargs)
+
+
+def build_apply_request(
+ resource_group_name: str, builder_name: str, patch_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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "builderName": _SERIALIZER.url(
+ "builder_name", builder_name, "str", max_length=32, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "patchName": _SERIALIZER.url(
+ "patch_name", patch_name, "str", max_length=64, min_length=2, pattern=r"^[-\w\._\(\)]+$"
+ ),
+ }
+
+ _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 PatchesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`patches` 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_by_builder_resource(
+ self, resource_group_name: str, builder_name: str, filter: Optional[str] = None, **kwargs: Any
+ ) -> _models.PatchCollection:
+ """List PatchResource resources by BuilderResource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param filter: The filter to apply on the operation. Default value is None.
+ :type filter: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PatchCollection or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.PatchCollection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.PatchCollection] = kwargs.pop("cls", None)
+
+ request = build_list_by_builder_resource_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ subscription_id=self._config.subscription_id,
+ filter=filter,
+ api_version=api_version,
+ template_url=self.list_by_builder_resource.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("PatchCollection", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_by_builder_resource.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches"
+ }
+
+ @distributed_trace
+ def get(self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any) -> _models.PatchResource:
+ """Get details for specific patch by patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: PatchResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.PatchResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map = {
+ 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.PatchResource] = kwargs.pop("cls", None)
+
+ request = build_get_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.get.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("PatchResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}"
+ }
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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[None] = kwargs.pop("cls", None)
+
+ request = build_delete_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._delete_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}"
+ }
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete specific patch by patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_delete.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}"
+ }
+
+ def _skip_configure_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, builder_name: str, patch_name: str, patch_skip_config: bool, **kwargs: Any
+ ) -> None:
+ error_map = {
+ 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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json"))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+
+ _json = self._serialize.body(patch_skip_config, "bool")
+
+ request = build_skip_configure_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ template_url=self._skip_configure_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _skip_configure_initial.metadata = {
+ "url": "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig"
+ }
+
+ @distributed_trace
+ def begin_skip_configure(
+ self, resource_group_name: str, builder_name: str, patch_name: str, patch_skip_config: bool, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Configure the patch skip option by patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :param patch_skip_config: Configure patcher to skip a patch or not. Required.
+ :type patch_skip_config: bool
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :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 = 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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json"))
+ 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._skip_configure_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ patch_skip_config=patch_skip_config,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_skip_configure.metadata = {
+ "url": "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig"
+ }
+
+ def _apply_initial(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> Optional[_models.PatchResource]:
+ error_map = {
+ 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[Optional[_models.PatchResource]] = kwargs.pop("cls", None)
+
+ request = build_apply_request(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self._apply_initial.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("PatchResource", pipeline_response)
+
+ if response.status_code == 202:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _apply_initial.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply"
+ }
+
+ @distributed_trace
+ def begin_apply(
+ self, resource_group_name: str, builder_name: str, patch_name: str, **kwargs: Any
+ ) -> LROPoller[_models.PatchResource]:
+ """Apply a PatchResource with patch name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param builder_name: The name of the builder. Required.
+ :type builder_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either PatchResource or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.PatchResource]
+ :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.PatchResource] = 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._apply_initial(
+ resource_group_name=resource_group_name,
+ builder_name=builder_name,
+ patch_name=patch_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("PatchResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ 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.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ begin_apply.metadata = {
+ "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply"
+ }
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_usages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_usages_operations.py
new file mode 100644
index 000000000000..041b29ea44e7
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_usages_operations.py
@@ -0,0 +1,168 @@
+# 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.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+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.pipeline.transport import HttpResponse
+from azure.core.rest import 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 .._serialization import Serializer
+from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+
+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(location: 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-08-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages"
+ )
+ path_format_arguments = {
+ "location": _SERIALIZER.url("location", location, "str", pattern=r"^[-\w\._]+$"),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
+ }
+
+ _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 UsagesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`usages` 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, location: str, **kwargs: Any) -> Iterable["_models.Usage"]:
+ """Gets, for the specified location, the current resource usage information as well as the limits
+ under the subscription.
+
+ :param location: The location for which resource usage is queried. Required.
+ :type location: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either Usage or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.Usage]
+ :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.ListUsagesResult] = kwargs.pop("cls", None)
+
+ error_map = {
+ 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(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ template_url=self.list.metadata["url"],
+ headers=_headers,
+ params=_params,
+ )
+ request = _convert_request(request)
+ 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 = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("ListUsagesResult", 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)
+ error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages"}
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_create_or_update.py
index e933e3c96b01..0f65aa8c24b1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_create_or_update.py
@@ -35,6 +35,10 @@ def main():
auth_config_name="current",
auth_config_envelope={
"properties": {
+ "encryptionSettings": {
+ "containerAppAuthEncryptionSecretName": "testEncryptionSecretName",
+ "containerAppAuthSigningSecretName": "testSigningSecretName",
+ },
"globalValidation": {"unauthenticatedClientAction": "AllowAnonymous"},
"identityProviders": {
"facebook": {"registration": {"appId": "123", "appSecretSettingName": "facebook-secret"}}
@@ -46,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_delete.py
index d913c3efce8c..69bdd889b308 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_get.py
index c9d09e41f997..9fd36dac92e3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_list_by_container.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_list_by_container.py
index 370df7f6cdaf..f3379ef0bf9b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_list_by_container.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/auth_configs_list_by_container.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_ListByContainer.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_ListByContainer.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/available_workload_profiles_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/available_workload_profiles_get.py
index 8ebff8a5ac89..de8d507738f4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/available_workload_profiles_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/available_workload_profiles_get.py
@@ -36,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AvailableWorkloadProfiles_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AvailableWorkloadProfiles_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/billing_meters_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/billing_meters_get.py
index a5f9b32efea8..f9fab88a0aa5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/billing_meters_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/billing_meters_get.py
@@ -35,6 +35,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/BillingMeters_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/BillingMeters_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_create_or_update.py
new file mode 100644
index 000000000000..eed3c8179a06
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_create_or_update.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.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builders_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builders.begin_create_or_update(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ builder_envelope={
+ "identity": {
+ "type": "SystemAssigned,UserAssigned",
+ "userAssignedIdentities": {
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}
+ },
+ },
+ "location": "eastus",
+ "properties": {
+ "containerRegistries": [
+ {
+ "containerRegistryServer": "test.azurecr.io",
+ "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1",
+ },
+ {
+ "containerRegistryServer": "test2.azurecr.io",
+ "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1",
+ },
+ ],
+ "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv",
+ },
+ "tags": {"company": "Microsoft"},
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_CreateOrUpdate.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_delete.py
new file mode 100644
index 000000000000..3d88937d9888
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_delete.py
@@ -0,0 +1,40 @@
+# 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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builders_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.builders.begin_delete(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_get.py
new file mode 100644
index 000000000000..d99b90eeea0d
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_get.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builders_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builders.get(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_list_by_resource_group.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_list_by_resource_group.py
new file mode 100644
index 000000000000..f63e6f240d02
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_list_by_resource_group.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builders_list_by_resource_group.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builders.list_by_resource_group(
+ resource_group_name="rg",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_ListByResourceGroup.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_list_by_subscription.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_list_by_subscription.py
new file mode 100644
index 000000000000..ee02a0f54f6e
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_list_by_subscription.py
@@ -0,0 +1,39 @@
+# 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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builders_list_by_subscription.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builders.list_by_subscription()
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_ListBySubscription.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_update.py
new file mode 100644
index 000000000000..dfaf6c2ef5f9
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_update.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builders_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builders.begin_update(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ builder_envelope={"tags": {"mytag1": "myvalue1"}},
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Update.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_create_or_update.py
new file mode 100644
index 000000000000..f19acb7e3798
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_create_or_update.py
@@ -0,0 +1,69 @@
+# 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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builds_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builds.begin_create_or_update(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ build_name="testBuild-123456789az",
+ build_envelope={
+ "properties": {
+ "configuration": {
+ "baseOs": "DebianBullseye",
+ "environmentVariables": [{"name": "foo1", "value": "bar1"}, {"name": "foo2", "value": "bar2"}],
+ "platform": "dotnetcore",
+ "platformVersion": "7.0",
+ "preBuildSteps": [
+ {
+ "description": "First pre build step.",
+ "httpGet": {
+ "fileName": "output.txt",
+ "headers": ["foo", "bar"],
+ "url": "https://microsoft.com",
+ },
+ "scripts": ["echo 'hello'", "echo 'world'"],
+ },
+ {
+ "description": "Second pre build step.",
+ "httpGet": {"fileName": "output.txt", "headers": ["foo"], "url": "https://microsoft.com"},
+ "scripts": ["echo 'hello'", "echo 'again'"],
+ },
+ ],
+ },
+ "destinationContainerRegistry": {"image": "test.azurecr.io/repo:tag", "server": "test.azurecr.io"},
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_delete.py
new file mode 100644
index 000000000000..83a6df1ed2eb
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builds_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.builds.begin_delete(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ build_name="testBuild",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_get.py
new file mode 100644
index 000000000000..dd36e8978bf5
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_get.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builds_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builds.get(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ build_name="testBuild",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_by_builder_resource.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_by_builder_resource.py
new file mode 100644
index 000000000000..b21f82058688
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_by_builder_resource.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python builds_list_by_builder_resource.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.builds.list_by_builder_resource(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update.py
index dea5245c2589..92fda68b9570 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_delete.py
index 9bedcdc0d2c4..c417939124d0 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_get.py
index 62539bee8b81..8c452e283a4a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_check_name_availability.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_check_name_availability.py
index af5b1bdad649..f39ae4da3e89 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_check_name_availability.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_check_name_availability.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_CheckNameAvailability.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_CheckNameAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_list_by_managed_environment.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_list_by_managed_environment.py
index 680006d38a36..2a3fd0f3da48 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_list_by_managed_environment.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_list_by_managed_environment.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_ListByManagedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_ListByManagedEnvironment.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_patch.py
index 1f2f47e01827..d4908aac0805 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_patch.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_create_or_update.py
index 5dc0509c4cf9..c5d8e3c4e825 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_create_or_update.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_delete.py
index 2633d9418944..bf0827a41b09 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_get.py
index 546e64901b68..a4229bdf8f94 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificate_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_check_name_availability.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_check_name_availability.py
index e5ccd5834d34..a7b34371addc 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_check_name_availability.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_check_name_availability.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_list_by_connected_environment.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_list_by_connected_environment.py
index 9d5231c54a61..de45c44f2dfb 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_list_by_connected_environment.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_list_by_connected_environment.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_patch.py
index 50ac15f55c98..0c0586b587e7 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_certificates_patch.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_create_or_update.py
index 024b703035d0..864eaf5bb223 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_create_or_update.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_create_or_update.py
index 30ab1302e2e4..cdaae2f80bad 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_create_or_update.py
@@ -46,6 +46,13 @@ def main():
],
"scopes": ["container-app-1", "container-app-2"],
"secrets": [{"name": "masterkey", "value": "keyvalue"}],
+ "serviceComponentBind": [
+ {
+ "metadata": {"name": "daprcomponentBind", "value": "redis-bind"},
+ "name": "statestore",
+ "serviceId": "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis",
+ }
+ ],
"version": "v1",
}
},
@@ -53,6 +60,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_delete.py
index 94be51b901ab..6ed16e2332d3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_get.py
index 034e8c27c470..96c726ba28fa 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list.py
index 929659d36ee9..abb3ea1f6f1c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list_secrets.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list_secrets.py
index ea1924799cfe..192952e8d7fb 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list_secrets.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_dapr_components_list_secrets.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_delete.py
index e91c1a4ad166..cbbe46445552 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_delete.py
@@ -35,6 +35,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_get.py
index 8ecda7c844be..d78865b91946 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_get.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_resource_group.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_resource_group.py
index a7437b6acabe..9e994f58c0dd 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_resource_group.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_resource_group.py
@@ -36,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_subscription.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_subscription.py
index 31d38cb5e5dd..243f8b0e093e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_subscription.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_list_by_subscription.py
@@ -34,6 +34,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_ListBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_patch.py
index af6d619d9777..fc30767b823e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_patch.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_create_or_update.py
index e4e7ab5a9df6..b6673b439cf6 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_create_or_update.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_delete.py
index bca28941a160..c974c2d5e937 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_get.py
index 97a62f342dd5..30cd118db2af 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_list.py
index a90a72645a73..ae40445a310f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/connected_environments_storages_list.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_check_name_availability.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_check_name_availability.py
index 5c35e5a4779f..0484638674bf 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_check_name_availability.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_check_name_availability.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CheckNameAvailability.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_CheckNameAvailability.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update.py
index 10fe12cf4049..3c86b9f07176 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update.py
@@ -46,6 +46,10 @@ def main():
"logLevel": "debug",
},
"ingress": {
+ "additionalPortMappings": [
+ {"external": True, "targetPort": 1234},
+ {"exposedPort": 3456, "external": False, "targetPort": 2345},
+ ],
"clientCertificateMode": "accept",
"corsPolicy": {
"allowCredentials": True,
@@ -142,6 +146,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_delete.py
index 48c2756b876f..cb45bac0e929 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_delete.py
@@ -35,6 +35,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_get.py
index 0761a61c008a..b5d800e86af8 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerAppsDiagnostics_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_list.py
index 5aa2868ba2f0..e3cf8b2170d5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_diagnostics_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerAppsDiagnostics_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get.py
index c2559b742b38..0e6f4d6ebcb3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get_auth_token.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get_auth_token.py
index 85cbd920a7aa..09e2659bc20e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get_auth_token.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_get_auth_token.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_GetAuthToken.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_GetAuthToken.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_resource_group.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_resource_group.py
index 73845482b33c..33f72ac9927f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_resource_group.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_resource_group.py
@@ -36,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListByResourceGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_subscription.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_subscription.py
index ce7078802744..4ede7729306b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_subscription.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_by_subscription.py
@@ -34,6 +34,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_custom_host_name_analysis.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_custom_host_name_analysis.py
index 2eae969a7545..95ec0782a29f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_custom_host_name_analysis.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_custom_host_name_analysis.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListCustomHostNameAnalysis.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_secrets.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_secrets.py
index 231a13c9fcfd..41dbebc9eba6 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_secrets.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_list_secrets.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListSecrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_managed_by_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_managed_by_create_or_update.py
index 3133e2bdfcdd..299cfb68a12b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_managed_by_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_managed_by_create_or_update.py
@@ -73,6 +73,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patch.py
index 3e56a5045fd9..a6c3558cf70a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patch.py
@@ -130,6 +130,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_start.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_start.py
index 71164ee29964..c112ab0fb7ca 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_start.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_start.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Start.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Start.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_stop.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_stop.py
index c0d7fd44776d..51d9a4e0ad91 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_stop.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_stop.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Stop.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Stop.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_tcp_app_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_tcp_app_create_or_update.py
index a0c0482f4f7f..b7d6e9e219a4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_tcp_app_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_tcp_app_create_or_update.py
@@ -72,6 +72,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secret_store_component.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secret_store_component.py
index bb315049008e..ce5a4be16e01 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secret_store_component.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secret_store_component.py
@@ -46,6 +46,13 @@ def main():
],
"scopes": ["container-app-1", "container-app-2"],
"secretStoreComponent": "my-secret-store",
+ "serviceComponentBind": [
+ {
+ "metadata": {"name": "daprcomponentBind", "value": "redis-bind"},
+ "name": "statestore",
+ "serviceId": "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis",
+ }
+ ],
"version": "v1",
}
},
@@ -53,6 +60,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secrets.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secrets.py
index 39a7b6e29848..6c0c5bccb8be 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secrets.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_create_or_update_secrets.py
@@ -46,6 +46,13 @@ def main():
],
"scopes": ["container-app-1", "container-app-2"],
"secrets": [{"name": "masterkey", "value": "keyvalue"}],
+ "serviceComponentBind": [
+ {
+ "metadata": {"name": "daprcomponentBind", "value": "redis-bind"},
+ "name": "statestore",
+ "serviceId": "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis",
+ }
+ ],
"version": "v1",
}
},
@@ -53,6 +60,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_Secrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_delete.py
index 2324831379ea..17a8788ba918 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secret_store_component.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secret_store_component.py
index 09054b947037..8b0f7a2a4894 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secret_store_component.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secret_store_component.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_SecretStoreComponent.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secrets.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secrets.py
index 3c46e8ecf802..2e27a0877a13 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secrets.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_get_secrets.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_Secrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Get_Secrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list.py
index a965910cf0cb..57d73a89d76e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list_secrets.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list_secrets.py
index 8f12f74c815f..c68fc713e55c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list_secrets.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_components_list_secrets.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_ListSecrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update.py
index 5d2531451ea8..f6b887f0c4c5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update.py
@@ -77,6 +77,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_CreateorUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_event_trigger.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_event_trigger.py
index e8a7418aa1b0..cf4da67627cb 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_event_trigger.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_event_trigger.py
@@ -75,6 +75,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate_EventTrigger.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_CreateorUpdate_EventTrigger.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_delete.py
index 67bf62912f9e..ed86daa3c6e1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_delete.py
@@ -35,6 +35,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_execution_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_execution_get.py
index 9040eb4aaee7..7876eb2c4f4e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_execution_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_execution_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Execution_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Execution_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_executions_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_executions_get.py
index f374a86cd237..7901a19da6ca 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_executions_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_executions_get.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Executions_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Executions_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get.py
index 489e21ab3c9a..133690324c8f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_secrets.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_secrets.py
index 68992384b2e4..bdf6dfdcbbd9 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_secrets.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_secrets.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_ListSecrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_patch.py
index 654850772d0a..981eda4f5df0 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_patch.py
@@ -75,6 +75,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_start.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_start.py
index b1bd6eb6eb1b..bf74aca4b8b6 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_start.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_start.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Start.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Start.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_execution.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_execution.py
index 34e063182943..70f8f42e3820 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_execution.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_execution.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Execution.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Stop_Execution.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_multiple.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_multiple.py
index ad671acce7fa..21869e7bc83b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_multiple.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_stop_multiple.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Multiple.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Stop_Multiple.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_resource_group.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_resource_group.py
index 974f1948ea56..85491bdbcc1b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_resource_group.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_resource_group.py
@@ -36,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Jobs_ListByResourceGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_subscription.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_subscription.py
index dbf9fb00334f..ec7d1d45e31b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_subscription.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/jobs_list_by_subscription.py
@@ -34,6 +34,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Jobs_ListBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_create_or_update.py
index 59cf78f978dc..a90cc5af9875 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_create_or_update.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_delete.py
index 3f20a343dbe5..55e9390f50ac 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_get.py
index d9b1fd94cdc5..19f2050386c0 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificate_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_list_by_managed_environment.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_list_by_managed_environment.py
index 05a25fd05c2c..d22d4d327694 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_list_by_managed_environment.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_list_by_managed_environment.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_ListByManagedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_patch.py
index 5653b6bcde0a..34a8daa30a81 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_certificates_patch.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificates_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_get.py
index d5481f13e31e..e5c80f3e7a28 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_list.py
index 8e6dcc86a300..5c3dd9dfdaae 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_diagnostics_list.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentDiagnostics_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_usages_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_usages_list.py
new file mode 100644
index 000000000000..b429a8a904f5
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_usages_list.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python managed_environment_usages_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.managed_environment_usages.list(
+ resource_group_name="examplerg",
+ environment_name="jlaw-demo1",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentUsages_List.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_create_or_update.py
index 46827d450f11..762a60105e80 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_create_or_update.py
@@ -35,6 +35,9 @@ def main():
environment_envelope={
"location": "East US",
"properties": {
+ "appInsightsConfiguration": {
+ "connectionString": "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/"
+ },
"appLogsConfiguration": {"logAnalyticsConfiguration": {"customerId": "string", "sharedKey": "string"}},
"customDomainConfiguration": {
"certificatePassword": "1234",
@@ -42,6 +45,14 @@ def main():
"dnsSuffix": "www.my-name.com",
},
"daprAIConnectionString": "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/",
+ "openTelemetryConfiguration": {
+ "destinationsConfiguration": {
+ "dataDogConfiguration": {"key": "000000000000000000000000", "site": "string"}
+ },
+ "logsConfiguration": {"destinations": ["appInsights"]},
+ "metricsConfiguration": {"destinations": ["dataDog"]},
+ "tracesConfiguration": {"destinations": ["appInsights"]},
+ },
"peerAuthentication": {"mtls": {"enabled": True}},
"vnetConfiguration": {
"infrastructureSubnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1"
@@ -74,6 +85,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_custom_infrastructure_resource_group_create.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_custom_infrastructure_resource_group_create.py
index fd5232fae232..902bb8610dc4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_custom_infrastructure_resource_group_create.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_custom_infrastructure_resource_group_create.py
@@ -74,6 +74,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_delete.py
index ddf5bc40e33b..e7f5ed08f449 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_delete.py
@@ -35,6 +35,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get.py
index e4873afecaa8..419282bc5576 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get_auth_token.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get_auth_token.py
index 56e3171f8129..41ddd1c7674c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get_auth_token.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_get_auth_token.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_GetAuthToken.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_GetAuthToken.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_resource_group.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_resource_group.py
index d0e3555d080e..196b3e7f22b6 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_resource_group.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_resource_group.py
@@ -36,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_subscription.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_subscription.py
index 48105b604bb0..7f2d77337e0c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_subscription.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_by_subscription.py
@@ -34,6 +34,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_workload_profile_states.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_workload_profile_states.py
index 73b67ee3f603..fa5867893e72 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_workload_profile_states.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_list_workload_profile_states.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_patch.py
index 96b6650b2bcd..999541513f7d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_patch.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update.py
index da74a2c75c5d..fc34e60b94b4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_delete.py
index 60a920675098..5d26eafb149f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_delete.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get.py
index 8a534fd74c8d..c1374d73a873 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_list.py
index 27117ddea822..2da2c951aebf 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_list.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/operations_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/operations_list.py
index e04bb66279db..44df2fce3802 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/operations_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/operations_list.py
@@ -34,6 +34,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Operations_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Operations_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_apply.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_apply.py
new file mode 100644
index 000000000000..026fae495f15
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_apply.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python patches_apply.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.patches.begin_apply(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ patch_name="testPatch-25fe4b",
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Apply.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_delete.py
new file mode 100644
index 000000000000..6f873346c16d
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python patches_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.patches.begin_delete(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ patch_name="testPatch-25fe4b",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_get.py
new file mode 100644
index 000000000000..84b5f70ab67a
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_get.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python patches_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.patches.get(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ patch_name="testPatch-25fe4b",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_list_by_builder_resource.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_list_by_builder_resource.py
new file mode 100644
index 000000000000..43d820578713
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_list_by_builder_resource.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python patches_list_by_builder_resource.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.patches.list_by_builder_resource(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_ListByBuilderResource.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_skip_configure.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_skip_configure.py
new file mode 100644
index 000000000000..f33fd0448d2c
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/patches_skip_configure.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python patches_skip_configure.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.patches.begin_skip_configure(
+ resource_group_name="rg",
+ builder_name="testBuilder",
+ patch_name="testPatch-25fe4b",
+ patch_skip_config=True,
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Skip_Configure.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_get.py
index e0780e406120..2e89382bd21d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_get.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Replicas_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_list.py
index 59dae6a808c3..40a22524be1a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_list.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Replicas_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_activate.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_activate.py
index 07aa985c27a9..4c2988b77d11 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_activate.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_activate.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Activate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Activate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_deactivate.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_deactivate.py
index f1c8b953f9b5..4fa76a135908 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_deactivate.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_deactivate.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Deactivate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Deactivate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_get.py
index c9a7dbf05f90..5ba6f5fd8229 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_list.py
index 4df2b7c55692..4afe76c9a0ce 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_list.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_restart.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_restart.py
index 126a3c1a84a3..4d7cf11d1bc5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_restart.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_restart.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Restart.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Restart.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_create_or_update.py
index bcfcea00137e..acb3201e9123 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_create_or_update.py
@@ -59,6 +59,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_delete.py
index c4da8857288c..997201018f57 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_delete.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_get.py
index cb0dd31f2206..fff4742d3b6d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_get.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_list_by_container.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_list_by_container.py
index 6c7178b74834..fe1844096be5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_list_by_container.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/source_controls_list_by_container.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_ListByContainer.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_ListByContainer.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/subscriptions_get_custom_domain_verification_id.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/subscriptions_get_custom_domain_verification_id.py
new file mode 100644
index 000000000000..1dc8327eb1fa
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/subscriptions_get_custom_domain_verification_id.py
@@ -0,0 +1,38 @@
+# 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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python subscriptions_get_custom_domain_verification_id.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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="d27c3573-f76e-4b26-b871-0ccd2203d08c",
+ )
+
+ response = client.get_custom_domain_verification_id()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Subscriptions_GetCustomDomainVerificationId.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/usages_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/usages_list.py
new file mode 100644
index 000000000000..44069624621c
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/usages_list.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.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python usages_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 = ContainerAppsAPIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.usages.list(
+ location="westus",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Usages_List.json
+if __name__ == "__main__":
+ main()