diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json b/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
index 071ce382b183..bd70dfdacd50 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "e5404d3e55f885d2cb8fdbff3fd1a03bcfc6bb4c",
+ "commit": "379a9a730cc84316371106bf4ef8b580b06b229a",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
- "autorest": "3.9.7",
+ "autorest": "3.10.2",
"use": [
- "@autorest/python@6.13.7",
+ "@autorest/python@6.13.16",
"@autorest/modelerfour@4.27.0"
],
- "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.13.7 --use=@autorest/modelerfour@4.27.0 --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.13.16 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --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 5f29dcf6e118..7b2d8496fa0c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_configuration.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_configuration.py
@@ -26,22 +26,29 @@ class ContainerAppsAPIClientConfiguration: # pylint: disable=too-many-instance-
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
+ :param session_pool_name: Name of the session pool. Required.
+ :type session_pool_name: str
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
- :keyword api_version: Api Version. Default value is "2023-11-02-preview". Note that overriding
+ :keyword api_version: Api Version. Default value is "2024-02-02-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""
- def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
- api_version: str = kwargs.pop("api_version", "2023-11-02-preview")
+ def __init__(
+ self, credential: "TokenCredential", session_pool_name: str, subscription_id: str, **kwargs: Any
+ ) -> None:
+ api_version: str = kwargs.pop("api_version", "2024-02-02-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
+ if session_pool_name is None:
+ raise ValueError("Parameter 'session_pool_name' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
self.credential = credential
+ self.session_pool_name = session_pool_name
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
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 36b82db88f46..e7530d03e4ea 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
@@ -32,20 +32,27 @@
ConnectedEnvironmentsStoragesOperations,
ContainerAppsAPIClientOperationsMixin,
ContainerAppsAuthConfigsOperations,
+ ContainerAppsBuildsByContainerAppOperations,
+ ContainerAppsBuildsOperations,
ContainerAppsDiagnosticsOperations,
ContainerAppsOperations,
+ ContainerAppsPatchesOperations,
ContainerAppsRevisionReplicasOperations,
ContainerAppsRevisionsOperations,
+ ContainerAppsSessionPoolsOperations,
ContainerAppsSourceControlsOperations,
DaprComponentResiliencyPoliciesOperations,
DaprComponentsOperations,
DaprSubscriptionsOperations,
DotNetComponentsOperations,
+ FunctionsExtensionOperations,
JavaComponentsOperations,
JobsExecutionsOperations,
JobsOperations,
ManagedCertificatesOperations,
ManagedEnvironmentDiagnosticsOperations,
+ ManagedEnvironmentPrivateEndpointConnectionsOperations,
+ ManagedEnvironmentPrivateLinkResourcesOperations,
ManagedEnvironmentUsagesOperations,
ManagedEnvironmentsDiagnosticsOperations,
ManagedEnvironmentsOperations,
@@ -63,7 +70,9 @@
class ContainerAppsAPIClient(
ContainerAppsAPIClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
- """ContainerAppsAPIClient.
+ """Functions is an extension resource to revisions and the api listed is used to proxy the call
+ from Web RP to the function app's host process, this api is not exposed to users and only Web
+ RP is allowed to invoke functions extension resource.
:ivar app_resiliency: AppResiliencyOperations operations
:vartype app_resiliency: azure.mgmt.appcontainers.operations.AppResiliencyOperations
@@ -106,6 +115,16 @@ class ContainerAppsAPIClient(
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
:vartype container_apps_revision_replicas:
azure.mgmt.appcontainers.operations.ContainerAppsRevisionReplicasOperations
+ :ivar container_apps_builds_by_container_app: ContainerAppsBuildsByContainerAppOperations
+ operations
+ :vartype container_apps_builds_by_container_app:
+ azure.mgmt.appcontainers.operations.ContainerAppsBuildsByContainerAppOperations
+ :ivar container_apps_builds: ContainerAppsBuildsOperations operations
+ :vartype container_apps_builds:
+ azure.mgmt.appcontainers.operations.ContainerAppsBuildsOperations
+ :ivar container_apps_patches: ContainerAppsPatchesOperations operations
+ :vartype container_apps_patches:
+ azure.mgmt.appcontainers.operations.ContainerAppsPatchesOperations
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
:vartype container_apps_diagnostics:
azure.mgmt.appcontainers.operations.ContainerAppsDiagnosticsOperations
@@ -117,8 +136,12 @@ class ContainerAppsAPIClient(
azure.mgmt.appcontainers.operations.ManagedEnvironmentsDiagnosticsOperations
:ivar jobs: JobsOperations operations
:vartype jobs: azure.mgmt.appcontainers.operations.JobsOperations
+ :ivar dot_net_components: DotNetComponentsOperations operations
+ :vartype dot_net_components: azure.mgmt.appcontainers.operations.DotNetComponentsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.appcontainers.operations.Operations
+ :ivar java_components: JavaComponentsOperations operations
+ :vartype java_components: azure.mgmt.appcontainers.operations.JavaComponentsOperations
:ivar jobs_executions: JobsExecutionsOperations operations
:vartype jobs_executions: azure.mgmt.appcontainers.operations.JobsExecutionsOperations
:ivar managed_environments: ManagedEnvironmentsOperations operations
@@ -131,6 +154,14 @@ class ContainerAppsAPIClient(
azure.mgmt.appcontainers.operations.ManagedCertificatesOperations
:ivar namespaces: NamespacesOperations operations
:vartype namespaces: azure.mgmt.appcontainers.operations.NamespacesOperations
+ :ivar managed_environment_private_endpoint_connections:
+ ManagedEnvironmentPrivateEndpointConnectionsOperations operations
+ :vartype managed_environment_private_endpoint_connections:
+ azure.mgmt.appcontainers.operations.ManagedEnvironmentPrivateEndpointConnectionsOperations
+ :ivar managed_environment_private_link_resources:
+ ManagedEnvironmentPrivateLinkResourcesOperations operations
+ :vartype managed_environment_private_link_resources:
+ azure.mgmt.appcontainers.operations.ManagedEnvironmentPrivateLinkResourcesOperations
:ivar dapr_component_resiliency_policies: DaprComponentResiliencyPoliciesOperations operations
:vartype dapr_component_resiliency_policies:
azure.mgmt.appcontainers.operations.DaprComponentResiliencyPoliciesOperations
@@ -149,17 +180,20 @@ class ContainerAppsAPIClient(
:ivar managed_environment_usages: ManagedEnvironmentUsagesOperations operations
:vartype managed_environment_usages:
azure.mgmt.appcontainers.operations.ManagedEnvironmentUsagesOperations
- :ivar java_components: JavaComponentsOperations operations
- :vartype java_components: azure.mgmt.appcontainers.operations.JavaComponentsOperations
- :ivar dot_net_components: DotNetComponentsOperations operations
- :vartype dot_net_components: azure.mgmt.appcontainers.operations.DotNetComponentsOperations
+ :ivar functions_extension: FunctionsExtensionOperations operations
+ :vartype functions_extension: azure.mgmt.appcontainers.operations.FunctionsExtensionOperations
+ :ivar container_apps_session_pools: ContainerAppsSessionPoolsOperations operations
+ :vartype container_apps_session_pools:
+ azure.mgmt.appcontainers.operations.ContainerAppsSessionPoolsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
+ :param session_pool_name: Name of the session pool. Required.
+ :type session_pool_name: str
:param subscription_id: The ID of the target subscription. The value must be an UUID. 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-11-02-preview". Note that overriding
+ :keyword api_version: Api Version. Default value is "2024-02-02-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
@@ -169,12 +203,13 @@ class ContainerAppsAPIClient(
def __init__(
self,
credential: "TokenCredential",
+ session_pool_name: str,
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = ContainerAppsAPIClientConfiguration(
- credential=credential, subscription_id=subscription_id, **kwargs
+ credential=credential, session_pool_name=session_pool_name, subscription_id=subscription_id, **kwargs
)
_policies = kwargs.pop("policies", None)
if _policies is None:
@@ -233,6 +268,15 @@ def __init__(
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.container_apps_builds_by_container_app = ContainerAppsBuildsByContainerAppOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.container_apps_builds = ContainerAppsBuildsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.container_apps_patches = ContainerAppsPatchesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -243,7 +287,11 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.dot_net_components = DotNetComponentsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
+ self.java_components = JavaComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments = ManagedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
@@ -253,6 +301,12 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.managed_environment_private_endpoint_connections = ManagedEnvironmentPrivateEndpointConnectionsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.managed_environment_private_link_resources = ManagedEnvironmentPrivateLinkResourcesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.dapr_component_resiliency_policies = DaprComponentResiliencyPoliciesOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -270,8 +324,10 @@ def __init__(
self.managed_environment_usages = ManagedEnvironmentUsagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.java_components = JavaComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.dot_net_components = DotNetComponentsOperations(
+ self.functions_extension = FunctionsExtensionOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.container_apps_session_pools = ContainerAppsSessionPoolsOperations(
self._client, self._config, self._serialize, self._deserialize
)
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_patch.py
index f99e77fef986..17dbc073e01b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_patch.py
@@ -25,6 +25,7 @@
#
# --------------------------------------------------------------------------
+
# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
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 48b05f9c489c..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.1.0b1"
+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 079bed7fb5be..63bdea019a97 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
@@ -26,22 +26,29 @@ class ContainerAppsAPIClientConfiguration: # pylint: disable=too-many-instance-
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param session_pool_name: Name of the session pool. Required.
+ :type session_pool_name: str
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
- :keyword api_version: Api Version. Default value is "2023-11-02-preview". Note that overriding
+ :keyword api_version: Api Version. Default value is "2024-02-02-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""
- def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
- api_version: str = kwargs.pop("api_version", "2023-11-02-preview")
+ def __init__(
+ self, credential: "AsyncTokenCredential", session_pool_name: str, subscription_id: str, **kwargs: Any
+ ) -> None:
+ api_version: str = kwargs.pop("api_version", "2024-02-02-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
+ if session_pool_name is None:
+ raise ValueError("Parameter 'session_pool_name' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
self.credential = credential
+ self.session_pool_name = session_pool_name
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
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 33a91fe8d5ac..ee49d9a18879 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
@@ -32,20 +32,27 @@
ConnectedEnvironmentsStoragesOperations,
ContainerAppsAPIClientOperationsMixin,
ContainerAppsAuthConfigsOperations,
+ ContainerAppsBuildsByContainerAppOperations,
+ ContainerAppsBuildsOperations,
ContainerAppsDiagnosticsOperations,
ContainerAppsOperations,
+ ContainerAppsPatchesOperations,
ContainerAppsRevisionReplicasOperations,
ContainerAppsRevisionsOperations,
+ ContainerAppsSessionPoolsOperations,
ContainerAppsSourceControlsOperations,
DaprComponentResiliencyPoliciesOperations,
DaprComponentsOperations,
DaprSubscriptionsOperations,
DotNetComponentsOperations,
+ FunctionsExtensionOperations,
JavaComponentsOperations,
JobsExecutionsOperations,
JobsOperations,
ManagedCertificatesOperations,
ManagedEnvironmentDiagnosticsOperations,
+ ManagedEnvironmentPrivateEndpointConnectionsOperations,
+ ManagedEnvironmentPrivateLinkResourcesOperations,
ManagedEnvironmentUsagesOperations,
ManagedEnvironmentsDiagnosticsOperations,
ManagedEnvironmentsOperations,
@@ -63,7 +70,9 @@
class ContainerAppsAPIClient(
ContainerAppsAPIClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
- """ContainerAppsAPIClient.
+ """Functions is an extension resource to revisions and the api listed is used to proxy the call
+ from Web RP to the function app's host process, this api is not exposed to users and only Web
+ RP is allowed to invoke functions extension resource.
:ivar app_resiliency: AppResiliencyOperations operations
:vartype app_resiliency: azure.mgmt.appcontainers.aio.operations.AppResiliencyOperations
@@ -106,6 +115,16 @@ class ContainerAppsAPIClient(
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
:vartype container_apps_revision_replicas:
azure.mgmt.appcontainers.aio.operations.ContainerAppsRevisionReplicasOperations
+ :ivar container_apps_builds_by_container_app: ContainerAppsBuildsByContainerAppOperations
+ operations
+ :vartype container_apps_builds_by_container_app:
+ azure.mgmt.appcontainers.aio.operations.ContainerAppsBuildsByContainerAppOperations
+ :ivar container_apps_builds: ContainerAppsBuildsOperations operations
+ :vartype container_apps_builds:
+ azure.mgmt.appcontainers.aio.operations.ContainerAppsBuildsOperations
+ :ivar container_apps_patches: ContainerAppsPatchesOperations operations
+ :vartype container_apps_patches:
+ azure.mgmt.appcontainers.aio.operations.ContainerAppsPatchesOperations
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
:vartype container_apps_diagnostics:
azure.mgmt.appcontainers.aio.operations.ContainerAppsDiagnosticsOperations
@@ -117,8 +136,12 @@ class ContainerAppsAPIClient(
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsDiagnosticsOperations
:ivar jobs: JobsOperations operations
:vartype jobs: azure.mgmt.appcontainers.aio.operations.JobsOperations
+ :ivar dot_net_components: DotNetComponentsOperations operations
+ :vartype dot_net_components: azure.mgmt.appcontainers.aio.operations.DotNetComponentsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.appcontainers.aio.operations.Operations
+ :ivar java_components: JavaComponentsOperations operations
+ :vartype java_components: azure.mgmt.appcontainers.aio.operations.JavaComponentsOperations
:ivar jobs_executions: JobsExecutionsOperations operations
:vartype jobs_executions: azure.mgmt.appcontainers.aio.operations.JobsExecutionsOperations
:ivar managed_environments: ManagedEnvironmentsOperations operations
@@ -131,6 +154,14 @@ class ContainerAppsAPIClient(
azure.mgmt.appcontainers.aio.operations.ManagedCertificatesOperations
:ivar namespaces: NamespacesOperations operations
:vartype namespaces: azure.mgmt.appcontainers.aio.operations.NamespacesOperations
+ :ivar managed_environment_private_endpoint_connections:
+ ManagedEnvironmentPrivateEndpointConnectionsOperations operations
+ :vartype managed_environment_private_endpoint_connections:
+ azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentPrivateEndpointConnectionsOperations
+ :ivar managed_environment_private_link_resources:
+ ManagedEnvironmentPrivateLinkResourcesOperations operations
+ :vartype managed_environment_private_link_resources:
+ azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentPrivateLinkResourcesOperations
:ivar dapr_component_resiliency_policies: DaprComponentResiliencyPoliciesOperations operations
:vartype dapr_component_resiliency_policies:
azure.mgmt.appcontainers.aio.operations.DaprComponentResiliencyPoliciesOperations
@@ -150,17 +181,21 @@ class ContainerAppsAPIClient(
:ivar managed_environment_usages: ManagedEnvironmentUsagesOperations operations
:vartype managed_environment_usages:
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentUsagesOperations
- :ivar java_components: JavaComponentsOperations operations
- :vartype java_components: azure.mgmt.appcontainers.aio.operations.JavaComponentsOperations
- :ivar dot_net_components: DotNetComponentsOperations operations
- :vartype dot_net_components: azure.mgmt.appcontainers.aio.operations.DotNetComponentsOperations
+ :ivar functions_extension: FunctionsExtensionOperations operations
+ :vartype functions_extension:
+ azure.mgmt.appcontainers.aio.operations.FunctionsExtensionOperations
+ :ivar container_apps_session_pools: ContainerAppsSessionPoolsOperations operations
+ :vartype container_apps_session_pools:
+ azure.mgmt.appcontainers.aio.operations.ContainerAppsSessionPoolsOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param session_pool_name: Name of the session pool. Required.
+ :type session_pool_name: str
:param subscription_id: The ID of the target subscription. The value must be an UUID. 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-11-02-preview". Note that overriding
+ :keyword api_version: Api Version. Default value is "2024-02-02-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
@@ -170,12 +205,13 @@ class ContainerAppsAPIClient(
def __init__(
self,
credential: "AsyncTokenCredential",
+ session_pool_name: str,
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = ContainerAppsAPIClientConfiguration(
- credential=credential, subscription_id=subscription_id, **kwargs
+ credential=credential, session_pool_name=session_pool_name, subscription_id=subscription_id, **kwargs
)
_policies = kwargs.pop("policies", None)
if _policies is None:
@@ -234,6 +270,15 @@ def __init__(
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.container_apps_builds_by_container_app = ContainerAppsBuildsByContainerAppOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.container_apps_builds = ContainerAppsBuildsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.container_apps_patches = ContainerAppsPatchesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -244,7 +289,11 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.dot_net_components = DotNetComponentsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
+ self.java_components = JavaComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_environments = ManagedEnvironmentsOperations(
self._client, self._config, self._serialize, self._deserialize
@@ -254,6 +303,12 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.managed_environment_private_endpoint_connections = ManagedEnvironmentPrivateEndpointConnectionsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.managed_environment_private_link_resources = ManagedEnvironmentPrivateLinkResourcesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.dapr_component_resiliency_policies = DaprComponentResiliencyPoliciesOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -271,8 +326,10 @@ def __init__(
self.managed_environment_usages = ManagedEnvironmentUsagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.java_components = JavaComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.dot_net_components = DotNetComponentsOperations(
+ self.functions_extension = FunctionsExtensionOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
+ self.container_apps_session_pools = ContainerAppsSessionPoolsOperations(
self._client, self._config, self._serialize, self._deserialize
)
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_patch.py
index f99e77fef986..17dbc073e01b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_patch.py
@@ -25,6 +25,7 @@
#
# --------------------------------------------------------------------------
+
# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
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 27819202ef8e..388766755e05 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
@@ -21,17 +21,26 @@
from ._container_apps_operations import ContainerAppsOperations
from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations
from ._container_apps_revision_replicas_operations import ContainerAppsRevisionReplicasOperations
+from ._container_apps_builds_by_container_app_operations import ContainerAppsBuildsByContainerAppOperations
+from ._container_apps_builds_operations import ContainerAppsBuildsOperations
+from ._container_apps_patches_operations import ContainerAppsPatchesOperations
from ._container_apps_diagnostics_operations import ContainerAppsDiagnosticsOperations
from ._managed_environment_diagnostics_operations import ManagedEnvironmentDiagnosticsOperations
from ._managed_environments_diagnostics_operations import ManagedEnvironmentsDiagnosticsOperations
from ._jobs_operations import JobsOperations
+from ._dot_net_components_operations import DotNetComponentsOperations
from ._operations import Operations
+from ._java_components_operations import JavaComponentsOperations
from ._jobs_executions_operations import JobsExecutionsOperations
from ._container_apps_api_client_operations import ContainerAppsAPIClientOperationsMixin
from ._managed_environments_operations import ManagedEnvironmentsOperations
from ._certificates_operations import CertificatesOperations
from ._managed_certificates_operations import ManagedCertificatesOperations
from ._namespaces_operations import NamespacesOperations
+from ._managed_environment_private_endpoint_connections_operations import (
+ ManagedEnvironmentPrivateEndpointConnectionsOperations,
+)
+from ._managed_environment_private_link_resources_operations import ManagedEnvironmentPrivateLinkResourcesOperations
from ._dapr_component_resiliency_policies_operations import DaprComponentResiliencyPoliciesOperations
from ._dapr_components_operations import DaprComponentsOperations
from ._dapr_subscriptions_operations import DaprSubscriptionsOperations
@@ -39,8 +48,8 @@
from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations
from ._usages_operations import UsagesOperations
from ._managed_environment_usages_operations import ManagedEnvironmentUsagesOperations
-from ._java_components_operations import JavaComponentsOperations
-from ._dot_net_components_operations import DotNetComponentsOperations
+from ._functions_extension_operations import FunctionsExtensionOperations
+from ._container_apps_session_pools_operations import ContainerAppsSessionPoolsOperations
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
@@ -62,17 +71,24 @@
"ContainerAppsOperations",
"ContainerAppsRevisionsOperations",
"ContainerAppsRevisionReplicasOperations",
+ "ContainerAppsBuildsByContainerAppOperations",
+ "ContainerAppsBuildsOperations",
+ "ContainerAppsPatchesOperations",
"ContainerAppsDiagnosticsOperations",
"ManagedEnvironmentDiagnosticsOperations",
"ManagedEnvironmentsDiagnosticsOperations",
"JobsOperations",
+ "DotNetComponentsOperations",
"Operations",
+ "JavaComponentsOperations",
"JobsExecutionsOperations",
"ContainerAppsAPIClientOperationsMixin",
"ManagedEnvironmentsOperations",
"CertificatesOperations",
"ManagedCertificatesOperations",
"NamespacesOperations",
+ "ManagedEnvironmentPrivateEndpointConnectionsOperations",
+ "ManagedEnvironmentPrivateLinkResourcesOperations",
"DaprComponentResiliencyPoliciesOperations",
"DaprComponentsOperations",
"DaprSubscriptionsOperations",
@@ -80,8 +96,8 @@
"ContainerAppsSourceControlsOperations",
"UsagesOperations",
"ManagedEnvironmentUsagesOperations",
- "JavaComponentsOperations",
- "DotNetComponentsOperations",
+ "FunctionsExtensionOperations",
+ "ContainerAppsSessionPoolsOperations",
]
__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/_app_resiliency_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_app_resiliency_operations.py
index 6e7c5b2e63bd..c798ff824ba8 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_app_resiliency_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_app_resiliency_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -38,6 +39,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -152,7 +157,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.AppResiliency
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -304,7 +309,7 @@ async def update(
:rtype: ~azure.mgmt.appcontainers.models.AppResiliency
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -380,7 +385,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -438,7 +443,7 @@ async def get(self, resource_group_name: str, app_name: str, name: str, **kwargs
:rtype: ~azure.mgmt.appcontainers.models.AppResiliency
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -504,7 +509,7 @@ def list(self, resource_group_name: str, app_name: str, **kwargs: Any) -> AsyncI
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AppResiliencyCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_available_workload_profiles_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_available_workload_profiles_operations.py
index e6c4bdb1ac4d..c20186dd58fe 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_available_workload_profiles_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_available_workload_profiles_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -30,6 +31,10 @@
from ...operations._available_workload_profiles_operations import build_get_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -73,7 +78,7 @@ def get(self, location: str, **kwargs: Any) -> AsyncIterable["_models.AvailableW
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AvailableWorkloadProfilesCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_billing_meters_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_billing_meters_operations.py
index c4cfa44feb19..5fcb9eb01ae5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_billing_meters_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_billing_meters_operations.py
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -28,6 +29,10 @@
from ...operations._billing_meters_operations import build_get_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +68,7 @@ async def get(self, location: str, **kwargs: Any) -> _models.BillingMeterCollect
:rtype: ~azure.mgmt.appcontainers.models.BillingMeterCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_build_auth_token_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_build_auth_token_operations.py
index 2fb05c7a410f..c290d32b4ca2 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_build_auth_token_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_build_auth_token_operations.py
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -28,6 +29,10 @@
from ...operations._build_auth_token_operations import build_list_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -68,7 +73,7 @@ async def list(
:rtype: ~azure.mgmt.appcontainers.models.BuildToken
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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
index 1caf40d02969..77e7234b4fad 100644
--- 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -41,6 +42,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -79,7 +84,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.BuilderR
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -162,7 +167,7 @@ def list_by_resource_group(
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -239,7 +244,7 @@ async def get(self, resource_group_name: str, builder_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.appcontainers.models.BuilderResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -290,7 +295,7 @@ async def _create_or_update_initial(
builder_envelope: Union[_models.BuilderResource, IO[bytes]],
**kwargs: Any
) -> _models.BuilderResource:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -490,7 +495,7 @@ async def _update_initial(
builder_envelope: Union[_models.BuilderResourceUpdate, IO[bytes]],
**kwargs: Any
) -> Optional[_models.BuilderResource]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -682,7 +687,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, builder_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_by_builder_resource_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_by_builder_resource_operations.py
index ae9dcaa12757..e86e85a648d0 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_by_builder_resource_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_builds_by_builder_resource_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -30,6 +31,10 @@
from ...operations._builds_by_builder_resource_operations import build_list_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -74,7 +79,7 @@ def list(
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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
index 7ad0aa009496..d1462fb11af9 100644
--- 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
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, cast, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,6 +32,10 @@
from ...operations._builds_operations import build_create_or_update_request, build_delete_request, build_get_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -71,7 +76,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.BuildResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -124,7 +129,7 @@ async def _create_or_update_initial(
build_envelope: Union[_models.BuildResource, IO[bytes]],
**kwargs: Any
) -> _models.BuildResource:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -331,7 +336,7 @@ def get_long_running_output(pipeline_response):
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_certificates_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_certificates_operations.py
index 65ea9ecb3f08..143e8345b5f3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_certificates_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_certificates_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -38,6 +39,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -304,7 +309,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -383,7 +388,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -515,7 +520,7 @@ async def update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_certificates_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_certificates_operations.py
index 55f2628d5fd2..fa25bf1ded71 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_certificates_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_certificates_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -38,6 +39,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -304,7 +309,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -383,7 +388,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -515,7 +520,7 @@ async def update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_dapr_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_dapr_components_operations.py
index 811b77b37720..c8994c4abf6c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_dapr_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_dapr_components_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -38,6 +39,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -304,7 +309,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -380,7 +385,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -440,7 +445,7 @@ async def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.DaprSecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_operations.py
index c10450558429..439e63cd0011 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,6 +43,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -83,7 +88,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Connecte
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectedEnvironmentCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -167,7 +172,7 @@ def list_by_resource_group(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectedEnvironmentCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -246,7 +251,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -297,7 +302,7 @@ async def _create_or_update_initial(
environment_envelope: Union[_models.ConnectedEnvironment, IO[bytes]],
**kwargs: Any
) -> _models.ConnectedEnvironment:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -491,7 +496,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, connected_environment_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -610,7 +615,7 @@ async def update(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -740,7 +745,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.appcontainers.models.CheckNameAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_storages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_storages_operations.py
index adb4dbd26349..c55165f7f028 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_storages_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_connected_environments_storages_operations.py
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -34,6 +35,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -74,7 +79,7 @@ async def list(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStoragesCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -137,7 +142,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -274,7 +279,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -350,7 +355,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 d7aa8aec4ac6..5c95d692c4b2 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
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,11 +32,16 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
class ContainerAppsAPIClientOperationsMixin(ContainerAppsAPIClientMixinABC):
+
@distributed_trace_async
async def job_execution(
self, resource_group_name: str, job_name: str, job_execution_name: str, **kwargs: Any
@@ -55,7 +61,7 @@ async def job_execution(
:rtype: ~azure.mgmt.appcontainers.models.JobExecution
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -108,7 +114,7 @@ async def get_custom_domain_verification_id(self, **kwargs: Any) -> str:
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_auth_configs_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_auth_configs_operations.py
index 8f13f8bbeac3..1966acd3f90a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_auth_configs_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_auth_configs_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -37,6 +38,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -83,7 +88,7 @@ def list_by_container_app(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AuthConfigCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -167,7 +172,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.AuthConfig
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -303,7 +308,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.AuthConfig
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -379,7 +384,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_builds_by_container_app_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_builds_by_container_app_operations.py
new file mode 100644
index 000000000000..6ded8ae3633d
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_builds_by_container_app_operations.py
@@ -0,0 +1,147 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, 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._container_apps_builds_by_container_app_operations import build_list_request
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ContainerAppsBuildsByContainerAppOperations: # pylint: disable=name-too-long
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`container_apps_builds_by_container_app` 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, container_app_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.ContainerAppsBuildResource"]:
+ """List Container Apps Build resources by Container App.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Build is associated. Required.
+ :type container_app_name: str
+ :return: An iterator like instance of either ContainerAppsBuildResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.ContainerAppsBuildResource]
+ :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.ContainerAppsBuildCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ container_app_name=container_app_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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("ContainerAppsBuildCollection", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_builds_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_builds_operations.py
new file mode 100644
index 000000000000..e93f7d61883e
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_builds_operations.py
@@ -0,0 +1,228 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Optional, Type, 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._container_apps_builds_operations import build_delete_request, build_get_request
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ContainerAppsBuildsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`container_apps_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_async
+ async def get(
+ self, resource_group_name: str, container_app_name: str, build_name: str, **kwargs: Any
+ ) -> _models.ContainerAppsBuildResource:
+ """Get a Container Apps Build resource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Build is associated. Required.
+ :type container_app_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :return: ContainerAppsBuildResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.ContainerAppsBuildResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.ContainerAppsBuildResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("ContainerAppsBuildResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, container_app_name: str, build_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ container_app_name=container_app_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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 [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, 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) # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_group_name: str, container_app_name: str, build_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Delete a Container Apps Build resource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Build is associated. Required.
+ :type container_app_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_diagnostics_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_diagnostics_operations.py
index b57a2ea40dd9..6b1e7fa79c66 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_diagnostics_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_diagnostics_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar, cast
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -37,6 +38,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +89,7 @@ def list_detectors(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DiagnosticsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ async def get_detector(
:rtype: ~azure.mgmt.appcontainers.models.Diagnostics
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -238,7 +243,7 @@ def list_revisions(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RevisionCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -323,7 +328,7 @@ async def get_revision(
:rtype: ~azure.mgmt.appcontainers.models.Revision
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -383,11 +388,14 @@ async def get_root(self, resource_group_name: str, container_app_name: str, **kw
:rtype: ~azure.mgmt.appcontainers.models.ContainerApp
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ 404: cast(
+ Type[HttpResponseError],
+ lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_operations.py
index 7cc1056bca9f..589698aaea52 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -46,6 +47,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +90,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Containe
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -167,7 +172,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -246,11 +251,14 @@ async def get(self, resource_group_name: str, container_app_name: str, **kwargs:
:rtype: ~azure.mgmt.appcontainers.models.ContainerApp
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ 404: cast(
+ Type[HttpResponseError],
+ lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -297,7 +305,7 @@ async def _create_or_update_initial(
container_app_envelope: Union[_models.ContainerApp, IO[bytes]],
**kwargs: Any
) -> _models.ContainerApp:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -494,7 +502,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, container_app_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -603,7 +611,7 @@ async def _update_initial(
container_app_envelope: Union[_models.ContainerApp, IO[bytes]],
**kwargs: Any
) -> Optional[_models.ContainerApp]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -815,7 +823,7 @@ async def list_custom_host_name_analysis(
:rtype: ~azure.mgmt.appcontainers.models.CustomHostnameAnalysisResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -877,7 +885,7 @@ async def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.SecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -938,11 +946,14 @@ async def get_auth_token(
:rtype: ~azure.mgmt.appcontainers.models.ContainerAppAuthToken
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ 404: cast(
+ Type[HttpResponseError],
+ lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -985,7 +996,7 @@ async def get_auth_token(
async def _start_initial(
self, resource_group_name: str, container_app_name: str, **kwargs: Any
) -> Optional[_models.ContainerApp]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1101,7 +1112,7 @@ def get_long_running_output(pipeline_response):
async def _stop_initial(
self, resource_group_name: str, container_app_name: str, **kwargs: Any
) -> Optional[_models.ContainerApp]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_patches_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_patches_operations.py
new file mode 100644
index 000000000000..5991b31cfca5
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_patches_operations.py
@@ -0,0 +1,647 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, 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._container_apps_patches_operations import (
+ build_apply_request,
+ build_delete_request,
+ build_get_request,
+ build_list_by_container_app_request,
+ build_skip_configure_request,
+)
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ContainerAppsPatchesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`container_apps_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
+ def list_by_container_app(
+ self, resource_group_name: str, container_app_name: str, filter: Optional[str] = None, **kwargs: Any
+ ) -> AsyncIterable["_models.ContainerAppsPatchResource"]:
+ """List Container Apps Patch resources by ContainerApp.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param filter: The filter to apply on the operation. For example,
+ $filter=properties/patchApplyStatus eq 'Succeeded'. Default value is None.
+ :type filter: str
+ :return: An iterator like instance of either ContainerAppsPatchResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.ContainerAppsPatchResource]
+ :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.PatchCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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_container_app_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ subscription_id=self._config.subscription_id,
+ filter=filter,
+ api_version=api_version,
+ 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("PatchCollection", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ @distributed_trace_async
+ async def get(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> _models.ContainerAppsPatchResource:
+ """Get details for specific Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :return: ContainerAppsPatchResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.ContainerAppsPatchResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.ContainerAppsPatchResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("ContainerAppsPatchResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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 [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, 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) # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Delete specific Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ async def _skip_configure_initial( # pylint: disable=inconsistent-return-statements
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: Union[_models.PatchSkipConfig, IO[bytes]],
+ **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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[None] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(patch_skip_config, (IOBase, bytes)):
+ _content = patch_skip_config
+ else:
+ _json = self._serialize.body(patch_skip_config, "PatchSkipConfig")
+
+ _request = build_skip_configure_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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 [202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers) # type: ignore
+
+ @overload
+ async def begin_skip_configure(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: _models.PatchSkipConfig,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Configure the Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_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: ~azure.mgmt.appcontainers.models.PatchSkipConfig
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_skip_configure(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Configure the Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_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: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_skip_configure(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: Union[_models.PatchSkipConfig, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Configure the Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_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. Is either a PatchSkipConfig
+ type or a IO[bytes] type. Required.
+ :type patch_skip_config: ~azure.mgmt.appcontainers.models.PatchSkipConfig or IO[bytes]
+ :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: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ 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,
+ container_app_name=container_app_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ async def _apply_initial(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> Optional[_models.ContainerAppsPatchResource]:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.ContainerAppsPatchResource]] = kwargs.pop("cls", None)
+
+ _request = build_apply_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("ContainerAppsPatchResource", pipeline_response)
+
+ if response.status_code == 202:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def begin_apply(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[_models.ContainerAppsPatchResource]:
+ """Apply a Container Apps Patch resource 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :return: An instance of AsyncLROPoller that returns either ContainerAppsPatchResource or the
+ result of cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.ContainerAppsPatchResource]
+ :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.ContainerAppsPatchResource] = 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,
+ container_app_name=container_app_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("ContainerAppsPatchResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod,
+ AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs),
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.ContainerAppsPatchResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.ContainerAppsPatchResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revision_replicas_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revision_replicas_operations.py
index dfb01b703978..06c1b34ad446 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revision_replicas_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revision_replicas_operations.py
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,6 +32,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -75,7 +80,7 @@ async def get_replica(
:rtype: ~azure.mgmt.appcontainers.models.Replica
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -140,7 +145,7 @@ async def list_replicas(
:rtype: ~azure.mgmt.appcontainers.models.ReplicaCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revisions_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revisions_operations.py
index ef844779c080..7d7fde294212 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revisions_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_revisions_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -37,6 +38,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +90,7 @@ def list_revisions(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RevisionCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -170,7 +175,7 @@ async def get_revision(
:rtype: ~azure.mgmt.appcontainers.models.Revision
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -234,7 +239,7 @@ async def activate_revision( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -294,7 +299,7 @@ async def deactivate_revision( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -354,7 +359,7 @@ async def restart_revision( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_session_pools_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_session_pools_operations.py
new file mode 100644
index 000000000000..848ed93e2473
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_session_pools_operations.py
@@ -0,0 +1,766 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, 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._container_apps_session_pools_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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ContainerAppsSessionPoolsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`container_apps_session_pools` 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.SessionPool"]:
+ """Get the session pools in a given subscription.
+
+ Get the session pools in a given subscription.
+
+ :return: An iterator like instance of either SessionPool or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPoolCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("SessionPoolCollection", 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)
+
+ @distributed_trace
+ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncIterable["_models.SessionPool"]:
+ """Get the session pools in a given resource group of a subscription.
+
+ Get the session pools in a given resource group of a subscription.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :return: An iterator like instance of either SessionPool or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPoolCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("SessionPoolCollection", 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)
+
+ @distributed_trace_async
+ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.SessionPool:
+ """Get the properties of a session pool.
+
+ Get the properties of a session pool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :return: SessionPool or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.SessionPool
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.SessionPool] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ 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("SessionPool", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _create_or_update_initial(
+ self, resource_group_name: str, session_pool_envelope: Union[_models.SessionPool, IO[bytes]], **kwargs: Any
+ ) -> _models.SessionPool:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.SessionPool] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(session_pool_envelope, (IOBase, bytes)):
+ _content = session_pool_envelope
+ else:
+ _json = self._serialize.body(session_pool_envelope, "SessionPool")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize("SessionPool", pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize("SessionPool", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: _models.SessionPool,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.SessionPool]:
+ """Create or update a session pool.
+
+ Create or update a session pool with the given properties.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPool
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.SessionPool]:
+ """Create or update a session pool.
+
+ Create or update a session pool with the given properties.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self, resource_group_name: str, session_pool_envelope: Union[_models.SessionPool, IO[bytes]], **kwargs: Any
+ ) -> AsyncLROPoller[_models.SessionPool]:
+ """Create or update a session pool.
+
+ Create or update a session pool with the given properties.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Is either a SessionPool
+ type or a IO[bytes] type. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPool or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPool] = 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,
+ session_pool_envelope=session_pool_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("SessionPool", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod,
+ AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs),
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.SessionPool].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.SessionPool](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _update_initial(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: Union[_models.SessionPoolUpdatableProperties, IO[bytes]],
+ **kwargs: Any
+ ) -> Optional[_models.SessionPool]:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.SessionPool]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(session_pool_envelope, (IOBase, bytes)):
+ _content = session_pool_envelope
+ else:
+ _json = self._serialize.body(session_pool_envelope, "SessionPoolUpdatableProperties")
+
+ _request = build_update_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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("SessionPool", 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) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: _models.SessionPoolUpdatableProperties,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.SessionPool]:
+ """Update properties of a session pool.
+
+ Patches a session pool using JSON merge patch.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPoolUpdatableProperties
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.SessionPool]:
+ """Update properties of a session pool.
+
+ Patches a session pool using JSON merge patch.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: Union[_models.SessionPoolUpdatableProperties, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.SessionPool]:
+ """Update properties of a session pool.
+
+ Patches a session pool using JSON merge patch.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Is either a
+ SessionPoolUpdatableProperties type or a IO[bytes] type. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPoolUpdatableProperties or
+ IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPool] = 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,
+ session_pool_envelope=session_pool_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("SessionPool", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod,
+ AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs),
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.SessionPool].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.SessionPool](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ 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 [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) # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLROPoller[None]:
+ """Delete a session pool.
+
+ Delete the session pool with the given name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial( # type: ignore
+ resource_group_name=resource_group_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_source_controls_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_source_controls_operations.py
index f478e444bdc1..83023bc68ac4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_source_controls_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_container_apps_source_controls_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -39,6 +40,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -85,7 +90,7 @@ def list_by_container_app(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -169,7 +174,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -222,7 +227,7 @@ async def _create_or_update_initial(
source_control_envelope: Union[_models.SourceControl, IO[bytes]],
**kwargs: Any
) -> _models.SourceControl:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -429,7 +434,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, container_app_name: str, source_control_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_component_resiliency_policies_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_component_resiliency_policies_operations.py
index 94f079c80704..988a515e1dc2 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_component_resiliency_policies_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_component_resiliency_policies_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -37,6 +38,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -87,7 +92,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprComponentResiliencyPoliciesCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -174,7 +179,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponentResiliencyPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -325,7 +330,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponentResiliencyPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -408,7 +413,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_components_operations.py
index e083a4e5b17b..d3bd88bb500f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_components_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -38,6 +39,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -304,7 +309,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -380,7 +385,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -440,7 +445,7 @@ async def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.DaprSecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_subscriptions_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_subscriptions_operations.py
index 54b4c58c6440..3e81c203e232 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_subscriptions_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dapr_subscriptions_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -37,6 +38,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +89,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprSubscriptionsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprSubscription
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -305,7 +310,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprSubscription
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -385,7 +390,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dot_net_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dot_net_components_operations.py
index a2794217eb51..9c3702636cff 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dot_net_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_dot_net_components_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -40,6 +41,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -87,7 +92,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DotNetComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -171,7 +176,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.DotNetComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -224,7 +229,7 @@ async def _create_or_update_initial(
dot_net_component_envelope: Union[_models.DotNetComponent, IO[bytes]],
**kwargs: Any
) -> _models.DotNetComponent:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -437,7 +442,7 @@ async def _update_initial(
dot_net_component_envelope: Union[_models.DotNetComponent, IO[bytes]],
**kwargs: Any
) -> Optional[_models.DotNetComponent]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -644,7 +649,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_functions_extension_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_functions_extension_operations.py
new file mode 100644
index 000000000000..902c99de37a5
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_functions_extension_operations.py
@@ -0,0 +1,129 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
+
+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_async import distributed_trace_async
+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._functions_extension_operations import build_invoke_functions_host_request
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class FunctionsExtensionOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.aio.ContainerAppsAPIClient`'s
+ :attr:`functions_extension` 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 invoke_functions_host(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ revision_name: str,
+ function_app_name: str,
+ **kwargs: Any
+ ) -> str:
+ """Proxies a Functions host call to the function app backed by the container app.
+
+ Proxies a Functions host call to the function app backed by the container app.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App. Required.
+ :type container_app_name: str
+ :param revision_name: Name of the Container App Revision, the parent resource. Required.
+ :type revision_name: str
+ :param function_app_name: Name of the Function App, the extension resource. Required.
+ :type function_app_name: str
+ :return: str or the result of cls(response)
+ :rtype: str
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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_invoke_functions_host_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ revision_name=revision_name,
+ function_app_name=function_app_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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("str", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_java_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_java_components_operations.py
index 3c1d14fee1e5..6d2e06c823d5 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_java_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_java_components_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -40,6 +41,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -86,7 +91,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JavaComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -170,7 +175,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.JavaComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -223,7 +228,7 @@ async def _create_or_update_initial(
java_component_envelope: Union[_models.JavaComponent, IO[bytes]],
**kwargs: Any
) -> _models.JavaComponent:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -436,7 +441,7 @@ async def _update_initial(
java_component_envelope: Union[_models.JavaComponent, IO[bytes]],
**kwargs: Any
) -> Optional[_models.JavaComponent]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -643,7 +648,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_executions_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_executions_operations.py
index 772caa7189f7..09320fff036c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_executions_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_executions_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -30,6 +31,10 @@
from ...operations._jobs_executions_operations import build_list_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -78,7 +83,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerAppJobExecutions] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_operations.py
index 22276b34a13d..80ff25e361fe 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_jobs_operations.py
@@ -7,7 +7,8 @@
# 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, Literal, Optional, TypeVar, Union, cast, overload
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -48,6 +49,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -88,7 +93,7 @@ async def list_detectors(
:rtype: ~azure.mgmt.appcontainers.models.DiagnosticsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +156,7 @@ async def get_detector(
:rtype: ~azure.mgmt.appcontainers.models.Diagnostics
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -211,7 +216,7 @@ async def proxy_get(self, resource_group_name: str, job_name: str, **kwargs: Any
:rtype: ~azure.mgmt.appcontainers.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -273,7 +278,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Job"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -355,7 +360,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -434,7 +439,7 @@ async def get(self, resource_group_name: str, job_name: str, **kwargs: Any) -> _
:rtype: ~azure.mgmt.appcontainers.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -481,7 +486,7 @@ async def get(self, resource_group_name: str, job_name: str, **kwargs: Any) -> _
async def _create_or_update_initial(
self, resource_group_name: str, job_name: str, job_envelope: Union[_models.Job, IO[bytes]], **kwargs: Any
) -> _models.Job:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -671,7 +676,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, job_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -778,7 +783,7 @@ async def _update_initial(
job_envelope: Union[_models.JobPatchProperties, IO[bytes]],
**kwargs: Any
) -> Optional[_models.Job]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -975,7 +980,7 @@ async def _start_initial(
template: Optional[Union[_models.JobExecutionTemplate, IO[bytes]]] = None,
**kwargs: Any
) -> Optional[_models.JobExecutionBase]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1176,7 +1181,7 @@ def get_long_running_output(pipeline_response):
async def _stop_execution_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, job_name: str, job_execution_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1285,7 +1290,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _stop_multiple_executions_initial(
self, resource_group_name: str, job_name: str, **kwargs: Any
) -> Optional[_models.ContainerAppJobExecutions]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1416,7 +1421,7 @@ async def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.JobSecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_certificates_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_certificates_operations.py
index 3b252ae030d2..fc24fd996366 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_certificates_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_certificates_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -40,6 +41,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -82,7 +87,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.ManagedCertificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -135,12 +140,15 @@ async def _create_or_update_initial(
managed_certificate_envelope: Optional[Union[_models.ManagedCertificate, IO[bytes]]] = None,
**kwargs: Any
) -> _models.ManagedCertificate:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 400: lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat),
+ 400: cast(
+ Type[HttpResponseError],
+ lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -366,7 +374,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -501,7 +509,7 @@ async def update(
:rtype: ~azure.mgmt.appcontainers.models.ManagedCertificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -582,7 +590,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ManagedCertificateCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_diagnostics_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_diagnostics_operations.py
index 7a7bc78871dc..137eb6e85c9f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_diagnostics_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_diagnostics_operations.py
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,6 +32,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -71,7 +76,7 @@ async def list_detectors(
:rtype: ~azure.mgmt.appcontainers.models.DiagnosticsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -134,7 +139,7 @@ async def get_detector(
:rtype: ~azure.mgmt.appcontainers.models.Diagnostics
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_private_endpoint_connections_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_private_endpoint_connections_operations.py
new file mode 100644
index 000000000000..6be851fa9548
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_private_endpoint_connections_operations.py
@@ -0,0 +1,551 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, 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._managed_environment_private_endpoint_connections_operations import (
+ build_create_or_update_request,
+ build_delete_request,
+ build_get_request,
+ build_list_request,
+)
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ManagedEnvironmentPrivateEndpointConnectionsOperations: # pylint: disable=name-too-long
+ """
+ .. 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_private_endpoint_connections` 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.PrivateEndpointConnection"]:
+ """List private endpoint connections for a given managed environment.
+
+ List private endpoint connections for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :return: An iterator like instance of either PrivateEndpointConnection or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :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.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("PrivateEndpointConnectionListResult", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ @distributed_trace_async
+ async def get(
+ self, resource_group_name: str, environment_name: str, private_endpoint_connection_name: str, **kwargs: Any
+ ) -> _models.PrivateEndpointConnection:
+ """Get a private endpoint connection for a given managed environment.
+
+ Get a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :return: PrivateEndpointConnection or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.PrivateEndpointConnection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.PrivateEndpointConnection] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: Union[_models.PrivateEndpointConnection, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.PrivateEndpointConnection:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.PrivateEndpointConnection] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(private_endpoint_connection_envelope, (IOBase, bytes)):
+ _content = private_endpoint_connection_envelope
+ else:
+ _json = self._serialize.body(private_endpoint_connection_envelope, "PrivateEndpointConnection")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: _models.PrivateEndpointConnection,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.PrivateEndpointConnection]:
+ """Update the state of a private endpoint connection for a given managed environment.
+
+ Update the state of a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :param private_endpoint_connection_envelope: The resource of private endpoint and its
+ properties. Required.
+ :type private_endpoint_connection_envelope:
+ ~azure.mgmt.appcontainers.models.PrivateEndpointConnection
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the
+ result of cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.PrivateEndpointConnection]:
+ """Update the state of a private endpoint connection for a given managed environment.
+
+ Update the state of a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :param private_endpoint_connection_envelope: The resource of private endpoint and its
+ properties. Required.
+ :type private_endpoint_connection_envelope: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the
+ result of cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: Union[_models.PrivateEndpointConnection, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.PrivateEndpointConnection]:
+ """Update the state of a private endpoint connection for a given managed environment.
+
+ Update the state of a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :param private_endpoint_connection_envelope: The resource of private endpoint and its
+ properties. Is either a PrivateEndpointConnection type or a IO[bytes] type. Required.
+ :type private_endpoint_connection_envelope:
+ ~azure.mgmt.appcontainers.models.PrivateEndpointConnection or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the
+ result of cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :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.PrivateEndpointConnection] = 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,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ private_endpoint_connection_envelope=private_endpoint_connection_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("PrivateEndpointConnection", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.PrivateEndpointConnection].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.PrivateEndpointConnection](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, environment_name: str, private_endpoint_connection_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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 [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, 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) # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_group_name: str, environment_name: str, private_endpoint_connection_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Delete a private endpoint connection for a given managed environment.
+
+ Delete a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_private_link_resources_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_private_link_resources_operations.py
new file mode 100644
index 000000000000..7b76dd4756ec
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environment_private_link_resources_operations.py
@@ -0,0 +1,148 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, 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_private_link_resources_operations import build_list_request
+from .._vendor import ContainerAppsAPIClientMixinABC
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ManagedEnvironmentPrivateLinkResourcesOperations: # pylint: disable=name-too-long
+ """
+ .. 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_private_link_resources` 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.PrivateLinkResource"]:
+ """List private link resources for a given managed environment.
+
+ List private link resources for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :return: An iterator like instance of either PrivateLinkResource or the result of cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.appcontainers.models.PrivateLinkResource]
+ :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.PrivateLinkResourceListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("PrivateLinkResourceListResult", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
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
index bad1c1fbb2c0..bb196768142f 100644
--- 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -30,6 +31,10 @@
from ...operations._managed_environment_usages_operations import build_list_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -72,7 +77,7 @@ def list(self, resource_group_name: str, environment_name: str, **kwargs: Any) -
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_diagnostics_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_diagnostics_operations.py
index 898eb2987a58..d4820ec2c43e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_diagnostics_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_diagnostics_operations.py
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -28,6 +29,10 @@
from ...operations._managed_environments_diagnostics_operations import build_get_root_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -68,7 +73,7 @@ async def get_root(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_operations.py
index 95cc9648f12f..f7fa912ae7b1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,6 +44,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -83,7 +88,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ManagedE
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ManagedEnvironmentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +173,7 @@ def list_by_resource_group(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ManagedEnvironmentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -247,7 +252,7 @@ async def get(self, resource_group_name: str, environment_name: str, **kwargs: A
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -298,7 +303,7 @@ async def _create_or_update_initial(
environment_envelope: Union[_models.ManagedEnvironment, IO[bytes]],
**kwargs: Any
) -> _models.ManagedEnvironment:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -492,7 +497,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, environment_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -595,7 +600,7 @@ async def _update_initial(
environment_envelope: Union[_models.ManagedEnvironment, IO[bytes]],
**kwargs: Any
) -> Optional[_models.ManagedEnvironment]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -801,7 +806,7 @@ async def get_auth_token(
:rtype: ~azure.mgmt.appcontainers.models.EnvironmentAuthToken
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -870,7 +875,7 @@ def list_workload_profile_states(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.WorkloadProfileStatesCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_storages_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_storages_operations.py
index c70d7e6a5626..0666ac174403 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_storages_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_managed_environments_storages_operations.py
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -34,6 +35,10 @@
)
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -74,7 +79,7 @@ async def list(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStoragesCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -137,7 +142,7 @@ async def get(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -273,7 +278,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +354,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_namespaces_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_namespaces_operations.py
index c95740bbf0b1..747eb35cf9fd 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_namespaces_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_namespaces_operations.py
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,6 +30,10 @@
from ...operations._namespaces_operations import build_check_name_availability_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -136,7 +141,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.appcontainers.models.CheckNameAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_operations.py
index 560fc6a10fe1..b5877eedbee1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -30,6 +31,10 @@
from ...operations._operations import build_list_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -68,7 +73,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationDetail"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AvailableOperations] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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
index e882d2283742..6ed8c2b9ce84 100644
--- 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -30,6 +31,10 @@
from ...operations._usages_operations import build_list_request
from .._vendor import ContainerAppsAPIClientMixinABC
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -70,7 +75,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]:
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 d81009d3ad02..18577a59bb10 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
@@ -66,12 +66,19 @@
from ._models_py3 import ContainerAppProbeHttpGet
from ._models_py3 import ContainerAppProbeHttpGetHttpHeadersItem
from ._models_py3 import ContainerAppProbeTcpSocket
+from ._models_py3 import ContainerAppPropertiesPatchingConfiguration
from ._models_py3 import ContainerAppSecret
+from ._models_py3 import ContainerAppsBuildCollection
+from ._models_py3 import ContainerAppsBuildConfiguration
+from ._models_py3 import ContainerAppsBuildResource
+from ._models_py3 import ContainerAppsPatchResource
+from ._models_py3 import ContainerExecutionStatus
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
+from ._models_py3 import CustomContainerTemplate
from ._models_py3 import CustomDomain
from ._models_py3 import CustomDomainConfiguration
from ._models_py3 import CustomHostnameAnalysisResult
@@ -122,6 +129,7 @@
from ._models_py3 import DotNetComponentConfigurationProperty
from ._models_py3 import DotNetComponentServiceBind
from ._models_py3 import DotNetComponentsCollection
+from ._models_py3 import DynamicPoolConfiguration
from ._models_py3 import EncryptionSettings
from ._models_py3 import EnvironmentAuthToken
from ._models_py3 import EnvironmentVar
@@ -129,6 +137,7 @@
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse
+from ._models_py3 import ExecutionStatus
from ._models_py3 import ExtendedLocation
from ._models_py3 import Facebook
from ._models_py3 import ForwardProxy
@@ -145,6 +154,7 @@
from ._models_py3 import HttpSettings
from ._models_py3 import HttpSettingsRoutes
from ._models_py3 import IdentityProviders
+from ._models_py3 import IdentitySettings
from ._models_py3 import Ingress
from ._models_py3 import IngressPortMapping
from ._models_py3 import IngressStickySessions
@@ -152,6 +162,8 @@
from ._models_py3 import IpSecurityRestrictionRule
from ._models_py3 import JavaComponent
from ._models_py3 import JavaComponentConfigurationProperty
+from ._models_py3 import JavaComponentIngress
+from ._models_py3 import JavaComponentProperties
from ._models_py3 import JavaComponentServiceBind
from ._models_py3 import JavaComponentsCollection
from ._models_py3 import Job
@@ -175,6 +187,7 @@
from ._models_py3 import KedaConfiguration
from ._models_py3 import ListUsagesResult
from ._models_py3 import LogAnalyticsConfiguration
+from ._models_py3 import LoggerSetting
from ._models_py3 import Login
from ._models_py3 import LoginRoutes
from ._models_py3 import LoginScopes
@@ -185,6 +198,8 @@
from ._models_py3 import ManagedCertificateProperties
from ._models_py3 import ManagedEnvironment
from ._models_py3 import ManagedEnvironmentPropertiesPeerAuthentication
+from ._models_py3 import ManagedEnvironmentPropertiesPeerTrafficConfiguration
+from ._models_py3 import ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption
from ._models_py3 import ManagedEnvironmentStorage
from ._models_py3 import ManagedEnvironmentStorageProperties
from ._models_py3 import ManagedEnvironmentStoragesCollection
@@ -192,6 +207,7 @@
from ._models_py3 import ManagedServiceIdentity
from ._models_py3 import MetricsConfiguration
from ._models_py3 import Mtls
+from ._models_py3 import NacosComponent
from ._models_py3 import NfsAzureFileProperties
from ._models_py3 import Nonce
from ._models_py3 import OpenIdConnectClientCredential
@@ -202,27 +218,60 @@
from ._models_py3 import OperationDetail
from ._models_py3 import OperationDisplay
from ._models_py3 import OtlpConfiguration
+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 PatchSkipConfig
from ._models_py3 import PreBuildStep
+from ._models_py3 import PrivateEndpoint
+from ._models_py3 import PrivateEndpointConnection
+from ._models_py3 import PrivateEndpointConnectionListResult
+from ._models_py3 import PrivateLinkResource
+from ._models_py3 import PrivateLinkResourceListResult
+from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import ProxyResource
+from ._models_py3 import ProxyResourceAutoGenerated
from ._models_py3 import QueueScaleRule
from ._models_py3 import RegistryCredentials
from ._models_py3 import RegistryInfo
from ._models_py3 import Replica
from ._models_py3 import ReplicaCollection
from ._models_py3 import ReplicaContainer
+from ._models_py3 import ReplicaExecutionStatus
from ._models_py3 import Resource
+from ._models_py3 import ResourceAutoGenerated
from ._models_py3 import Revision
from ._models_py3 import RevisionCollection
+from ._models_py3 import Runtime
+from ._models_py3 import RuntimeDotnet
+from ._models_py3 import RuntimeJava
+from ._models_py3 import RuntimeJavaAgent
+from ._models_py3 import RuntimeJavaAgentLogging
from ._models_py3 import Scale
+from ._models_py3 import ScaleConfiguration
from ._models_py3 import ScaleRule
from ._models_py3 import ScaleRuleAuth
from ._models_py3 import Secret
+from ._models_py3 import SecretAutoGenerated
from ._models_py3 import SecretVolumeItem
from ._models_py3 import SecretsCollection
from ._models_py3 import Service
from ._models_py3 import ServiceBind
+from ._models_py3 import SessionContainer
+from ._models_py3 import SessionContainerResources
+from ._models_py3 import SessionIngress
+from ._models_py3 import SessionNetworkConfiguration
+from ._models_py3 import SessionPool
+from ._models_py3 import SessionPoolCollection
+from ._models_py3 import SessionPoolUpdatableProperties
+from ._models_py3 import SessionRegistryCredentials
from ._models_py3 import SourceControl
from ._models_py3 import SourceControlCollection
+from ._models_py3 import SpringBootAdminComponent
+from ._models_py3 import SpringCloudConfigComponent
+from ._models_py3 import SpringCloudEurekaComponent
from ._models_py3 import SystemData
from ._models_py3 import TcpConnectionPool
from ._models_py3 import TcpRetryPolicy
@@ -263,14 +312,19 @@
from ._container_apps_api_client_enums import ContainerAppContainerRunningState
from ._container_apps_api_client_enums import ContainerAppProvisioningState
from ._container_apps_api_client_enums import ContainerAppReplicaRunningState
+from ._container_apps_api_client_enums import ContainerType
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 DotNetComponentProvisioningState
from ._container_apps_api_client_enums import DotNetComponentType
from ._container_apps_api_client_enums import EnvironmentProvisioningState
+from ._container_apps_api_client_enums import ExecutionType
from ._container_apps_api_client_enums import ExtendedLocationTypes
from ._container_apps_api_client_enums import ForwardProxyConvention
+from ._container_apps_api_client_enums import IdentitySettingsLifeCycle
+from ._container_apps_api_client_enums import ImageType
from ._container_apps_api_client_enums import IngressClientCertificateMode
from ._container_apps_api_client_enums import IngressTargetPortHttpScheme
from ._container_apps_api_client_enums import IngressTransportMethod
@@ -278,13 +332,23 @@
from ._container_apps_api_client_enums import JavaComponentType
from ._container_apps_api_client_enums import JobExecutionRunningState
from ._container_apps_api_client_enums import JobProvisioningState
+from ._container_apps_api_client_enums import Kind
+from ._container_apps_api_client_enums import Level
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 PatchType
+from ._container_apps_api_client_enums import PatchingMode
+from ._container_apps_api_client_enums import PoolManagementType
+from ._container_apps_api_client_enums import PrivateEndpointConnectionProvisioningState
+from ._container_apps_api_client_enums import PrivateEndpointServiceConnectionStatus
from ._container_apps_api_client_enums import RevisionHealthState
from ._container_apps_api_client_enums import RevisionProvisioningState
from ._container_apps_api_client_enums import RevisionRunningState
from ._container_apps_api_client_enums import Scheme
+from ._container_apps_api_client_enums import SessionNetworkStatus
+from ._container_apps_api_client_enums import SessionPoolProvisioningState
from ._container_apps_api_client_enums import SourceControlOperationState
from ._container_apps_api_client_enums import StorageType
from ._container_apps_api_client_enums import TriggerType
@@ -355,12 +419,19 @@
"ContainerAppProbeHttpGet",
"ContainerAppProbeHttpGetHttpHeadersItem",
"ContainerAppProbeTcpSocket",
+ "ContainerAppPropertiesPatchingConfiguration",
"ContainerAppSecret",
+ "ContainerAppsBuildCollection",
+ "ContainerAppsBuildConfiguration",
+ "ContainerAppsBuildResource",
+ "ContainerAppsPatchResource",
+ "ContainerExecutionStatus",
"ContainerRegistry",
"ContainerRegistryWithCustomImage",
"ContainerResources",
"CookieExpiration",
"CorsPolicy",
+ "CustomContainerTemplate",
"CustomDomain",
"CustomDomainConfiguration",
"CustomHostnameAnalysisResult",
@@ -411,6 +482,7 @@
"DotNetComponentConfigurationProperty",
"DotNetComponentServiceBind",
"DotNetComponentsCollection",
+ "DynamicPoolConfiguration",
"EncryptionSettings",
"EnvironmentAuthToken",
"EnvironmentVar",
@@ -418,6 +490,7 @@
"ErrorAdditionalInfo",
"ErrorDetail",
"ErrorResponse",
+ "ExecutionStatus",
"ExtendedLocation",
"Facebook",
"ForwardProxy",
@@ -434,6 +507,7 @@
"HttpSettings",
"HttpSettingsRoutes",
"IdentityProviders",
+ "IdentitySettings",
"Ingress",
"IngressPortMapping",
"IngressStickySessions",
@@ -441,6 +515,8 @@
"IpSecurityRestrictionRule",
"JavaComponent",
"JavaComponentConfigurationProperty",
+ "JavaComponentIngress",
+ "JavaComponentProperties",
"JavaComponentServiceBind",
"JavaComponentsCollection",
"Job",
@@ -464,6 +540,7 @@
"KedaConfiguration",
"ListUsagesResult",
"LogAnalyticsConfiguration",
+ "LoggerSetting",
"Login",
"LoginRoutes",
"LoginScopes",
@@ -474,6 +551,8 @@
"ManagedCertificateProperties",
"ManagedEnvironment",
"ManagedEnvironmentPropertiesPeerAuthentication",
+ "ManagedEnvironmentPropertiesPeerTrafficConfiguration",
+ "ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption",
"ManagedEnvironmentStorage",
"ManagedEnvironmentStorageProperties",
"ManagedEnvironmentStoragesCollection",
@@ -481,6 +560,7 @@
"ManagedServiceIdentity",
"MetricsConfiguration",
"Mtls",
+ "NacosComponent",
"NfsAzureFileProperties",
"Nonce",
"OpenIdConnectClientCredential",
@@ -491,27 +571,60 @@
"OperationDetail",
"OperationDisplay",
"OtlpConfiguration",
+ "PatchCollection",
+ "PatchDetails",
+ "PatchDetailsNewLayer",
+ "PatchDetailsOldLayer",
+ "PatchProperties",
+ "PatchSkipConfig",
"PreBuildStep",
+ "PrivateEndpoint",
+ "PrivateEndpointConnection",
+ "PrivateEndpointConnectionListResult",
+ "PrivateLinkResource",
+ "PrivateLinkResourceListResult",
+ "PrivateLinkServiceConnectionState",
"ProxyResource",
+ "ProxyResourceAutoGenerated",
"QueueScaleRule",
"RegistryCredentials",
"RegistryInfo",
"Replica",
"ReplicaCollection",
"ReplicaContainer",
+ "ReplicaExecutionStatus",
"Resource",
+ "ResourceAutoGenerated",
"Revision",
"RevisionCollection",
+ "Runtime",
+ "RuntimeDotnet",
+ "RuntimeJava",
+ "RuntimeJavaAgent",
+ "RuntimeJavaAgentLogging",
"Scale",
+ "ScaleConfiguration",
"ScaleRule",
"ScaleRuleAuth",
"Secret",
+ "SecretAutoGenerated",
"SecretVolumeItem",
"SecretsCollection",
"Service",
"ServiceBind",
+ "SessionContainer",
+ "SessionContainerResources",
+ "SessionIngress",
+ "SessionNetworkConfiguration",
+ "SessionPool",
+ "SessionPoolCollection",
+ "SessionPoolUpdatableProperties",
+ "SessionRegistryCredentials",
"SourceControl",
"SourceControlCollection",
+ "SpringBootAdminComponent",
+ "SpringCloudConfigComponent",
+ "SpringCloudEurekaComponent",
"SystemData",
"TcpConnectionPool",
"TcpRetryPolicy",
@@ -551,14 +664,19 @@
"ContainerAppContainerRunningState",
"ContainerAppProvisioningState",
"ContainerAppReplicaRunningState",
+ "ContainerType",
"CookieExpirationConvention",
"CreatedByType",
+ "DetectionStatus",
"DnsVerificationTestResult",
"DotNetComponentProvisioningState",
"DotNetComponentType",
"EnvironmentProvisioningState",
+ "ExecutionType",
"ExtendedLocationTypes",
"ForwardProxyConvention",
+ "IdentitySettingsLifeCycle",
+ "ImageType",
"IngressClientCertificateMode",
"IngressTargetPortHttpScheme",
"IngressTransportMethod",
@@ -566,13 +684,23 @@
"JavaComponentType",
"JobExecutionRunningState",
"JobProvisioningState",
+ "Kind",
+ "Level",
"LogLevel",
"ManagedCertificateDomainControlValidation",
"ManagedServiceIdentityType",
+ "PatchApplyStatus",
+ "PatchType",
+ "PatchingMode",
+ "PoolManagementType",
+ "PrivateEndpointConnectionProvisioningState",
+ "PrivateEndpointServiceConnectionStatus",
"RevisionHealthState",
"RevisionProvisioningState",
"RevisionRunningState",
"Scheme",
+ "SessionNetworkStatus",
+ "SessionPoolProvisioningState",
"SourceControlOperationState",
"StorageType",
"TriggerType",
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 76e21fe999be..e3aa2821a701 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
@@ -168,6 +168,13 @@ class ContainerAppReplicaRunningState(str, Enum, metaclass=CaseInsensitiveEnumMe
UNKNOWN = "Unknown"
+class ContainerType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The container type of the sessions."""
+
+ CUSTOM_CONTAINER = "CustomContainer"
+ PYTHON_LTS = "PythonLTS"
+
+
class CookieExpirationConvention(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The convention used when determining the session cookie's expiration."""
@@ -184,6 +191,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."""
@@ -206,7 +221,6 @@ class DotNetComponentType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Type of the .NET Component."""
ASPIRE_DASHBOARD = "AspireDashboard"
- ASPIRE_RESOURCE_SERVER_API = "AspireResourceServerApi"
class EnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -224,6 +238,12 @@ class EnvironmentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta)
UPGRADE_FAILED = "UpgradeFailed"
+class ExecutionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The execution type of the session pool."""
+
+ TIMED = "Timed"
+
+
class ExtendedLocationTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The type of extendedLocation."""
@@ -238,6 +258,26 @@ class ForwardProxyConvention(str, Enum, metaclass=CaseInsensitiveEnumMeta):
CUSTOM = "Custom"
+class IdentitySettingsLifeCycle(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Use to select the lifecycle stages of a Container App during which the Managed Identity should
+ be available.
+ """
+
+ INIT = "Init"
+ MAIN = "Main"
+ NONE = "None"
+ ALL = "All"
+
+
+class ImageType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The type of the image. Set to CloudBuild to let the system manages the image, where user will
+ not be able to update image through image field. Set to ContainerImage for user provided image.
+ """
+
+ CLOUD_BUILD = "CloudBuild"
+ CONTAINER_IMAGE = "ContainerImage"
+
+
class IngressClientCertificateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Client certificate mode for mTLS authentication. Ignore indicates server drops client
certificate on forwarding. Accept indicates server forwards client certificate but does not
@@ -281,6 +321,7 @@ class JavaComponentType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
SPRING_BOOT_ADMIN = "SpringBootAdmin"
SPRING_CLOUD_EUREKA = "SpringCloudEureka"
SPRING_CLOUD_CONFIG = "SpringCloudConfig"
+ NACOS = "Nacos"
class JobExecutionRunningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -305,6 +346,26 @@ class JobProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DELETING = "Deleting"
+class Kind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp
+ is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must
+ validate and persist this value.
+ """
+
+ WORKFLOWAPP = "workflowapp"
+
+
+class Level(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The specified logger's log level."""
+
+ OFF = "off"
+ ERROR = "error"
+ INFO = "info"
+ DEBUG = "debug"
+ TRACE = "trace"
+ WARN = "warn"
+
+
class LogLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default
is info.
@@ -335,6 +396,69 @@ 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 PatchingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Patching mode for the container app. Null or default in this field will be interpreted as
+ Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will
+ require the user to manually apply patches. Disabled mode will stop patch detection and auto
+ patching.
+ """
+
+ AUTOMATIC = "Automatic"
+ MANUAL = "Manual"
+ DISABLED = "Disabled"
+
+
+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 PoolManagementType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The pool management type of the session pool."""
+
+ MANUAL = "Manual"
+ DYNAMIC = "Dynamic"
+
+
+class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The current provisioning state."""
+
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+ WAITING = "Waiting"
+ UPDATING = "Updating"
+ DELETING = "Deleting"
+ PENDING = "Pending"
+
+
+class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """The private endpoint connection status."""
+
+ PENDING = "Pending"
+ APPROVED = "Approved"
+ REJECTED = "Rejected"
+ DISCONNECTED = "Disconnected"
+
+
class RevisionHealthState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Current health State of the revision."""
@@ -371,6 +495,23 @@ class Scheme(str, Enum, metaclass=CaseInsensitiveEnumMeta):
HTTPS = "HTTPS"
+class SessionNetworkStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Network status for the sessions."""
+
+ EGRESS_ENABLED = "EgressEnabled"
+ EGRESS_DISABLED = "EgressDisabled"
+
+
+class SessionPoolProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Provisioning state of the session pool."""
+
+ IN_PROGRESS = "InProgress"
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+ DELETING = "Deleting"
+
+
class SourceControlOperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Current provisioning State of the operation."""
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 e6f107c1bec7..dda7d3bc3356 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
@@ -233,8 +233,8 @@ class Resource(_serialization.Model):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -275,8 +275,8 @@ class ProxyResource(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -294,8 +294,8 @@ class AppResiliency(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -412,8 +412,8 @@ class AuthConfig(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -606,8 +606,8 @@ class AvailableWorkloadProfile(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -1160,6 +1160,10 @@ class BaseContainer(_serialization.Model):
:ivar image: Container image tag.
:vartype image: str
+ :ivar image_type: The type of the image. Set to CloudBuild to let the system manages the image,
+ where user will not be able to update image through image field. Set to ContainerImage for user
+ provided image. Known values are: "CloudBuild" and "ContainerImage".
+ :vartype image_type: str or ~azure.mgmt.appcontainers.models.ImageType
:ivar name: Custom container name.
:vartype name: str
:ivar command: Container start command.
@@ -1176,6 +1180,7 @@ class BaseContainer(_serialization.Model):
_attribute_map = {
"image": {"key": "image", "type": "str"},
+ "image_type": {"key": "imageType", "type": "str"},
"name": {"key": "name", "type": "str"},
"command": {"key": "command", "type": "[str]"},
"args": {"key": "args", "type": "[str]"},
@@ -1188,6 +1193,7 @@ def __init__(
self,
*,
image: Optional[str] = None,
+ image_type: Optional[Union[str, "_models.ImageType"]] = None,
name: Optional[str] = None,
command: Optional[List[str]] = None,
args: Optional[List[str]] = None,
@@ -1199,6 +1205,10 @@ def __init__(
"""
:keyword image: Container image tag.
:paramtype image: str
+ :keyword image_type: The type of the image. Set to CloudBuild to let the system manages the
+ image, where user will not be able to update image through image field. Set to ContainerImage
+ for user provided image. Known values are: "CloudBuild" and "ContainerImage".
+ :paramtype image_type: str or ~azure.mgmt.appcontainers.models.ImageType
:keyword name: Custom container name.
:paramtype name: str
:keyword command: Container start command.
@@ -1214,6 +1224,7 @@ def __init__(
"""
super().__init__(**kwargs)
self.image = image
+ self.image_type = image_type
self.name = name
self.command = command
self.args = args
@@ -1222,7 +1233,68 @@ def __init__(
self.volume_mounts = volume_mounts
-class BillingMeter(ProxyResource):
+class ResourceAutoGenerated(_serialization.Model):
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
+
+ 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}. # pylint: disable=line-too-long
+ :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
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.system_data = None
+
+
+class ProxyResourceAutoGenerated(ResourceAutoGenerated):
+ """The resource model definition for a Azure Resource Manager proxy resource. It will not have
+ tags and a location.
+
+ 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}. # pylint: disable=line-too-long
+ :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
+ """
+
+
+class BillingMeter(ProxyResourceAutoGenerated):
"""Billing meter.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -1500,8 +1572,8 @@ class TrackedResource(Resource):
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -1553,8 +1625,8 @@ class BuilderResource(TrackedResource):
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -1680,8 +1752,8 @@ class BuildResource(ProxyResource): # pylint: disable=too-many-instance-attribu
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -1801,8 +1873,8 @@ class Certificate(TrackedResource):
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -2210,10 +2282,15 @@ class Configuration(_serialization.Model):
:vartype registries: list[~azure.mgmt.appcontainers.models.RegistryCredentials]
:ivar dapr: Dapr configuration for the Container App.
:vartype dapr: ~azure.mgmt.appcontainers.models.Dapr
+ :ivar runtime: App runtime configuration for the Container App.
+ :vartype runtime: ~azure.mgmt.appcontainers.models.Runtime
:ivar max_inactive_revisions: Optional. Max inactive revisions a Container App can have.
:vartype max_inactive_revisions: int
:ivar service: Container App to be a dev Container App Service.
:vartype service: ~azure.mgmt.appcontainers.models.Service
+ :ivar identity_settings: Optional settings for Managed Identities that are assigned to the
+ Container App. If a Managed Identity is not specified here, default settings will be used.
+ :vartype identity_settings: list[~azure.mgmt.appcontainers.models.IdentitySettings]
"""
_attribute_map = {
@@ -2222,8 +2299,10 @@ class Configuration(_serialization.Model):
"ingress": {"key": "ingress", "type": "Ingress"},
"registries": {"key": "registries", "type": "[RegistryCredentials]"},
"dapr": {"key": "dapr", "type": "Dapr"},
+ "runtime": {"key": "runtime", "type": "Runtime"},
"max_inactive_revisions": {"key": "maxInactiveRevisions", "type": "int"},
"service": {"key": "service", "type": "Service"},
+ "identity_settings": {"key": "identitySettings", "type": "[IdentitySettings]"},
}
def __init__(
@@ -2234,8 +2313,10 @@ def __init__(
ingress: Optional["_models.Ingress"] = None,
registries: Optional[List["_models.RegistryCredentials"]] = None,
dapr: Optional["_models.Dapr"] = None,
+ runtime: Optional["_models.Runtime"] = None,
max_inactive_revisions: Optional[int] = None,
service: Optional["_models.Service"] = None,
+ identity_settings: Optional[List["_models.IdentitySettings"]] = None,
**kwargs: Any
) -> None:
"""
@@ -2258,10 +2339,15 @@ def __init__(
:paramtype registries: list[~azure.mgmt.appcontainers.models.RegistryCredentials]
:keyword dapr: Dapr configuration for the Container App.
:paramtype dapr: ~azure.mgmt.appcontainers.models.Dapr
+ :keyword runtime: App runtime configuration for the Container App.
+ :paramtype runtime: ~azure.mgmt.appcontainers.models.Runtime
:keyword max_inactive_revisions: Optional. Max inactive revisions a Container App can have.
:paramtype max_inactive_revisions: int
:keyword service: Container App to be a dev Container App Service.
:paramtype service: ~azure.mgmt.appcontainers.models.Service
+ :keyword identity_settings: Optional settings for Managed Identities that are assigned to the
+ Container App. If a Managed Identity is not specified here, default settings will be used.
+ :paramtype identity_settings: list[~azure.mgmt.appcontainers.models.IdentitySettings]
"""
super().__init__(**kwargs)
self.secrets = secrets
@@ -2269,8 +2355,10 @@ def __init__(
self.ingress = ingress
self.registries = registries
self.dapr = dapr
+ self.runtime = runtime
self.max_inactive_revisions = max_inactive_revisions
self.service = service
+ self.identity_settings = identity_settings
class ConnectedEnvironment(TrackedResource): # pylint: disable=too-many-instance-attributes
@@ -2280,8 +2368,8 @@ class ConnectedEnvironment(TrackedResource): # pylint: disable=too-many-instanc
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -2418,8 +2506,8 @@ class ConnectedEnvironmentStorage(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -2510,6 +2598,10 @@ class Container(BaseContainer):
:ivar image: Container image tag.
:vartype image: str
+ :ivar image_type: The type of the image. Set to CloudBuild to let the system manages the image,
+ where user will not be able to update image through image field. Set to ContainerImage for user
+ provided image. Known values are: "CloudBuild" and "ContainerImage".
+ :vartype image_type: str or ~azure.mgmt.appcontainers.models.ImageType
:ivar name: Custom container name.
:vartype name: str
:ivar command: Container start command.
@@ -2528,6 +2620,7 @@ class Container(BaseContainer):
_attribute_map = {
"image": {"key": "image", "type": "str"},
+ "image_type": {"key": "imageType", "type": "str"},
"name": {"key": "name", "type": "str"},
"command": {"key": "command", "type": "[str]"},
"args": {"key": "args", "type": "[str]"},
@@ -2541,6 +2634,7 @@ def __init__(
self,
*,
image: Optional[str] = None,
+ image_type: Optional[Union[str, "_models.ImageType"]] = None,
name: Optional[str] = None,
command: Optional[List[str]] = None,
args: Optional[List[str]] = None,
@@ -2553,6 +2647,10 @@ def __init__(
"""
:keyword image: Container image tag.
:paramtype image: str
+ :keyword image_type: The type of the image. Set to CloudBuild to let the system manages the
+ image, where user will not be able to update image through image field. Set to ContainerImage
+ for user provided image. Known values are: "CloudBuild" and "ContainerImage".
+ :paramtype image_type: str or ~azure.mgmt.appcontainers.models.ImageType
:keyword name: Custom container name.
:paramtype name: str
:keyword command: Container start command.
@@ -2570,6 +2668,7 @@ def __init__(
"""
super().__init__(
image=image,
+ image_type=image_type,
name=name,
command=command,
args=args,
@@ -2588,8 +2687,8 @@ class ContainerApp(TrackedResource): # pylint: disable=too-many-instance-attrib
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -2613,6 +2712,10 @@ class ContainerApp(TrackedResource): # pylint: disable=too-many-instance-attrib
mode deployment will not delete the resource if it is removed from the template since it is
managed by another resource.
:vartype managed_by: str
+ :ivar kind: Metadata used to render different experiences for resources of the same type; e.g.
+ WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider
+ must validate and persist this value. "workflowapp"
+ :vartype kind: str or ~azure.mgmt.appcontainers.models.Kind
:ivar provisioning_state: Provisioning state of the Container App. Known values are:
"InProgress", "Succeeded", "Failed", "Canceled", and "Deleting".
:vartype provisioning_state: str or
@@ -2623,6 +2726,9 @@ class ContainerApp(TrackedResource): # pylint: disable=too-many-instance-attrib
:vartype environment_id: str
:ivar workload_profile_name: Workload profile name to pin for container app execution.
:vartype workload_profile_name: str
+ :ivar patching_configuration: Container App auto patch configuration.
+ :vartype patching_configuration:
+ ~azure.mgmt.appcontainers.models.ContainerAppPropertiesPatchingConfiguration
:ivar latest_revision_name: Name of the latest revision of the Container App.
:vartype latest_revision_name: str
:ivar latest_ready_revision_name: Name of the latest ready revision of the Container App.
@@ -2667,10 +2773,15 @@ class ContainerApp(TrackedResource): # pylint: disable=too-many-instance-attrib
"extended_location": {"key": "extendedLocation", "type": "ExtendedLocation"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"managed_by": {"key": "managedBy", "type": "str"},
+ "kind": {"key": "kind", "type": "str"},
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
"managed_environment_id": {"key": "properties.managedEnvironmentId", "type": "str"},
"environment_id": {"key": "properties.environmentId", "type": "str"},
"workload_profile_name": {"key": "properties.workloadProfileName", "type": "str"},
+ "patching_configuration": {
+ "key": "properties.patchingConfiguration",
+ "type": "ContainerAppPropertiesPatchingConfiguration",
+ },
"latest_revision_name": {"key": "properties.latestRevisionName", "type": "str"},
"latest_ready_revision_name": {"key": "properties.latestReadyRevisionName", "type": "str"},
"latest_revision_fqdn": {"key": "properties.latestRevisionFqdn", "type": "str"},
@@ -2689,9 +2800,11 @@ def __init__(
extended_location: Optional["_models.ExtendedLocation"] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
managed_by: Optional[str] = None,
+ kind: Optional[Union[str, "_models.Kind"]] = None,
managed_environment_id: Optional[str] = None,
environment_id: Optional[str] = None,
workload_profile_name: Optional[str] = None,
+ patching_configuration: Optional["_models.ContainerAppPropertiesPatchingConfiguration"] = None,
configuration: Optional["_models.Configuration"] = None,
template: Optional["_models.Template"] = None,
**kwargs: Any
@@ -2711,12 +2824,19 @@ def __init__(
complete mode deployment will not delete the resource if it is removed from the template since
it is managed by another resource.
:paramtype managed_by: str
+ :keyword kind: Metadata used to render different experiences for resources of the same type;
+ e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource
+ provider must validate and persist this value. "workflowapp"
+ :paramtype kind: str or ~azure.mgmt.appcontainers.models.Kind
:keyword managed_environment_id: Deprecated. Resource ID of the Container App's environment.
:paramtype managed_environment_id: str
:keyword environment_id: Resource ID of environment.
:paramtype environment_id: str
:keyword workload_profile_name: Workload profile name to pin for container app execution.
:paramtype workload_profile_name: str
+ :keyword patching_configuration: Container App auto patch configuration.
+ :paramtype patching_configuration:
+ ~azure.mgmt.appcontainers.models.ContainerAppPropertiesPatchingConfiguration
:keyword configuration: Non versioned Container App configuration properties.
:paramtype configuration: ~azure.mgmt.appcontainers.models.Configuration
:keyword template: Container App versioned application definition.
@@ -2726,10 +2846,12 @@ def __init__(
self.extended_location = extended_location
self.identity = identity
self.managed_by = managed_by
+ self.kind = kind
self.provisioning_state = None
self.managed_environment_id = managed_environment_id
self.environment_id = environment_id
self.workload_profile_name = workload_profile_name
+ self.patching_configuration = patching_configuration
self.latest_revision_name = None
self.latest_ready_revision_name = None
self.latest_revision_fqdn = None
@@ -2747,8 +2869,8 @@ class ContainerAppAuthToken(TrackedResource):
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -3113,6 +3235,179 @@ def __init__(self, *, port: int, host: Optional[str] = None, **kwargs: Any) -> N
self.port = port
+class ContainerAppPropertiesPatchingConfiguration(_serialization.Model): # pylint: disable=name-too-long
+ """Container App auto patch configuration.
+
+ :ivar patching_mode: Patching mode for the container app. Null or default in this field will be
+ interpreted as Automatic by RP. Automatic mode will automatically apply available patches.
+ Manual mode will require the user to manually apply patches. Disabled mode will stop patch
+ detection and auto patching. Known values are: "Automatic", "Manual", and "Disabled".
+ :vartype patching_mode: str or ~azure.mgmt.appcontainers.models.PatchingMode
+ """
+
+ _attribute_map = {
+ "patching_mode": {"key": "patchingMode", "type": "str"},
+ }
+
+ def __init__(self, *, patching_mode: Optional[Union[str, "_models.PatchingMode"]] = None, **kwargs: Any) -> None:
+ """
+ :keyword patching_mode: Patching mode for the container app. Null or default in this field will
+ be interpreted as Automatic by RP. Automatic mode will automatically apply available patches.
+ Manual mode will require the user to manually apply patches. Disabled mode will stop patch
+ detection and auto patching. Known values are: "Automatic", "Manual", and "Disabled".
+ :paramtype patching_mode: str or ~azure.mgmt.appcontainers.models.PatchingMode
+ """
+ super().__init__(**kwargs)
+ self.patching_mode = patching_mode
+
+
+class ContainerAppsBuildCollection(_serialization.Model):
+ """The response of a Container Apps Build Resource list operation.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: The Container Apps Build Resource items on this page. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.ContainerAppsBuildResource]
+ :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": "[ContainerAppsBuildResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self, *, value: List["_models.ContainerAppsBuildResource"], next_link: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: The Container Apps Build Resource items on this page. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.ContainerAppsBuildResource]
+ :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 ContainerAppsBuildConfiguration(_serialization.Model):
+ """Configuration of the build.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :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, secrets
+ should not be used in environment variable.
+ :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]
+ """
+
+ _validation = {
+ "base_os": {"readonly": True},
+ "platform": {"readonly": True},
+ "platform_version": {"readonly": True},
+ "environment_variables": {"readonly": True},
+ "pre_build_steps": {"readonly": True},
+ }
+
+ _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, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.base_os = None
+ self.platform = None
+ self.platform_version = None
+ self.environment_variables = None
+ self.pre_build_steps = None
+
+
+class ContainerAppsBuildResource(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. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :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.ContainerAppsBuildConfiguration
+ :ivar log_stream_endpoint: Endpoint from which the build logs can be streamed.
+ :vartype log_stream_endpoint: str
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "provisioning_state": {"readonly": True},
+ "build_status": {"readonly": True},
+ "destination_container_registry": {"readonly": True},
+ "configuration": {"readonly": True},
+ "log_stream_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": "ContainerAppsBuildConfiguration"},
+ "log_stream_endpoint": {"key": "properties.logStreamEndpoint", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.provisioning_state = None
+ self.build_status = None
+ self.destination_container_registry = None
+ self.configuration = None
+ self.log_stream_endpoint = None
+
+
class ContainerAppSecret(_serialization.Model):
"""Container App Secret.
@@ -3153,34 +3448,122 @@ def __init__(self, **kwargs: Any) -> None:
self.key_vault_url = None
-class ContainerRegistry(_serialization.Model):
- """Model representing a mapping from a container registry to the identity used to connect to it.
+class ContainerAppsPatchResource(ProxyResource):
+ """Container App Patch.
- All required parameters must be populated in order to send to server.
+ Variables are only populated by the server, and will be ignored when sending a request.
- :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
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :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 = {
- "container_registry_server": {"required": True},
- "identity_resource_id": {"required": True},
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "properties": {"readonly": True},
}
_attribute_map = {
- "container_registry_server": {"key": "containerRegistryServer", "type": "str"},
- "identity_resource_id": {"key": "identityResourceId", "type": "str"},
+ "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, *, 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
- """
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.properties = None
+
+
+class ContainerExecutionStatus(_serialization.Model):
+ """Container Apps Job execution container status. Contains status code and reason.
+
+ :ivar name: Container Name.
+ :vartype name: str
+ :ivar code: Exit code.
+ :vartype code: int
+ :ivar additional_information: Additional information for the container status.
+ :vartype additional_information: str
+ :ivar status: Status of the container.
+ :vartype status: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "code": {"key": "code", "type": "int"},
+ "additional_information": {"key": "additionalInformation", "type": "str"},
+ "status": {"key": "status", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ code: Optional[int] = None,
+ additional_information: Optional[str] = None,
+ status: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Container Name.
+ :paramtype name: str
+ :keyword code: Exit code.
+ :paramtype code: int
+ :keyword additional_information: Additional information for the container status.
+ :paramtype additional_information: str
+ :keyword status: Status of the container.
+ :paramtype status: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.code = code
+ self.additional_information = additional_information
+ self.status = status
+
+
+class ContainerRegistry(_serialization.Model):
+ """Model representing a mapping from a container registry to the identity used to connect to it.
+
+ All required parameters must be populated in order to send to server.
+
+ :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 = {
+ "container_registry_server": {"required": True},
+ "identity_resource_id": {"required": True},
+ }
+
+ _attribute_map = {
+ "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
@@ -3364,6 +3747,47 @@ def __init__(
self.allow_credentials = allow_credentials
+class CustomContainerTemplate(_serialization.Model):
+ """Custom container configuration.
+
+ :ivar registry_credentials: Private container registry credentials for containers used by the
+ sessions of the session pool.
+ :vartype registry_credentials: ~azure.mgmt.appcontainers.models.SessionRegistryCredentials
+ :ivar containers: List of container definitions for the sessions of the session pool.
+ :vartype containers: list[~azure.mgmt.appcontainers.models.SessionContainer]
+ :ivar ingress: Session pool ingress configuration.
+ :vartype ingress: ~azure.mgmt.appcontainers.models.SessionIngress
+ """
+
+ _attribute_map = {
+ "registry_credentials": {"key": "registryCredentials", "type": "SessionRegistryCredentials"},
+ "containers": {"key": "containers", "type": "[SessionContainer]"},
+ "ingress": {"key": "ingress", "type": "SessionIngress"},
+ }
+
+ def __init__(
+ self,
+ *,
+ registry_credentials: Optional["_models.SessionRegistryCredentials"] = None,
+ containers: Optional[List["_models.SessionContainer"]] = None,
+ ingress: Optional["_models.SessionIngress"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword registry_credentials: Private container registry credentials for containers used by
+ the sessions of the session pool.
+ :paramtype registry_credentials: ~azure.mgmt.appcontainers.models.SessionRegistryCredentials
+ :keyword containers: List of container definitions for the sessions of the session pool.
+ :paramtype containers: list[~azure.mgmt.appcontainers.models.SessionContainer]
+ :keyword ingress: Session pool ingress configuration.
+ :paramtype ingress: ~azure.mgmt.appcontainers.models.SessionIngress
+ """
+ super().__init__(**kwargs)
+ self.registry_credentials = registry_credentials
+ self.containers = containers
+ self.ingress = ingress
+
+
class CustomDomain(_serialization.Model):
"""Custom Domain of a Container App.
@@ -3737,12 +4161,16 @@ class CustomScaleRule(_serialization.Model):
:vartype metadata: dict[str, str]
:ivar auth: Authentication secrets for the custom scale rule.
:vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :vartype identity: str
"""
_attribute_map = {
"type": {"key": "type", "type": "str"},
"metadata": {"key": "metadata", "type": "{str}"},
"auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ "identity": {"key": "identity", "type": "str"},
}
def __init__(
@@ -3751,6 +4179,7 @@ def __init__(
type: Optional[str] = None,
metadata: Optional[Dict[str, str]] = None,
auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ identity: Optional[str] = None,
**kwargs: Any
) -> None:
"""
@@ -3761,11 +4190,15 @@ def __init__(
:paramtype metadata: dict[str, str]
:keyword auth: Authentication secrets for the custom scale rule.
:paramtype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :keyword identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :paramtype identity: str
"""
super().__init__(**kwargs)
self.type = type
self.metadata = metadata
self.auth = auth
+ self.identity = identity
class Dapr(_serialization.Model):
@@ -3855,8 +4288,8 @@ class DaprComponent(ProxyResource): # pylint: disable=too-many-instance-attribu
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -3997,8 +4430,8 @@ class DaprComponentResiliencyPolicy(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -4463,8 +4896,8 @@ class DaprSubscription(ProxyResource): # pylint: disable=too-many-instance-attr
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -5075,8 +5508,8 @@ class Diagnostics(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -5358,8 +5791,8 @@ class DotNetComponent(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -5369,8 +5802,7 @@ class DotNetComponent(ProxyResource):
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
- :ivar component_type: Type of the .NET Component. Known values are: "AspireDashboard" and
- "AspireResourceServerApi".
+ :ivar component_type: Type of the .NET Component. "AspireDashboard"
:vartype component_type: str or ~azure.mgmt.appcontainers.models.DotNetComponentType
:ivar provisioning_state: Provisioning state of the .NET Component. Known values are:
"Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
@@ -5411,8 +5843,7 @@ def __init__(
**kwargs: Any
) -> None:
"""
- :keyword component_type: Type of the .NET Component. Known values are: "AspireDashboard" and
- "AspireResourceServerApi".
+ :keyword component_type: Type of the .NET Component. "AspireDashboard"
:paramtype component_type: str or ~azure.mgmt.appcontainers.models.DotNetComponentType
:keyword configurations: List of .NET Components configuration properties.
:paramtype configurations:
@@ -5512,6 +5943,38 @@ def __init__(self, *, name: Optional[str] = None, service_id: Optional[str] = No
self.service_id = service_id
+class DynamicPoolConfiguration(_serialization.Model):
+ """Dynamic pool configuration.
+
+ :ivar execution_type: The execution type of the session pool. "Timed"
+ :vartype execution_type: str or ~azure.mgmt.appcontainers.models.ExecutionType
+ :ivar cooldown_period_in_seconds: The cooldown period of a session in seconds.
+ :vartype cooldown_period_in_seconds: int
+ """
+
+ _attribute_map = {
+ "execution_type": {"key": "executionType", "type": "str"},
+ "cooldown_period_in_seconds": {"key": "cooldownPeriodInSeconds", "type": "int"},
+ }
+
+ def __init__(
+ self,
+ *,
+ execution_type: Optional[Union[str, "_models.ExecutionType"]] = None,
+ cooldown_period_in_seconds: Optional[int] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword execution_type: The execution type of the session pool. "Timed"
+ :paramtype execution_type: str or ~azure.mgmt.appcontainers.models.ExecutionType
+ :keyword cooldown_period_in_seconds: The cooldown period of a session in seconds.
+ :paramtype cooldown_period_in_seconds: int
+ """
+ super().__init__(**kwargs)
+ self.execution_type = execution_type
+ self.cooldown_period_in_seconds = cooldown_period_in_seconds
+
+
class EncryptionSettings(_serialization.Model):
"""The configuration settings of the secrets references of encryption key and signing key for
ContainerApp Service Authentication/Authorization.
@@ -5556,8 +6019,8 @@ class EnvironmentAuthToken(TrackedResource):
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -5776,6 +6239,26 @@ def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: A
self.error = error
+class ExecutionStatus(_serialization.Model):
+ """Container Apps Job execution status.
+
+ :ivar replicas: Replicas in the execution.
+ :vartype replicas: list[~azure.mgmt.appcontainers.models.ReplicaExecutionStatus]
+ """
+
+ _attribute_map = {
+ "replicas": {"key": "replicas", "type": "[ReplicaExecutionStatus]"},
+ }
+
+ def __init__(self, *, replicas: Optional[List["_models.ReplicaExecutionStatus"]] = None, **kwargs: Any) -> None:
+ """
+ :keyword replicas: Replicas in the execution.
+ :paramtype replicas: list[~azure.mgmt.appcontainers.models.ReplicaExecutionStatus]
+ """
+ super().__init__(**kwargs)
+ self.replicas = replicas
+
+
class ExtendedLocation(_serialization.Model):
"""The complex type of the extended location.
@@ -6357,11 +6840,15 @@ class HttpScaleRule(_serialization.Model):
:vartype metadata: dict[str, str]
:ivar auth: Authentication secrets for the custom scale rule.
:vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :vartype identity: str
"""
_attribute_map = {
"metadata": {"key": "metadata", "type": "{str}"},
"auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ "identity": {"key": "identity", "type": "str"},
}
def __init__(
@@ -6369,6 +6856,7 @@ def __init__(
*,
metadata: Optional[Dict[str, str]] = None,
auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ identity: Optional[str] = None,
**kwargs: Any
) -> None:
"""
@@ -6376,10 +6864,14 @@ def __init__(
:paramtype metadata: dict[str, str]
:keyword auth: Authentication secrets for the custom scale rule.
:paramtype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :keyword identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :paramtype identity: str
"""
super().__init__(**kwargs)
self.metadata = metadata
self.auth = auth
+ self.identity = identity
class HttpSettings(_serialization.Model):
@@ -6532,6 +7024,44 @@ def __init__(
self.custom_open_id_connect_providers = custom_open_id_connect_providers
+class IdentitySettings(_serialization.Model):
+ """Optional settings for a Managed Identity that is assigned to the Container App.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity. Required.
+ :vartype identity: str
+ :ivar lifecycle: Use to select the lifecycle stages of a Container App during which the Managed
+ Identity should be available. Known values are: "Init", "Main", "None", and "All".
+ :vartype lifecycle: str or ~azure.mgmt.appcontainers.models.IdentitySettingsLifeCycle
+ """
+
+ _validation = {
+ "identity": {"required": True},
+ }
+
+ _attribute_map = {
+ "identity": {"key": "identity", "type": "str"},
+ "lifecycle": {"key": "lifecycle", "type": "str"},
+ }
+
+ def __init__(
+ self, *, identity: str, lifecycle: Union[str, "_models.IdentitySettingsLifeCycle"] = "All", **kwargs: Any
+ ) -> None:
+ """
+ :keyword identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity. Required.
+ :paramtype identity: str
+ :keyword lifecycle: Use to select the lifecycle stages of a Container App during which the
+ Managed Identity should be available. Known values are: "Init", "Main", "None", and "All".
+ :paramtype lifecycle: str or ~azure.mgmt.appcontainers.models.IdentitySettingsLifeCycle
+ """
+ super().__init__(**kwargs)
+ self.identity = identity
+ self.lifecycle = lifecycle
+
+
class Ingress(_serialization.Model): # pylint: disable=too-many-instance-attributes
"""Container App Ingress configuration.
@@ -6737,6 +7267,10 @@ class InitContainer(BaseContainer):
:ivar image: Container image tag.
:vartype image: str
+ :ivar image_type: The type of the image. Set to CloudBuild to let the system manages the image,
+ where user will not be able to update image through image field. Set to ContainerImage for user
+ provided image. Known values are: "CloudBuild" and "ContainerImage".
+ :vartype image_type: str or ~azure.mgmt.appcontainers.models.ImageType
:ivar name: Custom container name.
:vartype name: str
:ivar command: Container start command.
@@ -6815,8 +7349,8 @@ class JavaComponent(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -6826,18 +7360,8 @@ class JavaComponent(ProxyResource):
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
- :ivar component_type: Type of the Java Component. Known values are: "SpringBootAdmin",
- "SpringCloudEureka", and "SpringCloudConfig".
- :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
- :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
- "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
- :vartype provisioning_state: str or
- ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
- :ivar configurations: List of Java Components configuration properties.
- :vartype configurations:
- list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
- :ivar service_binds: List of Java Components that are bound to the Java component.
- :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :ivar properties: Java Component resource specific properties.
+ :vartype properties: ~azure.mgmt.appcontainers.models.JavaComponentProperties
"""
_validation = {
@@ -6845,7 +7369,6 @@ class JavaComponent(ProxyResource):
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
- "provisioning_state": {"readonly": True},
}
_attribute_map = {
@@ -6853,35 +7376,16 @@ class JavaComponent(ProxyResource):
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"system_data": {"key": "systemData", "type": "SystemData"},
- "component_type": {"key": "properties.componentType", "type": "str"},
- "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
- "configurations": {"key": "properties.configurations", "type": "[JavaComponentConfigurationProperty]"},
- "service_binds": {"key": "properties.serviceBinds", "type": "[JavaComponentServiceBind]"},
+ "properties": {"key": "properties", "type": "JavaComponentProperties"},
}
- def __init__(
- self,
- *,
- component_type: Optional[Union[str, "_models.JavaComponentType"]] = None,
- configurations: Optional[List["_models.JavaComponentConfigurationProperty"]] = None,
- service_binds: Optional[List["_models.JavaComponentServiceBind"]] = None,
- **kwargs: Any
- ) -> None:
+ def __init__(self, *, properties: Optional["_models.JavaComponentProperties"] = None, **kwargs: Any) -> None:
"""
- :keyword component_type: Type of the Java Component. Known values are: "SpringBootAdmin",
- "SpringCloudEureka", and "SpringCloudConfig".
- :paramtype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
- :keyword configurations: List of Java Components configuration properties.
- :paramtype configurations:
- list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
- :keyword service_binds: List of Java Components that are bound to the Java component.
- :paramtype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :keyword properties: Java Component resource specific properties.
+ :paramtype properties: ~azure.mgmt.appcontainers.models.JavaComponentProperties
"""
super().__init__(**kwargs)
- self.component_type = component_type
- self.provisioning_state = None
- self.configurations = configurations
- self.service_binds = service_binds
+ self.properties = properties
class JavaComponentConfigurationProperty(_serialization.Model):
@@ -6910,6 +7414,96 @@ def __init__(self, *, property_name: Optional[str] = None, value: Optional[str]
self.value = value
+class JavaComponentIngress(_serialization.Model):
+ """Container App Ingress configuration.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar fqdn: Hostname of the Java Component endpoint.
+ :vartype fqdn: str
+ """
+
+ _validation = {
+ "fqdn": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "fqdn": {"key": "fqdn", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.fqdn = None
+
+
+class JavaComponentProperties(_serialization.Model):
+ """Java Component common properties.
+
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
+ NacosComponent, SpringBootAdminComponent, SpringCloudConfigComponent,
+ SpringCloudEurekaComponent
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar component_type: Type of the Java Component. Required. Known values are:
+ "SpringBootAdmin", "SpringCloudEureka", "SpringCloudConfig", and "Nacos".
+ :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
+ :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
+ "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
+ :ivar configurations: List of Java Components configuration properties.
+ :vartype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :ivar service_binds: List of Java Components that are bound to the Java component.
+ :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ """
+
+ _validation = {
+ "component_type": {"required": True},
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "component_type": {"key": "componentType", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "configurations": {"key": "configurations", "type": "[JavaComponentConfigurationProperty]"},
+ "service_binds": {"key": "serviceBinds", "type": "[JavaComponentServiceBind]"},
+ }
+
+ _subtype_map = {
+ "component_type": {
+ "Nacos": "NacosComponent",
+ "SpringBootAdmin": "SpringBootAdminComponent",
+ "SpringCloudConfig": "SpringCloudConfigComponent",
+ "SpringCloudEureka": "SpringCloudEurekaComponent",
+ }
+ }
+
+ def __init__(
+ self,
+ *,
+ configurations: Optional[List["_models.JavaComponentConfigurationProperty"]] = None,
+ service_binds: Optional[List["_models.JavaComponentServiceBind"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword configurations: List of Java Components configuration properties.
+ :paramtype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :keyword service_binds: List of Java Components that are bound to the Java component.
+ :paramtype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ """
+ super().__init__(**kwargs)
+ self.component_type: Optional[str] = None
+ self.provisioning_state = None
+ self.configurations = configurations
+ self.service_binds = service_binds
+
+
class JavaComponentsCollection(_serialization.Model):
"""Java Components ARM resource.
@@ -6976,8 +7570,8 @@ class Job(TrackedResource): # pylint: disable=too-many-instance-attributes
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -7104,7 +7698,7 @@ class JobConfiguration(_serialization.Model):
Properties replicaCompletionCount and parallelism would be set to 1 by default.
:vartype manual_trigger_config:
~azure.mgmt.appcontainers.models.JobConfigurationManualTriggerConfig
- :ivar schedule_trigger_config: Cron formatted repeating trigger schedule ("\ * * * * *") for
+ :ivar schedule_trigger_config: Cron formatted repeating trigger schedule ("\\ * * * * *") for
cronjobs. Properties completions and parallelism would be set to 1 by default.
:vartype schedule_trigger_config:
~azure.mgmt.appcontainers.models.JobConfigurationScheduleTriggerConfig
@@ -7114,6 +7708,9 @@ class JobConfiguration(_serialization.Model):
:ivar registries: Collection of private container registry credentials used by a Container apps
job.
:vartype registries: list[~azure.mgmt.appcontainers.models.RegistryCredentials]
+ :ivar identity_settings: Optional settings for Managed Identities that are assigned to the
+ Container App Job. If a Managed Identity is not specified here, default settings will be used.
+ :vartype identity_settings: list[~azure.mgmt.appcontainers.models.IdentitySettings]
"""
_validation = {
@@ -7130,6 +7727,7 @@ class JobConfiguration(_serialization.Model):
"schedule_trigger_config": {"key": "scheduleTriggerConfig", "type": "JobConfigurationScheduleTriggerConfig"},
"event_trigger_config": {"key": "eventTriggerConfig", "type": "JobConfigurationEventTriggerConfig"},
"registries": {"key": "registries", "type": "[RegistryCredentials]"},
+ "identity_settings": {"key": "identitySettings", "type": "[IdentitySettings]"},
}
def __init__(
@@ -7143,6 +7741,7 @@ def __init__(
schedule_trigger_config: Optional["_models.JobConfigurationScheduleTriggerConfig"] = None,
event_trigger_config: Optional["_models.JobConfigurationEventTriggerConfig"] = None,
registries: Optional[List["_models.RegistryCredentials"]] = None,
+ identity_settings: Optional[List["_models.IdentitySettings"]] = None,
**kwargs: Any
) -> None:
"""
@@ -7159,8 +7758,8 @@ def __init__(
Properties replicaCompletionCount and parallelism would be set to 1 by default.
:paramtype manual_trigger_config:
~azure.mgmt.appcontainers.models.JobConfigurationManualTriggerConfig
- :keyword schedule_trigger_config: Cron formatted repeating trigger schedule ("\ * * * * *") for
- cronjobs. Properties completions and parallelism would be set to 1 by default.
+ :keyword schedule_trigger_config: Cron formatted repeating trigger schedule ("\\ * * * * *")
+ for cronjobs. Properties completions and parallelism would be set to 1 by default.
:paramtype schedule_trigger_config:
~azure.mgmt.appcontainers.models.JobConfigurationScheduleTriggerConfig
:keyword event_trigger_config: Trigger configuration of an event driven job.
@@ -7169,6 +7768,9 @@ def __init__(
:keyword registries: Collection of private container registry credentials used by a Container
apps job.
:paramtype registries: list[~azure.mgmt.appcontainers.models.RegistryCredentials]
+ :keyword identity_settings: Optional settings for Managed Identities that are assigned to the
+ Container App Job. If a Managed Identity is not specified here, default settings will be used.
+ :paramtype identity_settings: list[~azure.mgmt.appcontainers.models.IdentitySettings]
"""
super().__init__(**kwargs)
self.secrets = secrets
@@ -7179,6 +7781,7 @@ def __init__(
self.schedule_trigger_config = schedule_trigger_config
self.event_trigger_config = event_trigger_config
self.registries = registries
+ self.identity_settings = identity_settings
class JobConfigurationEventTriggerConfig(_serialization.Model):
@@ -7254,7 +7857,7 @@ def __init__(
class JobConfigurationScheduleTriggerConfig(_serialization.Model):
- """Cron formatted repeating trigger schedule ("\ * * * * *") for cronjobs. Properties completions
+ """Cron formatted repeating trigger schedule ("\\ * * * * *") for cronjobs. Properties completions
and parallelism would be set to 1 by default.
All required parameters must be populated in order to send to server.
@@ -7262,7 +7865,7 @@ class JobConfigurationScheduleTriggerConfig(_serialization.Model):
:ivar replica_completion_count: Minimum number of successful replica completions before overall
job completion.
:vartype replica_completion_count: int
- :ivar cron_expression: Cron formatted repeating schedule ("\ * * * * *") of a Cron Job.
+ :ivar cron_expression: Cron formatted repeating schedule ("\\ * * * * *") of a Cron Job.
Required.
:vartype cron_expression: str
:ivar parallelism: Number of parallel replicas of a job that can run at a given time.
@@ -7291,7 +7894,7 @@ def __init__(
:keyword replica_completion_count: Minimum number of successful replica completions before
overall job completion.
:paramtype replica_completion_count: int
- :keyword cron_expression: Cron formatted repeating schedule ("\ * * * * *") of a Cron Job.
+ :keyword cron_expression: Cron formatted repeating schedule ("\\ * * * * *") of a Cron Job.
Required.
:paramtype cron_expression: str
:keyword parallelism: Number of parallel replicas of a job that can run at a given time.
@@ -7323,6 +7926,8 @@ class JobExecution(_serialization.Model):
:vartype end_time: ~datetime.datetime
:ivar template: Job's execution container.
:vartype template: ~azure.mgmt.appcontainers.models.JobExecutionTemplate
+ :ivar detailed_status: Detailed status of the job execution.
+ :vartype detailed_status: ~azure.mgmt.appcontainers.models.ExecutionStatus
"""
_validation = {
@@ -7337,6 +7942,7 @@ class JobExecution(_serialization.Model):
"start_time": {"key": "properties.startTime", "type": "iso-8601"},
"end_time": {"key": "properties.endTime", "type": "iso-8601"},
"template": {"key": "properties.template", "type": "JobExecutionTemplate"},
+ "detailed_status": {"key": "properties.detailedStatus", "type": "ExecutionStatus"},
}
def __init__(
@@ -7348,6 +7954,7 @@ def __init__(
start_time: Optional[datetime.datetime] = None,
end_time: Optional[datetime.datetime] = None,
template: Optional["_models.JobExecutionTemplate"] = None,
+ detailed_status: Optional["_models.ExecutionStatus"] = None,
**kwargs: Any
) -> None:
"""
@@ -7363,6 +7970,8 @@ def __init__(
:paramtype end_time: ~datetime.datetime
:keyword template: Job's execution container.
:paramtype template: ~azure.mgmt.appcontainers.models.JobExecutionTemplate
+ :keyword detailed_status: Detailed status of the job execution.
+ :paramtype detailed_status: ~azure.mgmt.appcontainers.models.ExecutionStatus
"""
super().__init__(**kwargs)
self.name = name
@@ -7372,6 +7981,7 @@ def __init__(
self.start_time = start_time
self.end_time = end_time
self.template = template
+ self.detailed_status = detailed_status
class JobExecutionBase(_serialization.Model):
@@ -7687,6 +8297,9 @@ class JobScaleRule(_serialization.Model):
:vartype metadata: JSON
:ivar auth: Authentication secrets for the scale rule.
:vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
+ job, or 'system' for system-assigned identity.
+ :vartype identity: str
"""
_attribute_map = {
@@ -7694,6 +8307,7 @@ class JobScaleRule(_serialization.Model):
"type": {"key": "type", "type": "str"},
"metadata": {"key": "metadata", "type": "object"},
"auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ "identity": {"key": "identity", "type": "str"},
}
def __init__(
@@ -7703,6 +8317,7 @@ def __init__(
type: Optional[str] = None,
metadata: Optional[JSON] = None,
auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ identity: Optional[str] = None,
**kwargs: Any
) -> None:
"""
@@ -7715,12 +8330,16 @@ def __init__(
:paramtype metadata: JSON
:keyword auth: Authentication secrets for the scale rule.
:paramtype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :keyword identity: The resource ID of a user-assigned managed identity that is assigned to the
+ job, or 'system' for system-assigned identity.
+ :paramtype identity: str
"""
super().__init__(**kwargs)
self.name = name
self.type = type
self.metadata = metadata
self.auth = auth
+ self.identity = identity
class JobsCollection(_serialization.Model):
@@ -7949,13 +8568,48 @@ def __init__(
self.dynamic_json_columns = dynamic_json_columns
-class Login(_serialization.Model):
- """The configuration settings of the login flow of users using ContainerApp Service
- Authentication/Authorization.
+class LoggerSetting(_serialization.Model):
+ """Logger settings for java workloads.
- :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.
+ All required parameters must be populated in order to send to server.
+
+ :ivar logger: Logger name. Required.
+ :vartype logger: str
+ :ivar level: The specified logger's log level. Required. Known values are: "off", "error",
+ "info", "debug", "trace", and "warn".
+ :vartype level: str or ~azure.mgmt.appcontainers.models.Level
+ """
+
+ _validation = {
+ "logger": {"required": True},
+ "level": {"required": True},
+ }
+
+ _attribute_map = {
+ "logger": {"key": "logger", "type": "str"},
+ "level": {"key": "level", "type": "str"},
+ }
+
+ def __init__(self, *, logger: str, level: Union[str, "_models.Level"], **kwargs: Any) -> None:
+ """
+ :keyword logger: Logger name. Required.
+ :paramtype logger: str
+ :keyword level: The specified logger's log level. Required. Known values are: "off", "error",
+ "info", "debug", "trace", and "warn".
+ :paramtype level: str or ~azure.mgmt.appcontainers.models.Level
+ """
+ super().__init__(**kwargs)
+ self.logger = logger
+ self.level = level
+
+
+class Login(_serialization.Model):
+ """The configuration settings of the login flow of users using ContainerApp Service
+ Authentication/Authorization.
+
+ :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`.
@@ -8086,8 +8740,8 @@ class ManagedCertificate(TrackedResource):
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -8262,8 +8916,8 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -8330,6 +8984,12 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
:ivar peer_authentication: Peer authentication settings for the Managed Environment.
:vartype peer_authentication:
~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication
+ :ivar peer_traffic_configuration: Peer traffic settings for the Managed Environment.
+ :vartype peer_traffic_configuration:
+ ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration
+ :ivar private_endpoint_connections: Private endpoint connections to the resource.
+ :vartype private_endpoint_connections:
+ list[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
"""
_validation = {
@@ -8343,6 +9003,7 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
"default_domain": {"readonly": True},
"static_ip": {"readonly": True},
"event_stream_endpoint": {"readonly": True},
+ "private_endpoint_connections": {"readonly": True},
}
_attribute_map = {
@@ -8384,6 +9045,14 @@ class ManagedEnvironment(TrackedResource): # pylint: disable=too-many-instance-
"key": "properties.peerAuthentication",
"type": "ManagedEnvironmentPropertiesPeerAuthentication",
},
+ "peer_traffic_configuration": {
+ "key": "properties.peerTrafficConfiguration",
+ "type": "ManagedEnvironmentPropertiesPeerTrafficConfiguration",
+ },
+ "private_endpoint_connections": {
+ "key": "properties.privateEndpointConnections",
+ "type": "[PrivateEndpointConnection]",
+ },
}
def __init__( # pylint: disable=too-many-locals
@@ -8406,6 +9075,7 @@ def __init__( # pylint: disable=too-many-locals
dapr_configuration: Optional["_models.DaprConfiguration"] = None,
infrastructure_resource_group: Optional[str] = None,
peer_authentication: Optional["_models.ManagedEnvironmentPropertiesPeerAuthentication"] = None,
+ peer_traffic_configuration: Optional["_models.ManagedEnvironmentPropertiesPeerTrafficConfiguration"] = None,
**kwargs: Any
) -> None:
"""
@@ -8454,6 +9124,9 @@ def __init__( # pylint: disable=too-many-locals
:keyword peer_authentication: Peer authentication settings for the Managed Environment.
:paramtype peer_authentication:
~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication
+ :keyword peer_traffic_configuration: Peer traffic settings for the Managed Environment.
+ :paramtype peer_traffic_configuration:
+ ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration
"""
super().__init__(tags=tags, location=location, **kwargs)
self.kind = kind
@@ -8476,6 +9149,8 @@ def __init__( # pylint: disable=too-many-locals
self.dapr_configuration = dapr_configuration
self.infrastructure_resource_group = infrastructure_resource_group
self.peer_authentication = peer_authentication
+ self.peer_traffic_configuration = peer_traffic_configuration
+ self.private_endpoint_connections = None
class ManagedEnvironmentPropertiesPeerAuthentication(_serialization.Model): # pylint: disable=name-too-long
@@ -8498,6 +9173,55 @@ def __init__(self, *, mtls: Optional["_models.Mtls"] = None, **kwargs: Any) -> N
self.mtls = mtls
+class ManagedEnvironmentPropertiesPeerTrafficConfiguration(_serialization.Model): # pylint: disable=name-too-long
+ """Peer traffic settings for the Managed Environment.
+
+ :ivar encryption: Peer traffic encryption settings for the Managed Environment.
+ :vartype encryption:
+ ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption
+ """
+
+ _attribute_map = {
+ "encryption": {"key": "encryption", "type": "ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption"},
+ }
+
+ def __init__(
+ self,
+ *,
+ encryption: Optional["_models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword encryption: Peer traffic encryption settings for the Managed Environment.
+ :paramtype encryption:
+ ~azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption
+ """
+ super().__init__(**kwargs)
+ self.encryption = encryption
+
+
+class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(
+ _serialization.Model
+): # pylint: disable=name-too-long
+ """Peer traffic encryption settings for the Managed Environment.
+
+ :ivar enabled: Boolean indicating whether the peer traffic encryption is enabled.
+ :vartype enabled: bool
+ """
+
+ _attribute_map = {
+ "enabled": {"key": "enabled", "type": "bool"},
+ }
+
+ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None:
+ """
+ :keyword enabled: Boolean indicating whether the peer traffic encryption is enabled.
+ :paramtype enabled: bool
+ """
+ super().__init__(**kwargs)
+ self.enabled = enabled
+
+
class ManagedEnvironmentsCollection(_serialization.Model):
"""Collection of Environments.
@@ -8536,8 +9260,8 @@ class ManagedEnvironmentStorage(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -8739,6 +9463,64 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None:
self.enabled = enabled
+class NacosComponent(JavaComponentProperties):
+ """Nacos properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar component_type: Type of the Java Component. Required. Known values are:
+ "SpringBootAdmin", "SpringCloudEureka", "SpringCloudConfig", and "Nacos".
+ :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
+ :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
+ "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
+ :ivar configurations: List of Java Components configuration properties.
+ :vartype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :ivar service_binds: List of Java Components that are bound to the Java component.
+ :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :ivar ingress: Java Component Ingress configurations.
+ :vartype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
+ """
+
+ _validation = {
+ "component_type": {"required": True},
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "component_type": {"key": "componentType", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "configurations": {"key": "configurations", "type": "[JavaComponentConfigurationProperty]"},
+ "service_binds": {"key": "serviceBinds", "type": "[JavaComponentServiceBind]"},
+ "ingress": {"key": "ingress", "type": "JavaComponentIngress"},
+ }
+
+ def __init__(
+ self,
+ *,
+ configurations: Optional[List["_models.JavaComponentConfigurationProperty"]] = None,
+ service_binds: Optional[List["_models.JavaComponentServiceBind"]] = None,
+ ingress: Optional["_models.JavaComponentIngress"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword configurations: List of Java Components configuration properties.
+ :paramtype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :keyword service_binds: List of Java Components that are bound to the Java component.
+ :paramtype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :keyword ingress: Java Component Ingress configurations.
+ :paramtype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
+ """
+ super().__init__(configurations=configurations, service_binds=service_binds, **kwargs)
+ self.component_type: str = "Nacos"
+ self.ingress = ingress
+
+
class NfsAzureFileProperties(_serialization.Model):
"""NFS Azure File Properties.
@@ -9157,358 +9939,342 @@ def __init__(
self.headers = headers
-class PreBuildStep(_serialization.Model):
- """Model representing a pre-build step.
+class PatchCollection(_serialization.Model):
+ """Container App patch collection.
- :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
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: Collection of patch resources. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.ContainerAppsPatchResource]
+ :ivar next_link: the link to the next page of items.
+ :vartype next_link: str
"""
+ _validation = {
+ "value": {"required": True},
+ }
+
_attribute_map = {
- "description": {"key": "description", "type": "str"},
- "scripts": {"key": "scripts", "type": "[str]"},
- "http_get": {"key": "httpGet", "type": "HttpGet"},
+ "value": {"key": "value", "type": "[ContainerAppsPatchResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
- self,
- *,
- description: Optional[str] = None,
- scripts: Optional[List[str]] = None,
- http_get: Optional["_models.HttpGet"] = None,
- **kwargs: Any
+ self, *, value: List["_models.ContainerAppsPatchResource"], next_link: Optional[str] = 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
+ :keyword value: Collection of patch resources. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.ContainerAppsPatchResource]
+ :keyword next_link: the link to the next page of items.
+ :paramtype next_link: str
"""
super().__init__(**kwargs)
- self.description = description
- self.scripts = scripts
- self.http_get = http_get
+ self.value = value
+ self.next_link = next_link
-class QueueScaleRule(_serialization.Model):
- """Container App container Azure Queue based scaling rule.
+class PatchDetails(_serialization.Model):
+ """The detailed info of patch operation performing when applying a patch.
- :ivar queue_name: Queue name.
- :vartype queue_name: str
- :ivar queue_length: Queue length.
- :vartype queue_length: int
- :ivar auth: Authentication secrets for the queue scale rule.
- :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar 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 = {
- "queue_name": {"key": "queueName", "type": "str"},
- "queue_length": {"key": "queueLength", "type": "int"},
- "auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ "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,
- *,
- queue_name: Optional[str] = None,
- queue_length: Optional[int] = None,
- auth: Optional[List["_models.ScaleRuleAuth"]] = None,
- **kwargs: Any
- ) -> None:
- """
- :keyword queue_name: Queue name.
- :paramtype queue_name: str
- :keyword queue_length: Queue length.
- :paramtype queue_length: int
- :keyword auth: Authentication secrets for the queue scale rule.
- :paramtype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
- """
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
super().__init__(**kwargs)
- self.queue_name = queue_name
- self.queue_length = queue_length
- self.auth = auth
+ 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 RegistryCredentials(_serialization.Model):
- """Container App Private Registry.
+class PatchDetailsNewLayer(_serialization.Model):
+ """New layer update details in the target image.
- :ivar server: Container Registry Server.
- :vartype server: str
- :ivar username: Container Registry Username.
- :vartype username: str
- :ivar password_secret_ref: The name of the Secret that contains the registry login password.
- :vartype password_secret_ref: str
- :ivar identity: A Managed Identity to use to authenticate with Azure Container Registry. For
- user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned
- identities, use 'system'.
- :vartype identity: str
+ :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 = {
- "server": {"key": "server", "type": "str"},
- "username": {"key": "username", "type": "str"},
- "password_secret_ref": {"key": "passwordSecretRef", "type": "str"},
- "identity": {"key": "identity", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "framework_and_version": {"key": "frameworkAndVersion", "type": "str"},
+ "os_and_version": {"key": "osAndVersion", "type": "str"},
}
def __init__(
self,
*,
- server: Optional[str] = None,
- username: Optional[str] = None,
- password_secret_ref: Optional[str] = None,
- identity: Optional[str] = None,
+ name: Optional[str] = None,
+ framework_and_version: Optional[str] = None,
+ os_and_version: Optional[str] = None,
**kwargs: Any
) -> None:
"""
- :keyword server: Container Registry Server.
- :paramtype server: str
- :keyword username: Container Registry Username.
- :paramtype username: str
- :keyword password_secret_ref: The name of the Secret that contains the registry login password.
- :paramtype password_secret_ref: str
- :keyword identity: A Managed Identity to use to authenticate with Azure Container Registry. For
- user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned
- identities, use 'system'.
- :paramtype identity: str
+ :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.server = server
- self.username = username
- self.password_secret_ref = password_secret_ref
- self.identity = identity
+ self.name = name
+ self.framework_and_version = framework_and_version
+ self.os_and_version = os_and_version
-class RegistryInfo(_serialization.Model):
- """Container App registry information.
+class PatchDetailsOldLayer(_serialization.Model):
+ """The old layer details in the target image.
- :ivar registry_url: registry server Url.
- :vartype registry_url: str
- :ivar registry_user_name: registry username.
- :vartype registry_user_name: str
- :ivar registry_password: registry secret.
- :vartype registry_password: str
+ :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 = {
- "registry_url": {"key": "registryUrl", "type": "str"},
- "registry_user_name": {"key": "registryUserName", "type": "str"},
- "registry_password": {"key": "registryPassword", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "framework_and_version": {"key": "frameworkAndVersion", "type": "str"},
+ "os_and_version": {"key": "osAndVersion", "type": "str"},
}
def __init__(
self,
*,
- registry_url: Optional[str] = None,
- registry_user_name: Optional[str] = None,
- registry_password: Optional[str] = None,
+ name: Optional[str] = None,
+ framework_and_version: Optional[str] = None,
+ os_and_version: Optional[str] = None,
**kwargs: Any
) -> None:
"""
- :keyword registry_url: registry server Url.
- :paramtype registry_url: str
- :keyword registry_user_name: registry username.
- :paramtype registry_user_name: str
- :keyword registry_password: registry secret.
- :paramtype registry_password: str
+ :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.registry_url = registry_url
- self.registry_user_name = registry_user_name
- self.registry_password = registry_password
+ self.name = name
+ self.framework_and_version = framework_and_version
+ self.os_and_version = os_and_version
-class Replica(ProxyResource):
- """Container App Revision Replica.
+class PatchProperties(_serialization.Model):
+ """Top level properties that describes current states of the patch resource.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
- :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 created_time: Timestamp describing when the pod was created by controller.
- :vartype created_time: ~datetime.datetime
- :ivar running_state: Current running state of the replica. Known values are: "Running",
- "NotRunning", and "Unknown".
- :vartype running_state: str or ~azure.mgmt.appcontainers.models.ContainerAppReplicaRunningState
- :ivar running_state_details: The details of replica current running state.
- :vartype running_state_details: str
- :ivar containers: The containers collection under a replica.
- :vartype containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
- :ivar init_containers: The init containers collection under a replica.
- :vartype init_containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
+ :ivar target_environment_id: The Azure resource id of the target environment for the patch.
+ :vartype target_environment_id: str
+ :ivar target_container_app_id: The Azure resource id of the target container app for the patch.
+ :vartype target_container_app_id: str
+ :ivar target_revision_id: The Azure resource id of the target revision for the patch.
+ :vartype target_revision_id: str
+ :ivar patch_apply_status: The status of the patch operation. 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_at: The UTC timestamp that describes when the patch object was created.
+ :vartype created_at: ~datetime.datetime
+ :ivar last_modified_at: The UTC timestamp that describes when the patch object was last
+ updated.
+ :vartype last_modified_at: ~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 = {
- "id": {"readonly": True},
- "name": {"readonly": True},
- "type": {"readonly": True},
- "system_data": {"readonly": True},
- "created_time": {"readonly": True},
- "running_state": {"readonly": True},
- "running_state_details": {"readonly": True},
+ "patch_apply_status": {"readonly": True},
+ "created_at": {"readonly": True},
+ "last_modified_at": {"readonly": True},
+ "patch_details": {"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"},
- "created_time": {"key": "properties.createdTime", "type": "iso-8601"},
- "running_state": {"key": "properties.runningState", "type": "str"},
- "running_state_details": {"key": "properties.runningStateDetails", "type": "str"},
- "containers": {"key": "properties.containers", "type": "[ReplicaContainer]"},
- "init_containers": {"key": "properties.initContainers", "type": "[ReplicaContainer]"},
+ "target_environment_id": {"key": "targetEnvironmentId", "type": "str"},
+ "target_container_app_id": {"key": "targetContainerAppId", "type": "str"},
+ "target_revision_id": {"key": "targetRevisionId", "type": "str"},
+ "patch_apply_status": {"key": "patchApplyStatus", "type": "str"},
+ "created_at": {"key": "createdAt", "type": "iso-8601"},
+ "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"},
+ "patch_details": {"key": "patchDetails", "type": "[PatchDetails]"},
}
def __init__(
self,
*,
- containers: Optional[List["_models.ReplicaContainer"]] = None,
- init_containers: Optional[List["_models.ReplicaContainer"]] = None,
+ target_environment_id: Optional[str] = None,
+ target_container_app_id: Optional[str] = None,
+ target_revision_id: Optional[str] = None,
**kwargs: Any
) -> None:
"""
- :keyword containers: The containers collection under a replica.
- :paramtype containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
- :keyword init_containers: The init containers collection under a replica.
- :paramtype init_containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
+ :keyword target_environment_id: The Azure resource id of the target environment for the patch.
+ :paramtype target_environment_id: str
+ :keyword target_container_app_id: The Azure resource id of the target container app for the
+ patch.
+ :paramtype target_container_app_id: str
+ :keyword target_revision_id: The Azure resource id of the target revision for the patch.
+ :paramtype target_revision_id: str
"""
super().__init__(**kwargs)
- self.created_time = None
- self.running_state = None
- self.running_state_details = None
- self.containers = containers
- self.init_containers = init_containers
-
+ self.target_environment_id = target_environment_id
+ self.target_container_app_id = target_container_app_id
+ self.target_revision_id = target_revision_id
+ self.patch_apply_status = None
+ self.created_at = None
+ self.last_modified_at = None
+ self.patch_details = None
-class ReplicaCollection(_serialization.Model):
- """Container App Revision Replicas collection ARM resource.
- All required parameters must be populated in order to send to server.
+class PatchSkipConfig(_serialization.Model):
+ """The configuration for patcher to skip a patch or not.
- :ivar value: Collection of resources. Required.
- :vartype value: list[~azure.mgmt.appcontainers.models.Replica]
+ :ivar skip: The flag to indicate whether to skip the patch or not.
+ :vartype skip: bool
"""
- _validation = {
- "value": {"required": True},
- }
-
_attribute_map = {
- "value": {"key": "value", "type": "[Replica]"},
+ "skip": {"key": "skip", "type": "bool"},
}
- def __init__(self, *, value: List["_models.Replica"], **kwargs: Any) -> None:
+ def __init__(self, *, skip: Optional[bool] = None, **kwargs: Any) -> None:
"""
- :keyword value: Collection of resources. Required.
- :paramtype value: list[~azure.mgmt.appcontainers.models.Replica]
+ :keyword skip: The flag to indicate whether to skip the patch or not.
+ :paramtype skip: bool
"""
super().__init__(**kwargs)
- self.value = value
+ self.skip = skip
-class ReplicaContainer(_serialization.Model):
- """Container object under Container App Revision Replica.
-
- Variables are only populated by the server, and will be ignored when sending a request.
+class PreBuildStep(_serialization.Model):
+ """Model representing a pre-build step.
- :ivar name: The Name of the Container.
- :vartype name: str
- :ivar container_id: The Id of the Container.
- :vartype container_id: str
- :ivar ready: The container ready status.
- :vartype ready: bool
- :ivar started: The container start status.
- :vartype started: bool
- :ivar restart_count: The container restart count.
- :vartype restart_count: int
- :ivar running_state: Current running state of the container. Known values are: "Running",
- "Terminated", and "Waiting".
- :vartype running_state: str or
- ~azure.mgmt.appcontainers.models.ContainerAppContainerRunningState
- :ivar running_state_details: The details of container current running state.
- :vartype running_state_details: str
- :ivar log_stream_endpoint: Log Stream endpoint.
- :vartype log_stream_endpoint: str
- :ivar exec_endpoint: Container exec endpoint.
- :vartype exec_endpoint: str
+ :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
"""
- _validation = {
- "running_state": {"readonly": True},
- "running_state_details": {"readonly": True},
- "log_stream_endpoint": {"readonly": True},
- "exec_endpoint": {"readonly": True},
- }
-
_attribute_map = {
- "name": {"key": "name", "type": "str"},
- "container_id": {"key": "containerId", "type": "str"},
- "ready": {"key": "ready", "type": "bool"},
- "started": {"key": "started", "type": "bool"},
- "restart_count": {"key": "restartCount", "type": "int"},
- "running_state": {"key": "runningState", "type": "str"},
- "running_state_details": {"key": "runningStateDetails", "type": "str"},
- "log_stream_endpoint": {"key": "logStreamEndpoint", "type": "str"},
- "exec_endpoint": {"key": "execEndpoint", "type": "str"},
+ "description": {"key": "description", "type": "str"},
+ "scripts": {"key": "scripts", "type": "[str]"},
+ "http_get": {"key": "httpGet", "type": "HttpGet"},
}
def __init__(
self,
*,
- name: Optional[str] = None,
- container_id: Optional[str] = None,
- ready: Optional[bool] = None,
- started: Optional[bool] = None,
- restart_count: Optional[int] = None,
+ description: Optional[str] = None,
+ scripts: Optional[List[str]] = None,
+ http_get: Optional["_models.HttpGet"] = None,
**kwargs: Any
) -> None:
"""
- :keyword name: The Name of the Container.
- :paramtype name: str
- :keyword container_id: The Id of the Container.
- :paramtype container_id: str
- :keyword ready: The container ready status.
- :paramtype ready: bool
- :keyword started: The container start status.
- :paramtype started: bool
- :keyword restart_count: The container restart count.
- :paramtype restart_count: int
+ :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.name = name
- self.container_id = container_id
- self.ready = ready
- self.started = started
- self.restart_count = restart_count
- self.running_state = None
- self.running_state_details = None
- self.log_stream_endpoint = None
- self.exec_endpoint = None
+ self.description = description
+ self.scripts = scripts
+ self.http_get = http_get
-class Revision(ProxyResource): # pylint: disable=too-many-instance-attributes
- """Container App Revision.
+class PrivateEndpoint(_serialization.Model):
+ """The Private Endpoint resource.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource ID for the resource. Ex -
- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
+ :ivar id: The ARM identifier for Private Endpoint.
+ :vartype id: str
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.id = None
+
+
+class PrivateEndpointConnection(Resource):
+ """The Private Endpoint Connection resource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -9518,35 +10284,19 @@ class Revision(ProxyResource): # pylint: disable=too-many-instance-attributes
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.appcontainers.models.SystemData
- :ivar created_time: Timestamp describing when the revision was created
- by controller.
- :vartype created_time: ~datetime.datetime
- :ivar last_active_time: Timestamp describing when the revision was last active. Only meaningful
- when revision is inactive.
- :vartype last_active_time: ~datetime.datetime
- :ivar fqdn: Fully qualified domain name of the revision.
- :vartype fqdn: str
- :ivar template: Container App Revision Template with all possible settings and the
- defaults if user did not provide them. The defaults are populated
- as they were at the creation time.
- :vartype template: ~azure.mgmt.appcontainers.models.Template
- :ivar active: Boolean describing if the Revision is Active.
- :vartype active: bool
- :ivar replicas: Number of pods currently running for this revision.
- :vartype replicas: int
- :ivar traffic_weight: Traffic weight assigned to this revision.
- :vartype traffic_weight: int
- :ivar provisioning_error: Optional Field - Platform Error Message.
- :vartype provisioning_error: str
- :ivar health_state: Current health State of the revision. Known values are: "Healthy",
- "Unhealthy", and "None".
- :vartype health_state: str or ~azure.mgmt.appcontainers.models.RevisionHealthState
- :ivar provisioning_state: Current provisioning State of the revision. Known values are:
- "Provisioning", "Provisioned", "Failed", "Deprovisioning", and "Deprovisioned".
- :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.RevisionProvisioningState
- :ivar running_state: Current running state of the revision. Known values are: "Running",
- "Processing", "Stopped", "Degraded", "Failed", and "Unknown".
- :vartype running_state: str or ~azure.mgmt.appcontainers.models.RevisionRunningState
+ :ivar group_ids: The group ids for the private endpoint resource.
+ :vartype group_ids: list[str]
+ :ivar private_endpoint: The resource of private end point.
+ :vartype private_endpoint: ~azure.mgmt.appcontainers.models.PrivateEndpoint
+ :ivar private_link_service_connection_state: A collection of information about the state of the
+ connection between service consumer and provider.
+ :vartype private_link_service_connection_state:
+ ~azure.mgmt.appcontainers.models.PrivateLinkServiceConnectionState
+ :ivar provisioning_state: The provisioning state of the private endpoint connection resource.
+ Known values are: "Succeeded", "Failed", "Canceled", "Waiting", "Updating", "Deleting", and
+ "Pending".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.PrivateEndpointConnectionProvisioningState
"""
_validation = {
@@ -9554,17 +10304,8 @@ class Revision(ProxyResource): # pylint: disable=too-many-instance-attributes
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
- "created_time": {"readonly": True},
- "last_active_time": {"readonly": True},
- "fqdn": {"readonly": True},
- "template": {"readonly": True},
- "active": {"readonly": True},
- "replicas": {"readonly": True},
- "traffic_weight": {"readonly": True},
- "provisioning_error": {"readonly": True},
- "health_state": {"readonly": True},
+ "group_ids": {"readonly": True},
"provisioning_state": {"readonly": True},
- "running_state": {"readonly": True},
}
_attribute_map = {
@@ -9572,363 +10313,1588 @@ class Revision(ProxyResource): # pylint: disable=too-many-instance-attributes
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"system_data": {"key": "systemData", "type": "SystemData"},
- "created_time": {"key": "properties.createdTime", "type": "iso-8601"},
- "last_active_time": {"key": "properties.lastActiveTime", "type": "iso-8601"},
- "fqdn": {"key": "properties.fqdn", "type": "str"},
- "template": {"key": "properties.template", "type": "Template"},
- "active": {"key": "properties.active", "type": "bool"},
- "replicas": {"key": "properties.replicas", "type": "int"},
- "traffic_weight": {"key": "properties.trafficWeight", "type": "int"},
- "provisioning_error": {"key": "properties.provisioningError", "type": "str"},
- "health_state": {"key": "properties.healthState", "type": "str"},
+ "group_ids": {"key": "properties.groupIds", "type": "[str]"},
+ "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpoint"},
+ "private_link_service_connection_state": {
+ "key": "properties.privateLinkServiceConnectionState",
+ "type": "PrivateLinkServiceConnectionState",
+ },
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
- "running_state": {"key": "properties.runningState", "type": "str"},
}
- def __init__(self, **kwargs: Any) -> None:
- """ """
+ def __init__(
+ self,
+ *,
+ private_endpoint: Optional["_models.PrivateEndpoint"] = None,
+ private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionState"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword private_endpoint: The resource of private end point.
+ :paramtype private_endpoint: ~azure.mgmt.appcontainers.models.PrivateEndpoint
+ :keyword private_link_service_connection_state: A collection of information about the state of
+ the connection between service consumer and provider.
+ :paramtype private_link_service_connection_state:
+ ~azure.mgmt.appcontainers.models.PrivateLinkServiceConnectionState
+ """
super().__init__(**kwargs)
- self.created_time = None
- self.last_active_time = None
- self.fqdn = None
- self.template = None
- self.active = None
- self.replicas = None
- self.traffic_weight = None
- self.provisioning_error = None
- self.health_state = None
+ self.group_ids = None
+ self.private_endpoint = private_endpoint
+ self.private_link_service_connection_state = private_link_service_connection_state
self.provisioning_state = None
- self.running_state = None
-class RevisionCollection(_serialization.Model):
- """Container App Revisions collection ARM resource.
+class PrivateEndpointConnectionListResult(_serialization.Model):
+ """List of private endpoint connection associated with the specified 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 server.
-
- :ivar value: Collection of resources. Required.
- :vartype value: list[~azure.mgmt.appcontainers.models.Revision]
- :ivar next_link: Link to next page of resources.
+ :ivar value: Array of private endpoint connections.
+ :vartype value: list[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :ivar next_link: URL to get the next set of operation list results (if there are any).
:vartype next_link: str
"""
_validation = {
- "value": {"required": True},
"next_link": {"readonly": True},
}
_attribute_map = {
- "value": {"key": "value", "type": "[Revision]"},
+ "value": {"key": "value", "type": "[PrivateEndpointConnection]"},
"next_link": {"key": "nextLink", "type": "str"},
}
- def __init__(self, *, value: List["_models.Revision"], **kwargs: Any) -> None:
+ def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None:
"""
- :keyword value: Collection of resources. Required.
+ :keyword value: Array of private endpoint connections.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = None
+
+
+class PrivateLinkResource(Resource):
+ """A private link resource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :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 group_id: The private link resource group id.
+ :vartype group_id: str
+ :ivar required_members: The private link resource required member names.
+ :vartype required_members: list[str]
+ :ivar required_zone_names: The private link resource private link DNS zone name.
+ :vartype required_zone_names: list[str]
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "group_id": {"readonly": True},
+ "required_members": {"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"},
+ "group_id": {"key": "properties.groupId", "type": "str"},
+ "required_members": {"key": "properties.requiredMembers", "type": "[str]"},
+ "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"},
+ }
+
+ def __init__(self, *, required_zone_names: Optional[List[str]] = None, **kwargs: Any) -> None:
+ """
+ :keyword required_zone_names: The private link resource private link DNS zone name.
+ :paramtype required_zone_names: list[str]
+ """
+ super().__init__(**kwargs)
+ self.group_id = None
+ self.required_members = None
+ self.required_zone_names = required_zone_names
+
+
+class PrivateLinkResourceListResult(_serialization.Model):
+ """A list of private link resources.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar value: Array of private link resources.
+ :vartype value: list[~azure.mgmt.appcontainers.models.PrivateLinkResource]
+ :ivar next_link: URL to get the next set of operation list results (if there are any).
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "next_link": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[PrivateLinkResource]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: Array of private link resources.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.PrivateLinkResource]
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = None
+
+
+class PrivateLinkServiceConnectionState(_serialization.Model):
+ """A collection of information about the state of the connection between service consumer and
+ provider.
+
+ :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
+ of the service. Known values are: "Pending", "Approved", "Rejected", and "Disconnected".
+ :vartype status: str or ~azure.mgmt.appcontainers.models.PrivateEndpointServiceConnectionStatus
+ :ivar description: The reason for approval/rejection of the connection.
+ :vartype description: str
+ :ivar actions_required: A message indicating if changes on the service provider require any
+ updates on the consumer.
+ :vartype actions_required: str
+ """
+
+ _attribute_map = {
+ "status": {"key": "status", "type": "str"},
+ "description": {"key": "description", "type": "str"},
+ "actions_required": {"key": "actionsRequired", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ status: Optional[Union[str, "_models.PrivateEndpointServiceConnectionStatus"]] = None,
+ description: Optional[str] = None,
+ actions_required: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the
+ owner of the service. Known values are: "Pending", "Approved", "Rejected", and "Disconnected".
+ :paramtype status: str or
+ ~azure.mgmt.appcontainers.models.PrivateEndpointServiceConnectionStatus
+ :keyword description: The reason for approval/rejection of the connection.
+ :paramtype description: str
+ :keyword actions_required: A message indicating if changes on the service provider require any
+ updates on the consumer.
+ :paramtype actions_required: str
+ """
+ super().__init__(**kwargs)
+ self.status = status
+ self.description = description
+ self.actions_required = actions_required
+
+
+class QueueScaleRule(_serialization.Model):
+ """Container App container Azure Queue based scaling rule.
+
+ :ivar account_name: Storage account name. required if using managed identity to authenticate.
+ :vartype account_name: str
+ :ivar queue_name: Queue name.
+ :vartype queue_name: str
+ :ivar queue_length: Queue length.
+ :vartype queue_length: int
+ :ivar auth: Authentication secrets for the queue scale rule.
+ :vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :vartype identity: str
+ """
+
+ _attribute_map = {
+ "account_name": {"key": "accountName", "type": "str"},
+ "queue_name": {"key": "queueName", "type": "str"},
+ "queue_length": {"key": "queueLength", "type": "int"},
+ "auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ "identity": {"key": "identity", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ account_name: Optional[str] = None,
+ queue_name: Optional[str] = None,
+ queue_length: Optional[int] = None,
+ auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ identity: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword account_name: Storage account name. required if using managed identity to
+ authenticate.
+ :paramtype account_name: str
+ :keyword queue_name: Queue name.
+ :paramtype queue_name: str
+ :keyword queue_length: Queue length.
+ :paramtype queue_length: int
+ :keyword auth: Authentication secrets for the queue scale rule.
+ :paramtype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :keyword identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :paramtype identity: str
+ """
+ super().__init__(**kwargs)
+ self.account_name = account_name
+ self.queue_name = queue_name
+ self.queue_length = queue_length
+ self.auth = auth
+ self.identity = identity
+
+
+class RegistryCredentials(_serialization.Model):
+ """Container App Private Registry.
+
+ :ivar server: Container Registry Server.
+ :vartype server: str
+ :ivar username: Container Registry Username.
+ :vartype username: str
+ :ivar password_secret_ref: The name of the Secret that contains the registry login password.
+ :vartype password_secret_ref: str
+ :ivar identity: A Managed Identity to use to authenticate with Azure Container Registry. For
+ user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned
+ identities, use 'system'.
+ :vartype identity: str
+ """
+
+ _attribute_map = {
+ "server": {"key": "server", "type": "str"},
+ "username": {"key": "username", "type": "str"},
+ "password_secret_ref": {"key": "passwordSecretRef", "type": "str"},
+ "identity": {"key": "identity", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ server: Optional[str] = None,
+ username: Optional[str] = None,
+ password_secret_ref: Optional[str] = None,
+ identity: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword server: Container Registry Server.
+ :paramtype server: str
+ :keyword username: Container Registry Username.
+ :paramtype username: str
+ :keyword password_secret_ref: The name of the Secret that contains the registry login password.
+ :paramtype password_secret_ref: str
+ :keyword identity: A Managed Identity to use to authenticate with Azure Container Registry. For
+ user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned
+ identities, use 'system'.
+ :paramtype identity: str
+ """
+ super().__init__(**kwargs)
+ self.server = server
+ self.username = username
+ self.password_secret_ref = password_secret_ref
+ self.identity = identity
+
+
+class RegistryInfo(_serialization.Model):
+ """Container App registry information.
+
+ :ivar registry_url: registry server Url.
+ :vartype registry_url: str
+ :ivar registry_user_name: registry username.
+ :vartype registry_user_name: str
+ :ivar registry_password: registry secret.
+ :vartype registry_password: str
+ """
+
+ _attribute_map = {
+ "registry_url": {"key": "registryUrl", "type": "str"},
+ "registry_user_name": {"key": "registryUserName", "type": "str"},
+ "registry_password": {"key": "registryPassword", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ registry_url: Optional[str] = None,
+ registry_user_name: Optional[str] = None,
+ registry_password: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword registry_url: registry server Url.
+ :paramtype registry_url: str
+ :keyword registry_user_name: registry username.
+ :paramtype registry_user_name: str
+ :keyword registry_password: registry secret.
+ :paramtype registry_password: str
+ """
+ super().__init__(**kwargs)
+ self.registry_url = registry_url
+ self.registry_user_name = registry_user_name
+ self.registry_password = registry_password
+
+
+class Replica(ProxyResource):
+ """Container App Revision Replica.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :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 created_time: Timestamp describing when the pod was created by controller.
+ :vartype created_time: ~datetime.datetime
+ :ivar running_state: Current running state of the replica. Known values are: "Running",
+ "NotRunning", and "Unknown".
+ :vartype running_state: str or ~azure.mgmt.appcontainers.models.ContainerAppReplicaRunningState
+ :ivar running_state_details: The details of replica current running state.
+ :vartype running_state_details: str
+ :ivar containers: The containers collection under a replica.
+ :vartype containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
+ :ivar init_containers: The init containers collection under a replica.
+ :vartype init_containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "created_time": {"readonly": True},
+ "running_state": {"readonly": True},
+ "running_state_details": {"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"},
+ "created_time": {"key": "properties.createdTime", "type": "iso-8601"},
+ "running_state": {"key": "properties.runningState", "type": "str"},
+ "running_state_details": {"key": "properties.runningStateDetails", "type": "str"},
+ "containers": {"key": "properties.containers", "type": "[ReplicaContainer]"},
+ "init_containers": {"key": "properties.initContainers", "type": "[ReplicaContainer]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ containers: Optional[List["_models.ReplicaContainer"]] = None,
+ init_containers: Optional[List["_models.ReplicaContainer"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword containers: The containers collection under a replica.
+ :paramtype containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
+ :keyword init_containers: The init containers collection under a replica.
+ :paramtype init_containers: list[~azure.mgmt.appcontainers.models.ReplicaContainer]
+ """
+ super().__init__(**kwargs)
+ self.created_time = None
+ self.running_state = None
+ self.running_state_details = None
+ self.containers = containers
+ self.init_containers = init_containers
+
+
+class ReplicaCollection(_serialization.Model):
+ """Container App Revision Replicas collection ARM resource.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: Collection of resources. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.Replica]
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[Replica]"},
+ }
+
+ def __init__(self, *, value: List["_models.Replica"], **kwargs: Any) -> None:
+ """
+ :keyword value: Collection of resources. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.Replica]
+ """
+ super().__init__(**kwargs)
+ self.value = value
+
+
+class ReplicaContainer(_serialization.Model):
+ """Container object under Container App Revision Replica.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar name: The Name of the Container.
+ :vartype name: str
+ :ivar container_id: The Id of the Container.
+ :vartype container_id: str
+ :ivar ready: The container ready status.
+ :vartype ready: bool
+ :ivar started: The container start status.
+ :vartype started: bool
+ :ivar restart_count: The container restart count.
+ :vartype restart_count: int
+ :ivar running_state: Current running state of the container. Known values are: "Running",
+ "Terminated", and "Waiting".
+ :vartype running_state: str or
+ ~azure.mgmt.appcontainers.models.ContainerAppContainerRunningState
+ :ivar running_state_details: The details of container current running state.
+ :vartype running_state_details: str
+ :ivar log_stream_endpoint: Log Stream endpoint.
+ :vartype log_stream_endpoint: str
+ :ivar exec_endpoint: Container exec endpoint.
+ :vartype exec_endpoint: str
+ """
+
+ _validation = {
+ "running_state": {"readonly": True},
+ "running_state_details": {"readonly": True},
+ "log_stream_endpoint": {"readonly": True},
+ "exec_endpoint": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "container_id": {"key": "containerId", "type": "str"},
+ "ready": {"key": "ready", "type": "bool"},
+ "started": {"key": "started", "type": "bool"},
+ "restart_count": {"key": "restartCount", "type": "int"},
+ "running_state": {"key": "runningState", "type": "str"},
+ "running_state_details": {"key": "runningStateDetails", "type": "str"},
+ "log_stream_endpoint": {"key": "logStreamEndpoint", "type": "str"},
+ "exec_endpoint": {"key": "execEndpoint", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ container_id: Optional[str] = None,
+ ready: Optional[bool] = None,
+ started: Optional[bool] = None,
+ restart_count: Optional[int] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: The Name of the Container.
+ :paramtype name: str
+ :keyword container_id: The Id of the Container.
+ :paramtype container_id: str
+ :keyword ready: The container ready status.
+ :paramtype ready: bool
+ :keyword started: The container start status.
+ :paramtype started: bool
+ :keyword restart_count: The container restart count.
+ :paramtype restart_count: int
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.container_id = container_id
+ self.ready = ready
+ self.started = started
+ self.restart_count = restart_count
+ self.running_state = None
+ self.running_state_details = None
+ self.log_stream_endpoint = None
+ self.exec_endpoint = None
+
+
+class ReplicaExecutionStatus(_serialization.Model):
+ """Container Apps Job execution replica status.
+
+ :ivar name: Replica Name.
+ :vartype name: str
+ :ivar containers: Containers in the execution replica.
+ :vartype containers: list[~azure.mgmt.appcontainers.models.ContainerExecutionStatus]
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "containers": {"key": "containers", "type": "[ContainerExecutionStatus]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ containers: Optional[List["_models.ContainerExecutionStatus"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Replica Name.
+ :paramtype name: str
+ :keyword containers: Containers in the execution replica.
+ :paramtype containers: list[~azure.mgmt.appcontainers.models.ContainerExecutionStatus]
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.containers = containers
+
+
+class Revision(ProxyResource): # pylint: disable=too-many-instance-attributes
+ """Container App Revision.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :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 created_time: Timestamp describing when the revision was created
+ by controller.
+ :vartype created_time: ~datetime.datetime
+ :ivar last_active_time: Timestamp describing when the revision was last active. Only meaningful
+ when revision is inactive.
+ :vartype last_active_time: ~datetime.datetime
+ :ivar fqdn: Fully qualified domain name of the revision.
+ :vartype fqdn: str
+ :ivar template: Container App Revision Template with all possible settings and the
+ defaults if user did not provide them. The defaults are populated
+ as they were at the creation time.
+ :vartype template: ~azure.mgmt.appcontainers.models.Template
+ :ivar active: Boolean describing if the Revision is Active.
+ :vartype active: bool
+ :ivar replicas: Number of pods currently running for this revision.
+ :vartype replicas: int
+ :ivar traffic_weight: Traffic weight assigned to this revision.
+ :vartype traffic_weight: int
+ :ivar provisioning_error: Optional Field - Platform Error Message.
+ :vartype provisioning_error: str
+ :ivar health_state: Current health State of the revision. Known values are: "Healthy",
+ "Unhealthy", and "None".
+ :vartype health_state: str or ~azure.mgmt.appcontainers.models.RevisionHealthState
+ :ivar provisioning_state: Current provisioning State of the revision. Known values are:
+ "Provisioning", "Provisioned", "Failed", "Deprovisioning", and "Deprovisioned".
+ :vartype provisioning_state: str or ~azure.mgmt.appcontainers.models.RevisionProvisioningState
+ :ivar running_state: Current running state of the revision. Known values are: "Running",
+ "Processing", "Stopped", "Degraded", "Failed", and "Unknown".
+ :vartype running_state: str or ~azure.mgmt.appcontainers.models.RevisionRunningState
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "created_time": {"readonly": True},
+ "last_active_time": {"readonly": True},
+ "fqdn": {"readonly": True},
+ "template": {"readonly": True},
+ "active": {"readonly": True},
+ "replicas": {"readonly": True},
+ "traffic_weight": {"readonly": True},
+ "provisioning_error": {"readonly": True},
+ "health_state": {"readonly": True},
+ "provisioning_state": {"readonly": True},
+ "running_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"},
+ "created_time": {"key": "properties.createdTime", "type": "iso-8601"},
+ "last_active_time": {"key": "properties.lastActiveTime", "type": "iso-8601"},
+ "fqdn": {"key": "properties.fqdn", "type": "str"},
+ "template": {"key": "properties.template", "type": "Template"},
+ "active": {"key": "properties.active", "type": "bool"},
+ "replicas": {"key": "properties.replicas", "type": "int"},
+ "traffic_weight": {"key": "properties.trafficWeight", "type": "int"},
+ "provisioning_error": {"key": "properties.provisioningError", "type": "str"},
+ "health_state": {"key": "properties.healthState", "type": "str"},
+ "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
+ "running_state": {"key": "properties.runningState", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.created_time = None
+ self.last_active_time = None
+ self.fqdn = None
+ self.template = None
+ self.active = None
+ self.replicas = None
+ self.traffic_weight = None
+ self.provisioning_error = None
+ self.health_state = None
+ self.provisioning_state = None
+ self.running_state = None
+
+
+class RevisionCollection(_serialization.Model):
+ """Container App Revisions collection ARM 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 server.
+
+ :ivar value: Collection of resources. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.Revision]
+ :ivar next_link: Link to next page of resources.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ "next_link": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[Revision]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(self, *, value: List["_models.Revision"], **kwargs: Any) -> None:
+ """
+ :keyword value: Collection of resources. Required.
:paramtype value: list[~azure.mgmt.appcontainers.models.Revision]
"""
super().__init__(**kwargs)
- self.value = value
- self.next_link = None
+ self.value = value
+ self.next_link = None
+
+
+class Runtime(_serialization.Model):
+ """Container App Runtime configuration.
+
+ :ivar java: Java app configuration.
+ :vartype java: ~azure.mgmt.appcontainers.models.RuntimeJava
+ :ivar dotnet: .NET app configuration.
+ :vartype dotnet: ~azure.mgmt.appcontainers.models.RuntimeDotnet
+ """
+
+ _attribute_map = {
+ "java": {"key": "java", "type": "RuntimeJava"},
+ "dotnet": {"key": "dotnet", "type": "RuntimeDotnet"},
+ }
+
+ def __init__(
+ self,
+ *,
+ java: Optional["_models.RuntimeJava"] = None,
+ dotnet: Optional["_models.RuntimeDotnet"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword java: Java app configuration.
+ :paramtype java: ~azure.mgmt.appcontainers.models.RuntimeJava
+ :keyword dotnet: .NET app configuration.
+ :paramtype dotnet: ~azure.mgmt.appcontainers.models.RuntimeDotnet
+ """
+ super().__init__(**kwargs)
+ self.java = java
+ self.dotnet = dotnet
+
+
+class RuntimeDotnet(_serialization.Model):
+ """.NET app configuration.
+
+ :ivar auto_configure_data_protection: Auto configure the ASP.NET Core Data Protection feature.
+ :vartype auto_configure_data_protection: bool
+ """
+
+ _attribute_map = {
+ "auto_configure_data_protection": {"key": "autoConfigureDataProtection", "type": "bool"},
+ }
+
+ def __init__(self, *, auto_configure_data_protection: Optional[bool] = None, **kwargs: Any) -> None:
+ """
+ :keyword auto_configure_data_protection: Auto configure the ASP.NET Core Data Protection
+ feature.
+ :paramtype auto_configure_data_protection: bool
+ """
+ super().__init__(**kwargs)
+ self.auto_configure_data_protection = auto_configure_data_protection
+
+
+class RuntimeJava(_serialization.Model):
+ """Java app configuration.
+
+ :ivar enable_metrics: Enable jmx core metrics for the java app.
+ :vartype enable_metrics: bool
+ :ivar java_agent: Diagnostic capabilities achieved by java agent.
+ :vartype java_agent: ~azure.mgmt.appcontainers.models.RuntimeJavaAgent
+ """
+
+ _attribute_map = {
+ "enable_metrics": {"key": "enableMetrics", "type": "bool"},
+ "java_agent": {"key": "javaAgent", "type": "RuntimeJavaAgent"},
+ }
+
+ def __init__(
+ self,
+ *,
+ enable_metrics: Optional[bool] = None,
+ java_agent: Optional["_models.RuntimeJavaAgent"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword enable_metrics: Enable jmx core metrics for the java app.
+ :paramtype enable_metrics: bool
+ :keyword java_agent: Diagnostic capabilities achieved by java agent.
+ :paramtype java_agent: ~azure.mgmt.appcontainers.models.RuntimeJavaAgent
+ """
+ super().__init__(**kwargs)
+ self.enable_metrics = enable_metrics
+ self.java_agent = java_agent
+
+
+class RuntimeJavaAgent(_serialization.Model):
+ """Diagnostic capabilities achieved by java agent.
+
+ :ivar enabled: Enable java agent injection for the java app.
+ :vartype enabled: bool
+ :ivar logging: Capabilities on the java logging scenario.
+ :vartype logging: ~azure.mgmt.appcontainers.models.RuntimeJavaAgentLogging
+ """
+
+ _attribute_map = {
+ "enabled": {"key": "enabled", "type": "bool"},
+ "logging": {"key": "logging", "type": "RuntimeJavaAgentLogging"},
+ }
+
+ def __init__(
+ self,
+ *,
+ enabled: Optional[bool] = None,
+ logging: Optional["_models.RuntimeJavaAgentLogging"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword enabled: Enable java agent injection for the java app.
+ :paramtype enabled: bool
+ :keyword logging: Capabilities on the java logging scenario.
+ :paramtype logging: ~azure.mgmt.appcontainers.models.RuntimeJavaAgentLogging
+ """
+ super().__init__(**kwargs)
+ self.enabled = enabled
+ self.logging = logging
+
+
+class RuntimeJavaAgentLogging(_serialization.Model):
+ """Capabilities on the java logging scenario.
+
+ :ivar logger_settings: Settings of the logger for the java app.
+ :vartype logger_settings: list[~azure.mgmt.appcontainers.models.LoggerSetting]
+ """
+
+ _attribute_map = {
+ "logger_settings": {"key": "loggerSettings", "type": "[LoggerSetting]"},
+ }
+
+ def __init__(self, *, logger_settings: Optional[List["_models.LoggerSetting"]] = None, **kwargs: Any) -> None:
+ """
+ :keyword logger_settings: Settings of the logger for the java app.
+ :paramtype logger_settings: list[~azure.mgmt.appcontainers.models.LoggerSetting]
+ """
+ super().__init__(**kwargs)
+ self.logger_settings = logger_settings
+
+
+class Scale(_serialization.Model):
+ """Container App scaling configurations.
+
+ :ivar min_replicas: Optional. Minimum number of container replicas.
+ :vartype min_replicas: int
+ :ivar max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not set.
+ :vartype max_replicas: int
+ :ivar rules: Scaling rules.
+ :vartype rules: list[~azure.mgmt.appcontainers.models.ScaleRule]
+ """
+
+ _attribute_map = {
+ "min_replicas": {"key": "minReplicas", "type": "int"},
+ "max_replicas": {"key": "maxReplicas", "type": "int"},
+ "rules": {"key": "rules", "type": "[ScaleRule]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ min_replicas: Optional[int] = None,
+ max_replicas: int = 10,
+ rules: Optional[List["_models.ScaleRule"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword min_replicas: Optional. Minimum number of container replicas.
+ :paramtype min_replicas: int
+ :keyword max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not
+ set.
+ :paramtype max_replicas: int
+ :keyword rules: Scaling rules.
+ :paramtype rules: list[~azure.mgmt.appcontainers.models.ScaleRule]
+ """
+ super().__init__(**kwargs)
+ self.min_replicas = min_replicas
+ self.max_replicas = max_replicas
+ self.rules = rules
+
+
+class ScaleConfiguration(_serialization.Model):
+ """Scale configuration.
+
+ :ivar max_concurrent_sessions: The maximum count of sessions at the same time.
+ :vartype max_concurrent_sessions: int
+ :ivar ready_session_instances: The minimum count of ready session instances.
+ :vartype ready_session_instances: int
+ """
+
+ _attribute_map = {
+ "max_concurrent_sessions": {"key": "maxConcurrentSessions", "type": "int"},
+ "ready_session_instances": {"key": "readySessionInstances", "type": "int"},
+ }
+
+ def __init__(
+ self,
+ *,
+ max_concurrent_sessions: Optional[int] = None,
+ ready_session_instances: Optional[int] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword max_concurrent_sessions: The maximum count of sessions at the same time.
+ :paramtype max_concurrent_sessions: int
+ :keyword ready_session_instances: The minimum count of ready session instances.
+ :paramtype ready_session_instances: int
+ """
+ super().__init__(**kwargs)
+ self.max_concurrent_sessions = max_concurrent_sessions
+ self.ready_session_instances = ready_session_instances
+
+
+class ScaleRule(_serialization.Model):
+ """Container App container scaling rule.
+
+ :ivar name: Scale Rule Name.
+ :vartype name: str
+ :ivar azure_queue: Azure Queue based scaling.
+ :vartype azure_queue: ~azure.mgmt.appcontainers.models.QueueScaleRule
+ :ivar custom: Custom scale rule.
+ :vartype custom: ~azure.mgmt.appcontainers.models.CustomScaleRule
+ :ivar http: HTTP requests based scaling.
+ :vartype http: ~azure.mgmt.appcontainers.models.HttpScaleRule
+ :ivar tcp: Tcp requests based scaling.
+ :vartype tcp: ~azure.mgmt.appcontainers.models.TcpScaleRule
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "azure_queue": {"key": "azureQueue", "type": "QueueScaleRule"},
+ "custom": {"key": "custom", "type": "CustomScaleRule"},
+ "http": {"key": "http", "type": "HttpScaleRule"},
+ "tcp": {"key": "tcp", "type": "TcpScaleRule"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ azure_queue: Optional["_models.QueueScaleRule"] = None,
+ custom: Optional["_models.CustomScaleRule"] = None,
+ http: Optional["_models.HttpScaleRule"] = None,
+ tcp: Optional["_models.TcpScaleRule"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Scale Rule Name.
+ :paramtype name: str
+ :keyword azure_queue: Azure Queue based scaling.
+ :paramtype azure_queue: ~azure.mgmt.appcontainers.models.QueueScaleRule
+ :keyword custom: Custom scale rule.
+ :paramtype custom: ~azure.mgmt.appcontainers.models.CustomScaleRule
+ :keyword http: HTTP requests based scaling.
+ :paramtype http: ~azure.mgmt.appcontainers.models.HttpScaleRule
+ :keyword tcp: Tcp requests based scaling.
+ :paramtype tcp: ~azure.mgmt.appcontainers.models.TcpScaleRule
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.azure_queue = azure_queue
+ self.custom = custom
+ self.http = http
+ self.tcp = tcp
+
+
+class ScaleRuleAuth(_serialization.Model):
+ """Auth Secrets for Scale Rule.
+
+ :ivar secret_ref: Name of the secret from which to pull the auth params.
+ :vartype secret_ref: str
+ :ivar trigger_parameter: Trigger Parameter that uses the secret.
+ :vartype trigger_parameter: str
+ """
+
+ _attribute_map = {
+ "secret_ref": {"key": "secretRef", "type": "str"},
+ "trigger_parameter": {"key": "triggerParameter", "type": "str"},
+ }
+
+ def __init__(
+ self, *, secret_ref: Optional[str] = None, trigger_parameter: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword secret_ref: Name of the secret from which to pull the auth params.
+ :paramtype secret_ref: str
+ :keyword trigger_parameter: Trigger Parameter that uses the secret.
+ :paramtype trigger_parameter: str
+ """
+ super().__init__(**kwargs)
+ self.secret_ref = secret_ref
+ self.trigger_parameter = trigger_parameter
+
+
+class Secret(_serialization.Model):
+ """Secret definition.
+
+ :ivar name: Secret Name.
+ :vartype name: str
+ :ivar value: Secret Value.
+ :vartype value: str
+ :ivar identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
+ System to use a system-assigned identity.
+ :vartype identity: str
+ :ivar key_vault_url: Azure Key Vault URL pointing to the secret referenced by the container
+ app.
+ :vartype key_vault_url: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "value": {"key": "value", "type": "str"},
+ "identity": {"key": "identity", "type": "str"},
+ "key_vault_url": {"key": "keyVaultUrl", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ value: Optional[str] = None,
+ identity: Optional[str] = None,
+ key_vault_url: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Secret Name.
+ :paramtype name: str
+ :keyword value: Secret Value.
+ :paramtype value: str
+ :keyword identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
+ System to use a system-assigned identity.
+ :paramtype identity: str
+ :keyword key_vault_url: Azure Key Vault URL pointing to the secret referenced by the container
+ app.
+ :paramtype key_vault_url: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.value = value
+ self.identity = identity
+ self.key_vault_url = key_vault_url
+
+
+class SecretAutoGenerated(_serialization.Model):
+ """Secret definition.
+
+ :ivar name: Secret Name.
+ :vartype name: str
+ :ivar value: Secret Value.
+ :vartype value: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "value": {"key": "value", "type": "str"},
+ }
+
+ def __init__(self, *, name: Optional[str] = None, value: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword name: Secret Name.
+ :paramtype name: str
+ :keyword value: Secret Value.
+ :paramtype value: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.value = value
+
+
+class SecretsCollection(_serialization.Model):
+ """Container App Secrets Collection ARM resource.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: Collection of resources. Required.
+ :vartype value: list[~azure.mgmt.appcontainers.models.ContainerAppSecret]
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[ContainerAppSecret]"},
+ }
+
+ def __init__(self, *, value: List["_models.ContainerAppSecret"], **kwargs: Any) -> None:
+ """
+ :keyword value: Collection of resources. Required.
+ :paramtype value: list[~azure.mgmt.appcontainers.models.ContainerAppSecret]
+ """
+ super().__init__(**kwargs)
+ self.value = value
+
+
+class SecretVolumeItem(_serialization.Model):
+ """Secret to be added to volume.
+
+ :ivar secret_ref: Name of the Container App secret from which to pull the secret value.
+ :vartype secret_ref: str
+ :ivar path: Path to project secret to. If no path is provided, path defaults to name of secret
+ listed in secretRef.
+ :vartype path: str
+ """
+
+ _attribute_map = {
+ "secret_ref": {"key": "secretRef", "type": "str"},
+ "path": {"key": "path", "type": "str"},
+ }
+
+ def __init__(self, *, secret_ref: Optional[str] = None, path: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword secret_ref: Name of the Container App secret from which to pull the secret value.
+ :paramtype secret_ref: str
+ :keyword path: Path to project secret to. If no path is provided, path defaults to name of
+ secret listed in secretRef.
+ :paramtype path: str
+ """
+ super().__init__(**kwargs)
+ self.secret_ref = secret_ref
+ self.path = path
+
+
+class Service(_serialization.Model):
+ """Container App to be a dev service.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar type: Dev ContainerApp service type. Required.
+ :vartype type: str
+ """
+
+ _validation = {
+ "type": {"required": True},
+ }
+
+ _attribute_map = {
+ "type": {"key": "type", "type": "str"},
+ }
+
+ def __init__(self, *, type: str, **kwargs: Any) -> None:
+ """
+ :keyword type: Dev ContainerApp service type. Required.
+ :paramtype type: str
+ """
+ super().__init__(**kwargs)
+ self.type = type
-class Scale(_serialization.Model):
- """Container App scaling configurations.
+class ServiceBind(_serialization.Model):
+ """Configuration to bind a ContainerApp to a dev ContainerApp Service.
- :ivar min_replicas: Optional. Minimum number of container replicas.
- :vartype min_replicas: int
- :ivar max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not set.
- :vartype max_replicas: int
- :ivar rules: Scaling rules.
- :vartype rules: list[~azure.mgmt.appcontainers.models.ScaleRule]
+ :ivar service_id: Resource id of the target service.
+ :vartype service_id: str
+ :ivar name: Name of the service bind.
+ :vartype name: str
+ :ivar client_type: Type of the client to be used to connect to the service.
+ :vartype client_type: str
+ :ivar customized_keys: Customized keys for customizing injected values to the app.
+ :vartype customized_keys: dict[str, str]
"""
_attribute_map = {
- "min_replicas": {"key": "minReplicas", "type": "int"},
- "max_replicas": {"key": "maxReplicas", "type": "int"},
- "rules": {"key": "rules", "type": "[ScaleRule]"},
+ "service_id": {"key": "serviceId", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "client_type": {"key": "clientType", "type": "str"},
+ "customized_keys": {"key": "customizedKeys", "type": "{str}"},
}
def __init__(
self,
*,
- min_replicas: Optional[int] = None,
- max_replicas: int = 10,
- rules: Optional[List["_models.ScaleRule"]] = None,
+ service_id: Optional[str] = None,
+ name: Optional[str] = None,
+ client_type: Optional[str] = None,
+ customized_keys: Optional[Dict[str, str]] = None,
**kwargs: Any
) -> None:
"""
- :keyword min_replicas: Optional. Minimum number of container replicas.
- :paramtype min_replicas: int
- :keyword max_replicas: Optional. Maximum number of container replicas. Defaults to 10 if not
- set.
- :paramtype max_replicas: int
- :keyword rules: Scaling rules.
- :paramtype rules: list[~azure.mgmt.appcontainers.models.ScaleRule]
+ :keyword service_id: Resource id of the target service.
+ :paramtype service_id: str
+ :keyword name: Name of the service bind.
+ :paramtype name: str
+ :keyword client_type: Type of the client to be used to connect to the service.
+ :paramtype client_type: str
+ :keyword customized_keys: Customized keys for customizing injected values to the app.
+ :paramtype customized_keys: dict[str, str]
"""
super().__init__(**kwargs)
- self.min_replicas = min_replicas
- self.max_replicas = max_replicas
- self.rules = rules
+ self.service_id = service_id
+ self.name = name
+ self.client_type = client_type
+ self.customized_keys = customized_keys
-class ScaleRule(_serialization.Model):
- """Container App container scaling rule.
+class SessionContainer(_serialization.Model):
+ """Container definitions for the sessions of the session pool.
- :ivar name: Scale Rule Name.
+ :ivar image: Container image tag.
+ :vartype image: str
+ :ivar name: Custom container name.
:vartype name: str
- :ivar azure_queue: Azure Queue based scaling.
- :vartype azure_queue: ~azure.mgmt.appcontainers.models.QueueScaleRule
- :ivar custom: Custom scale rule.
- :vartype custom: ~azure.mgmt.appcontainers.models.CustomScaleRule
- :ivar http: HTTP requests based scaling.
- :vartype http: ~azure.mgmt.appcontainers.models.HttpScaleRule
- :ivar tcp: Tcp requests based scaling.
- :vartype tcp: ~azure.mgmt.appcontainers.models.TcpScaleRule
+ :ivar command: Container start command.
+ :vartype command: list[str]
+ :ivar args: Container start command arguments.
+ :vartype args: list[str]
+ :ivar env: Container environment variables.
+ :vartype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
+ :ivar resources: Container resource requirements.
+ :vartype resources: ~azure.mgmt.appcontainers.models.SessionContainerResources
"""
_attribute_map = {
+ "image": {"key": "image", "type": "str"},
"name": {"key": "name", "type": "str"},
- "azure_queue": {"key": "azureQueue", "type": "QueueScaleRule"},
- "custom": {"key": "custom", "type": "CustomScaleRule"},
- "http": {"key": "http", "type": "HttpScaleRule"},
- "tcp": {"key": "tcp", "type": "TcpScaleRule"},
+ "command": {"key": "command", "type": "[str]"},
+ "args": {"key": "args", "type": "[str]"},
+ "env": {"key": "env", "type": "[EnvironmentVar]"},
+ "resources": {"key": "resources", "type": "SessionContainerResources"},
}
def __init__(
self,
*,
+ image: Optional[str] = None,
name: Optional[str] = None,
- azure_queue: Optional["_models.QueueScaleRule"] = None,
- custom: Optional["_models.CustomScaleRule"] = None,
- http: Optional["_models.HttpScaleRule"] = None,
- tcp: Optional["_models.TcpScaleRule"] = None,
+ command: Optional[List[str]] = None,
+ args: Optional[List[str]] = None,
+ env: Optional[List["_models.EnvironmentVar"]] = None,
+ resources: Optional["_models.SessionContainerResources"] = None,
**kwargs: Any
) -> None:
"""
- :keyword name: Scale Rule Name.
+ :keyword image: Container image tag.
+ :paramtype image: str
+ :keyword name: Custom container name.
:paramtype name: str
- :keyword azure_queue: Azure Queue based scaling.
- :paramtype azure_queue: ~azure.mgmt.appcontainers.models.QueueScaleRule
- :keyword custom: Custom scale rule.
- :paramtype custom: ~azure.mgmt.appcontainers.models.CustomScaleRule
- :keyword http: HTTP requests based scaling.
- :paramtype http: ~azure.mgmt.appcontainers.models.HttpScaleRule
- :keyword tcp: Tcp requests based scaling.
- :paramtype tcp: ~azure.mgmt.appcontainers.models.TcpScaleRule
+ :keyword command: Container start command.
+ :paramtype command: list[str]
+ :keyword args: Container start command arguments.
+ :paramtype args: list[str]
+ :keyword env: Container environment variables.
+ :paramtype env: list[~azure.mgmt.appcontainers.models.EnvironmentVar]
+ :keyword resources: Container resource requirements.
+ :paramtype resources: ~azure.mgmt.appcontainers.models.SessionContainerResources
"""
super().__init__(**kwargs)
+ self.image = image
self.name = name
- self.azure_queue = azure_queue
- self.custom = custom
- self.http = http
- self.tcp = tcp
+ self.command = command
+ self.args = args
+ self.env = env
+ self.resources = resources
-class ScaleRuleAuth(_serialization.Model):
- """Auth Secrets for Scale Rule.
+class SessionContainerResources(_serialization.Model):
+ """Container resource requirements for sessions of the session pool.
- :ivar secret_ref: Name of the secret from which to pull the auth params.
- :vartype secret_ref: str
- :ivar trigger_parameter: Trigger Parameter that uses the secret.
- :vartype trigger_parameter: str
+ :ivar cpu: Required CPU in cores, e.g. 0.5.
+ :vartype cpu: float
+ :ivar memory: Required memory, e.g. "250Mb".
+ :vartype memory: str
"""
_attribute_map = {
- "secret_ref": {"key": "secretRef", "type": "str"},
- "trigger_parameter": {"key": "triggerParameter", "type": "str"},
+ "cpu": {"key": "cpu", "type": "float"},
+ "memory": {"key": "memory", "type": "str"},
}
- def __init__(
- self, *, secret_ref: Optional[str] = None, trigger_parameter: Optional[str] = None, **kwargs: Any
- ) -> None:
+ def __init__(self, *, cpu: Optional[float] = None, memory: Optional[str] = None, **kwargs: Any) -> None:
"""
- :keyword secret_ref: Name of the secret from which to pull the auth params.
- :paramtype secret_ref: str
- :keyword trigger_parameter: Trigger Parameter that uses the secret.
- :paramtype trigger_parameter: str
+ :keyword cpu: Required CPU in cores, e.g. 0.5.
+ :paramtype cpu: float
+ :keyword memory: Required memory, e.g. "250Mb".
+ :paramtype memory: str
"""
super().__init__(**kwargs)
- self.secret_ref = secret_ref
- self.trigger_parameter = trigger_parameter
+ self.cpu = cpu
+ self.memory = memory
-class Secret(_serialization.Model):
- """Secret definition.
+class SessionIngress(_serialization.Model):
+ """Session pool ingress configuration.
- :ivar name: Secret Name.
+ :ivar target_port: Target port in containers for traffic from ingress.
+ :vartype target_port: int
+ """
+
+ _attribute_map = {
+ "target_port": {"key": "targetPort", "type": "int"},
+ }
+
+ def __init__(self, *, target_port: Optional[int] = None, **kwargs: Any) -> None:
+ """
+ :keyword target_port: Target port in containers for traffic from ingress.
+ :paramtype target_port: int
+ """
+ super().__init__(**kwargs)
+ self.target_port = target_port
+
+
+class SessionNetworkConfiguration(_serialization.Model):
+ """Session network configuration.
+
+ :ivar status: Network status for the sessions. Known values are: "EgressEnabled" and
+ "EgressDisabled".
+ :vartype status: str or ~azure.mgmt.appcontainers.models.SessionNetworkStatus
+ """
+
+ _attribute_map = {
+ "status": {"key": "status", "type": "str"},
+ }
+
+ def __init__(self, *, status: Optional[Union[str, "_models.SessionNetworkStatus"]] = None, **kwargs: Any) -> None:
+ """
+ :keyword status: Network status for the sessions. Known values are: "EgressEnabled" and
+ "EgressDisabled".
+ :paramtype status: str or ~azure.mgmt.appcontainers.models.SessionNetworkStatus
+ """
+ super().__init__(**kwargs)
+ self.status = status
+
+
+class SessionPool(TrackedResource): # pylint: disable=too-many-instance-attributes
+ """Container App session pool.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
:vartype name: str
- :ivar value: Secret Value.
- :vartype value: str
- :ivar identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
- System to use a system-assigned identity.
- :vartype identity: str
- :ivar key_vault_url: Azure Key Vault URL pointing to the secret referenced by the container
- app.
- :vartype key_vault_url: 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 environment_id: Resource ID of the session pool's environment.
+ :vartype environment_id: str
+ :ivar container_type: The container type of the sessions. Known values are: "CustomContainer"
+ and "PythonLTS".
+ :vartype container_type: str or ~azure.mgmt.appcontainers.models.ContainerType
+ :ivar pool_management_type: The pool management type of the session pool. Known values are:
+ "Manual" and "Dynamic".
+ :vartype pool_management_type: str or ~azure.mgmt.appcontainers.models.PoolManagementType
+ :ivar node_count: The number of nodes the session pool is using.
+ :vartype node_count: int
+ :ivar scale_configuration: The scale configuration of the session pool.
+ :vartype scale_configuration: ~azure.mgmt.appcontainers.models.ScaleConfiguration
+ :ivar secrets: The secrets of the session pool.
+ :vartype secrets: list[~azure.mgmt.appcontainers.models.SecretAutoGenerated]
+ :ivar dynamic_pool_configuration: The pool configuration if the poolManagementType is dynamic.
+ :vartype dynamic_pool_configuration: ~azure.mgmt.appcontainers.models.DynamicPoolConfiguration
+ :ivar custom_container_template: The custom container configuration if the containerType is
+ CustomContainer.
+ :vartype custom_container_template: ~azure.mgmt.appcontainers.models.CustomContainerTemplate
+ :ivar session_network_configuration: The network configuration of the sessions in the session
+ pool.
+ :vartype session_network_configuration:
+ ~azure.mgmt.appcontainers.models.SessionNetworkConfiguration
+ :ivar pool_management_endpoint: The endpoint to manage the pool.
+ :vartype pool_management_endpoint: str
+ :ivar provisioning_state: Provisioning state of the session pool. Known values are:
+ "InProgress", "Succeeded", "Failed", "Canceled", and "Deleting".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.SessionPoolProvisioningState
"""
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
+ "node_count": {"readonly": True},
+ "pool_management_endpoint": {"readonly": True},
+ "provisioning_state": {"readonly": True},
+ }
+
_attribute_map = {
+ "id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
- "value": {"key": "value", "type": "str"},
- "identity": {"key": "identity", "type": "str"},
- "key_vault_url": {"key": "keyVaultUrl", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "location": {"key": "location", "type": "str"},
+ "environment_id": {"key": "properties.environmentId", "type": "str"},
+ "container_type": {"key": "properties.containerType", "type": "str"},
+ "pool_management_type": {"key": "properties.poolManagementType", "type": "str"},
+ "node_count": {"key": "properties.nodeCount", "type": "int"},
+ "scale_configuration": {"key": "properties.scaleConfiguration", "type": "ScaleConfiguration"},
+ "secrets": {"key": "properties.secrets", "type": "[SecretAutoGenerated]"},
+ "dynamic_pool_configuration": {
+ "key": "properties.dynamicPoolConfiguration",
+ "type": "DynamicPoolConfiguration",
+ },
+ "custom_container_template": {"key": "properties.customContainerTemplate", "type": "CustomContainerTemplate"},
+ "session_network_configuration": {
+ "key": "properties.sessionNetworkConfiguration",
+ "type": "SessionNetworkConfiguration",
+ },
+ "pool_management_endpoint": {"key": "properties.poolManagementEndpoint", "type": "str"},
+ "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
}
def __init__(
self,
*,
- name: Optional[str] = None,
- value: Optional[str] = None,
- identity: Optional[str] = None,
- key_vault_url: Optional[str] = None,
- **kwargs: Any
- ) -> None:
- """
- :keyword name: Secret Name.
- :paramtype name: str
- :keyword value: Secret Value.
- :paramtype value: str
- :keyword identity: Resource ID of a managed identity to authenticate with Azure Key Vault, or
- System to use a system-assigned identity.
- :paramtype identity: str
- :keyword key_vault_url: Azure Key Vault URL pointing to the secret referenced by the container
- app.
- :paramtype key_vault_url: str
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ environment_id: Optional[str] = None,
+ container_type: Optional[Union[str, "_models.ContainerType"]] = None,
+ pool_management_type: Optional[Union[str, "_models.PoolManagementType"]] = None,
+ scale_configuration: Optional["_models.ScaleConfiguration"] = None,
+ secrets: Optional[List["_models.SecretAutoGenerated"]] = None,
+ dynamic_pool_configuration: Optional["_models.DynamicPoolConfiguration"] = None,
+ custom_container_template: Optional["_models.CustomContainerTemplate"] = None,
+ session_network_configuration: Optional["_models.SessionNetworkConfiguration"] = None,
+ **kwargs: Any
+ ) -> None:
"""
- super().__init__(**kwargs)
- self.name = name
- self.value = value
- self.identity = identity
- self.key_vault_url = key_vault_url
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword location: The geo-location where the resource lives. Required.
+ :paramtype location: str
+ :keyword environment_id: Resource ID of the session pool's environment.
+ :paramtype environment_id: str
+ :keyword container_type: The container type of the sessions. Known values are:
+ "CustomContainer" and "PythonLTS".
+ :paramtype container_type: str or ~azure.mgmt.appcontainers.models.ContainerType
+ :keyword pool_management_type: The pool management type of the session pool. Known values are:
+ "Manual" and "Dynamic".
+ :paramtype pool_management_type: str or ~azure.mgmt.appcontainers.models.PoolManagementType
+ :keyword scale_configuration: The scale configuration of the session pool.
+ :paramtype scale_configuration: ~azure.mgmt.appcontainers.models.ScaleConfiguration
+ :keyword secrets: The secrets of the session pool.
+ :paramtype secrets: list[~azure.mgmt.appcontainers.models.SecretAutoGenerated]
+ :keyword dynamic_pool_configuration: The pool configuration if the poolManagementType is
+ dynamic.
+ :paramtype dynamic_pool_configuration:
+ ~azure.mgmt.appcontainers.models.DynamicPoolConfiguration
+ :keyword custom_container_template: The custom container configuration if the containerType is
+ CustomContainer.
+ :paramtype custom_container_template: ~azure.mgmt.appcontainers.models.CustomContainerTemplate
+ :keyword session_network_configuration: The network configuration of the sessions in the
+ session pool.
+ :paramtype session_network_configuration:
+ ~azure.mgmt.appcontainers.models.SessionNetworkConfiguration
+ """
+ super().__init__(tags=tags, location=location, **kwargs)
+ self.environment_id = environment_id
+ self.container_type = container_type
+ self.pool_management_type = pool_management_type
+ self.node_count = None
+ self.scale_configuration = scale_configuration
+ self.secrets = secrets
+ self.dynamic_pool_configuration = dynamic_pool_configuration
+ self.custom_container_template = custom_container_template
+ self.session_network_configuration = session_network_configuration
+ self.pool_management_endpoint = None
+ self.provisioning_state = None
-class SecretsCollection(_serialization.Model):
- """Container App Secrets Collection ARM resource.
+class SessionPoolCollection(_serialization.Model):
+ """Session pool collection Azure 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 server.
:ivar value: Collection of resources. Required.
- :vartype value: list[~azure.mgmt.appcontainers.models.ContainerAppSecret]
+ :vartype value: list[~azure.mgmt.appcontainers.models.SessionPool]
+ :ivar next_link: Link to next page of resources.
+ :vartype next_link: str
"""
_validation = {
"value": {"required": True},
+ "next_link": {"readonly": True},
}
_attribute_map = {
- "value": {"key": "value", "type": "[ContainerAppSecret]"},
+ "value": {"key": "value", "type": "[SessionPool]"},
+ "next_link": {"key": "nextLink", "type": "str"},
}
- def __init__(self, *, value: List["_models.ContainerAppSecret"], **kwargs: Any) -> None:
+ def __init__(self, *, value: List["_models.SessionPool"], **kwargs: Any) -> None:
"""
:keyword value: Collection of resources. Required.
- :paramtype value: list[~azure.mgmt.appcontainers.models.ContainerAppSecret]
+ :paramtype value: list[~azure.mgmt.appcontainers.models.SessionPool]
"""
super().__init__(**kwargs)
self.value = value
+ self.next_link = None
-class SecretVolumeItem(_serialization.Model):
- """Secret to be added to volume.
-
- :ivar secret_ref: Name of the Container App secret from which to pull the secret value.
- :vartype secret_ref: str
- :ivar path: Path to project secret to. If no path is provided, path defaults to name of secret
- listed in secretRef.
- :vartype path: str
- """
-
- _attribute_map = {
- "secret_ref": {"key": "secretRef", "type": "str"},
- "path": {"key": "path", "type": "str"},
- }
-
- def __init__(self, *, secret_ref: Optional[str] = None, path: Optional[str] = None, **kwargs: Any) -> None:
- """
- :keyword secret_ref: Name of the Container App secret from which to pull the secret value.
- :paramtype secret_ref: str
- :keyword path: Path to project secret to. If no path is provided, path defaults to name of
- secret listed in secretRef.
- :paramtype path: str
- """
- super().__init__(**kwargs)
- self.secret_ref = secret_ref
- self.path = path
-
-
-class Service(_serialization.Model):
- """Container App to be a dev service.
-
- All required parameters must be populated in order to send to server.
+class SessionPoolUpdatableProperties(_serialization.Model):
+ """Container App session pool updatable properties.
- :ivar type: Dev ContainerApp service type. Required.
- :vartype type: str
+ :ivar scale_configuration: The scale configuration of the session pool.
+ :vartype scale_configuration: ~azure.mgmt.appcontainers.models.ScaleConfiguration
+ :ivar secrets: The secrets of the session pool.
+ :vartype secrets: list[~azure.mgmt.appcontainers.models.SecretAutoGenerated]
+ :ivar dynamic_pool_configuration: The pool configuration if the poolManagementType is dynamic.
+ :vartype dynamic_pool_configuration: ~azure.mgmt.appcontainers.models.DynamicPoolConfiguration
+ :ivar custom_container_template: The custom container configuration if the containerType is
+ CustomContainer.
+ :vartype custom_container_template: ~azure.mgmt.appcontainers.models.CustomContainerTemplate
+ :ivar session_network_configuration: The network configuration of the sessions in the session
+ pool.
+ :vartype session_network_configuration:
+ ~azure.mgmt.appcontainers.models.SessionNetworkConfiguration
"""
- _validation = {
- "type": {"required": True},
- }
-
_attribute_map = {
- "type": {"key": "type", "type": "str"},
+ "scale_configuration": {"key": "properties.scaleConfiguration", "type": "ScaleConfiguration"},
+ "secrets": {"key": "properties.secrets", "type": "[SecretAutoGenerated]"},
+ "dynamic_pool_configuration": {
+ "key": "properties.dynamicPoolConfiguration",
+ "type": "DynamicPoolConfiguration",
+ },
+ "custom_container_template": {"key": "properties.customContainerTemplate", "type": "CustomContainerTemplate"},
+ "session_network_configuration": {
+ "key": "properties.sessionNetworkConfiguration",
+ "type": "SessionNetworkConfiguration",
+ },
}
- def __init__(self, *, type: str, **kwargs: Any) -> None:
+ def __init__(
+ self,
+ *,
+ scale_configuration: Optional["_models.ScaleConfiguration"] = None,
+ secrets: Optional[List["_models.SecretAutoGenerated"]] = None,
+ dynamic_pool_configuration: Optional["_models.DynamicPoolConfiguration"] = None,
+ custom_container_template: Optional["_models.CustomContainerTemplate"] = None,
+ session_network_configuration: Optional["_models.SessionNetworkConfiguration"] = None,
+ **kwargs: Any
+ ) -> None:
"""
- :keyword type: Dev ContainerApp service type. Required.
- :paramtype type: str
+ :keyword scale_configuration: The scale configuration of the session pool.
+ :paramtype scale_configuration: ~azure.mgmt.appcontainers.models.ScaleConfiguration
+ :keyword secrets: The secrets of the session pool.
+ :paramtype secrets: list[~azure.mgmt.appcontainers.models.SecretAutoGenerated]
+ :keyword dynamic_pool_configuration: The pool configuration if the poolManagementType is
+ dynamic.
+ :paramtype dynamic_pool_configuration:
+ ~azure.mgmt.appcontainers.models.DynamicPoolConfiguration
+ :keyword custom_container_template: The custom container configuration if the containerType is
+ CustomContainer.
+ :paramtype custom_container_template: ~azure.mgmt.appcontainers.models.CustomContainerTemplate
+ :keyword session_network_configuration: The network configuration of the sessions in the
+ session pool.
+ :paramtype session_network_configuration:
+ ~azure.mgmt.appcontainers.models.SessionNetworkConfiguration
"""
super().__init__(**kwargs)
- self.type = type
+ self.scale_configuration = scale_configuration
+ self.secrets = secrets
+ self.dynamic_pool_configuration = dynamic_pool_configuration
+ self.custom_container_template = custom_container_template
+ self.session_network_configuration = session_network_configuration
-class ServiceBind(_serialization.Model):
- """Configuration to bind a ContainerApp to a dev ContainerApp Service.
+class SessionRegistryCredentials(_serialization.Model):
+ """Session pool private registry credentials.
- :ivar service_id: Resource id of the target service.
- :vartype service_id: str
- :ivar name: Name of the service bind.
- :vartype name: str
- :ivar client_type: Type of the client to be used to connect to the service.
- :vartype client_type: str
- :ivar customized_keys: Customized keys for customizing injected values to the app.
- :vartype customized_keys: dict[str, str]
+ :ivar registry_server: Container registry server.
+ :vartype registry_server: str
+ :ivar username: Container registry username.
+ :vartype username: str
+ :ivar password_secret_ref: The name of the secret that contains the registry login password.
+ :vartype password_secret_ref: str
"""
_attribute_map = {
- "service_id": {"key": "serviceId", "type": "str"},
- "name": {"key": "name", "type": "str"},
- "client_type": {"key": "clientType", "type": "str"},
- "customized_keys": {"key": "customizedKeys", "type": "{str}"},
+ "registry_server": {"key": "registryServer", "type": "str"},
+ "username": {"key": "username", "type": "str"},
+ "password_secret_ref": {"key": "passwordSecretRef", "type": "str"},
}
def __init__(
self,
*,
- service_id: Optional[str] = None,
- name: Optional[str] = None,
- client_type: Optional[str] = None,
- customized_keys: Optional[Dict[str, str]] = None,
+ registry_server: Optional[str] = None,
+ username: Optional[str] = None,
+ password_secret_ref: Optional[str] = None,
**kwargs: Any
) -> None:
"""
- :keyword service_id: Resource id of the target service.
- :paramtype service_id: str
- :keyword name: Name of the service bind.
- :paramtype name: str
- :keyword client_type: Type of the client to be used to connect to the service.
- :paramtype client_type: str
- :keyword customized_keys: Customized keys for customizing injected values to the app.
- :paramtype customized_keys: dict[str, str]
+ :keyword registry_server: Container registry server.
+ :paramtype registry_server: str
+ :keyword username: Container registry username.
+ :paramtype username: str
+ :keyword password_secret_ref: The name of the secret that contains the registry login password.
+ :paramtype password_secret_ref: str
"""
super().__init__(**kwargs)
- self.service_id = service_id
- self.name = name
- self.client_type = client_type
- self.customized_keys = customized_keys
+ self.registry_server = registry_server
+ self.username = username
+ self.password_secret_ref = password_secret_ref
class SourceControl(ProxyResource):
@@ -9936,8 +11902,8 @@ class SourceControl(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
@@ -10044,6 +12010,173 @@ def __init__(self, *, value: List["_models.SourceControl"], **kwargs: Any) -> No
self.next_link = None
+class SpringBootAdminComponent(JavaComponentProperties):
+ """Spring Boot Admin properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar component_type: Type of the Java Component. Required. Known values are:
+ "SpringBootAdmin", "SpringCloudEureka", "SpringCloudConfig", and "Nacos".
+ :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
+ :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
+ "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
+ :ivar configurations: List of Java Components configuration properties.
+ :vartype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :ivar service_binds: List of Java Components that are bound to the Java component.
+ :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :ivar ingress: Java Component Ingress configurations.
+ :vartype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
+ """
+
+ _validation = {
+ "component_type": {"required": True},
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "component_type": {"key": "componentType", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "configurations": {"key": "configurations", "type": "[JavaComponentConfigurationProperty]"},
+ "service_binds": {"key": "serviceBinds", "type": "[JavaComponentServiceBind]"},
+ "ingress": {"key": "ingress", "type": "JavaComponentIngress"},
+ }
+
+ def __init__(
+ self,
+ *,
+ configurations: Optional[List["_models.JavaComponentConfigurationProperty"]] = None,
+ service_binds: Optional[List["_models.JavaComponentServiceBind"]] = None,
+ ingress: Optional["_models.JavaComponentIngress"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword configurations: List of Java Components configuration properties.
+ :paramtype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :keyword service_binds: List of Java Components that are bound to the Java component.
+ :paramtype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :keyword ingress: Java Component Ingress configurations.
+ :paramtype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
+ """
+ super().__init__(configurations=configurations, service_binds=service_binds, **kwargs)
+ self.component_type: str = "SpringBootAdmin"
+ self.ingress = ingress
+
+
+class SpringCloudConfigComponent(JavaComponentProperties):
+ """Spring Cloud Config properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar component_type: Type of the Java Component. Required. Known values are:
+ "SpringBootAdmin", "SpringCloudEureka", "SpringCloudConfig", and "Nacos".
+ :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
+ :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
+ "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
+ :ivar configurations: List of Java Components configuration properties.
+ :vartype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :ivar service_binds: List of Java Components that are bound to the Java component.
+ :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ """
+
+ _validation = {
+ "component_type": {"required": True},
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "component_type": {"key": "componentType", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "configurations": {"key": "configurations", "type": "[JavaComponentConfigurationProperty]"},
+ "service_binds": {"key": "serviceBinds", "type": "[JavaComponentServiceBind]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ configurations: Optional[List["_models.JavaComponentConfigurationProperty"]] = None,
+ service_binds: Optional[List["_models.JavaComponentServiceBind"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword configurations: List of Java Components configuration properties.
+ :paramtype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :keyword service_binds: List of Java Components that are bound to the Java component.
+ :paramtype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ """
+ super().__init__(configurations=configurations, service_binds=service_binds, **kwargs)
+ self.component_type: str = "SpringCloudConfig"
+
+
+class SpringCloudEurekaComponent(JavaComponentProperties):
+ """Spring Cloud Eureka properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar component_type: Type of the Java Component. Required. Known values are:
+ "SpringBootAdmin", "SpringCloudEureka", "SpringCloudConfig", and "Nacos".
+ :vartype component_type: str or ~azure.mgmt.appcontainers.models.JavaComponentType
+ :ivar provisioning_state: Provisioning state of the Java Component. Known values are:
+ "Succeeded", "Failed", "Canceled", "Deleting", and "InProgress".
+ :vartype provisioning_state: str or
+ ~azure.mgmt.appcontainers.models.JavaComponentProvisioningState
+ :ivar configurations: List of Java Components configuration properties.
+ :vartype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :ivar service_binds: List of Java Components that are bound to the Java component.
+ :vartype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :ivar ingress: Java Component Ingress configurations.
+ :vartype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
+ """
+
+ _validation = {
+ "component_type": {"required": True},
+ "provisioning_state": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "component_type": {"key": "componentType", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "configurations": {"key": "configurations", "type": "[JavaComponentConfigurationProperty]"},
+ "service_binds": {"key": "serviceBinds", "type": "[JavaComponentServiceBind]"},
+ "ingress": {"key": "ingress", "type": "JavaComponentIngress"},
+ }
+
+ def __init__(
+ self,
+ *,
+ configurations: Optional[List["_models.JavaComponentConfigurationProperty"]] = None,
+ service_binds: Optional[List["_models.JavaComponentServiceBind"]] = None,
+ ingress: Optional["_models.JavaComponentIngress"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword configurations: List of Java Components configuration properties.
+ :paramtype configurations:
+ list[~azure.mgmt.appcontainers.models.JavaComponentConfigurationProperty]
+ :keyword service_binds: List of Java Components that are bound to the Java component.
+ :paramtype service_binds: list[~azure.mgmt.appcontainers.models.JavaComponentServiceBind]
+ :keyword ingress: Java Component Ingress configurations.
+ :paramtype ingress: ~azure.mgmt.appcontainers.models.JavaComponentIngress
+ """
+ super().__init__(configurations=configurations, service_binds=service_binds, **kwargs)
+ self.component_type: str = "SpringCloudEureka"
+ self.ingress = ingress
+
+
class SystemData(_serialization.Model):
"""Metadata pertaining to creation and last modification of the resource.
@@ -10155,11 +12288,15 @@ class TcpScaleRule(_serialization.Model):
:vartype metadata: dict[str, str]
:ivar auth: Authentication secrets for the tcp scale rule.
:vartype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :ivar identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :vartype identity: str
"""
_attribute_map = {
"metadata": {"key": "metadata", "type": "{str}"},
"auth": {"key": "auth", "type": "[ScaleRuleAuth]"},
+ "identity": {"key": "identity", "type": "str"},
}
def __init__(
@@ -10167,6 +12304,7 @@ def __init__(
*,
metadata: Optional[Dict[str, str]] = None,
auth: Optional[List["_models.ScaleRuleAuth"]] = None,
+ identity: Optional[str] = None,
**kwargs: Any
) -> None:
"""
@@ -10174,10 +12312,14 @@ def __init__(
:paramtype metadata: dict[str, str]
:keyword auth: Authentication secrets for the tcp scale rule.
:paramtype auth: list[~azure.mgmt.appcontainers.models.ScaleRuleAuth]
+ :keyword identity: The resource ID of a user-assigned managed identity that is assigned to the
+ Container App, or 'system' for system-assigned identity.
+ :paramtype identity: str
"""
super().__init__(**kwargs)
self.metadata = metadata
self.auth = auth
+ self.identity = identity
class Template(_serialization.Model):
@@ -10807,8 +12949,8 @@ class WorkloadProfileStates(ProxyResource):
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}. # pylint: disable=line-too-long
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
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 27819202ef8e..388766755e05 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
@@ -21,17 +21,26 @@
from ._container_apps_operations import ContainerAppsOperations
from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations
from ._container_apps_revision_replicas_operations import ContainerAppsRevisionReplicasOperations
+from ._container_apps_builds_by_container_app_operations import ContainerAppsBuildsByContainerAppOperations
+from ._container_apps_builds_operations import ContainerAppsBuildsOperations
+from ._container_apps_patches_operations import ContainerAppsPatchesOperations
from ._container_apps_diagnostics_operations import ContainerAppsDiagnosticsOperations
from ._managed_environment_diagnostics_operations import ManagedEnvironmentDiagnosticsOperations
from ._managed_environments_diagnostics_operations import ManagedEnvironmentsDiagnosticsOperations
from ._jobs_operations import JobsOperations
+from ._dot_net_components_operations import DotNetComponentsOperations
from ._operations import Operations
+from ._java_components_operations import JavaComponentsOperations
from ._jobs_executions_operations import JobsExecutionsOperations
from ._container_apps_api_client_operations import ContainerAppsAPIClientOperationsMixin
from ._managed_environments_operations import ManagedEnvironmentsOperations
from ._certificates_operations import CertificatesOperations
from ._managed_certificates_operations import ManagedCertificatesOperations
from ._namespaces_operations import NamespacesOperations
+from ._managed_environment_private_endpoint_connections_operations import (
+ ManagedEnvironmentPrivateEndpointConnectionsOperations,
+)
+from ._managed_environment_private_link_resources_operations import ManagedEnvironmentPrivateLinkResourcesOperations
from ._dapr_component_resiliency_policies_operations import DaprComponentResiliencyPoliciesOperations
from ._dapr_components_operations import DaprComponentsOperations
from ._dapr_subscriptions_operations import DaprSubscriptionsOperations
@@ -39,8 +48,8 @@
from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations
from ._usages_operations import UsagesOperations
from ._managed_environment_usages_operations import ManagedEnvironmentUsagesOperations
-from ._java_components_operations import JavaComponentsOperations
-from ._dot_net_components_operations import DotNetComponentsOperations
+from ._functions_extension_operations import FunctionsExtensionOperations
+from ._container_apps_session_pools_operations import ContainerAppsSessionPoolsOperations
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
@@ -62,17 +71,24 @@
"ContainerAppsOperations",
"ContainerAppsRevisionsOperations",
"ContainerAppsRevisionReplicasOperations",
+ "ContainerAppsBuildsByContainerAppOperations",
+ "ContainerAppsBuildsOperations",
+ "ContainerAppsPatchesOperations",
"ContainerAppsDiagnosticsOperations",
"ManagedEnvironmentDiagnosticsOperations",
"ManagedEnvironmentsDiagnosticsOperations",
"JobsOperations",
+ "DotNetComponentsOperations",
"Operations",
+ "JavaComponentsOperations",
"JobsExecutionsOperations",
"ContainerAppsAPIClientOperationsMixin",
"ManagedEnvironmentsOperations",
"CertificatesOperations",
"ManagedCertificatesOperations",
"NamespacesOperations",
+ "ManagedEnvironmentPrivateEndpointConnectionsOperations",
+ "ManagedEnvironmentPrivateLinkResourcesOperations",
"DaprComponentResiliencyPoliciesOperations",
"DaprComponentsOperations",
"DaprSubscriptionsOperations",
@@ -80,8 +96,8 @@
"ContainerAppsSourceControlsOperations",
"UsagesOperations",
"ManagedEnvironmentUsagesOperations",
- "JavaComponentsOperations",
- "DotNetComponentsOperations",
+ "FunctionsExtensionOperations",
+ "ContainerAppsSessionPoolsOperations",
]
__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/_app_resiliency_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_app_resiliency_operations.py
index 335c0f80f99e..6cdf82b6e1ea 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_app_resiliency_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_app_resiliency_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -80,7 +85,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -117,7 +122,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -151,7 +156,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -183,7 +188,7 @@ def build_list_request(resource_group_name: str, app_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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -320,7 +325,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.AppResiliency
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -472,7 +477,7 @@ def update(
:rtype: ~azure.mgmt.appcontainers.models.AppResiliency
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -548,7 +553,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -606,7 +611,7 @@ def get(self, resource_group_name: str, app_name: str, name: str, **kwargs: Any)
:rtype: ~azure.mgmt.appcontainers.models.AppResiliency
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -672,7 +677,7 @@ def list(self, resource_group_name: str, app_name: str, **kwargs: Any) -> Iterab
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AppResiliencyCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 b5b3325841ae..0ee77cad72f2 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -102,7 +107,7 @@ def get(self, location: str, **kwargs: Any) -> Iterable["_models.AvailableWorklo
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AvailableWorkloadProfilesCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 cc656256a0da..c276faea23bd 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
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -27,6 +28,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -38,7 +43,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -92,7 +97,7 @@ def get(self, location: str, **kwargs: Any) -> _models.BillingMeterCollection:
:rtype: ~azure.mgmt.appcontainers.models.BillingMeterCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_build_auth_token_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_build_auth_token_operations.py
index 03f255159915..0ee074291457 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_build_auth_token_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_build_auth_token_operations.py
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -27,6 +28,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -106,7 +111,7 @@ def list(self, resource_group_name: str, builder_name: str, build_name: str, **k
:rtype: ~azure.mgmt.appcontainers.models.BuildToken
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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
index 2ee9ea5294f4..f7b254f4b41b 100644
--- 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +72,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -97,7 +102,7 @@ def build_get_request(resource_group_name: str, builder_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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +137,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -170,7 +175,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -208,7 +213,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -270,7 +275,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.BuilderResour
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -350,7 +355,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -427,7 +432,7 @@ def get(self, resource_group_name: str, builder_name: str, **kwargs: Any) -> _mo
:rtype: ~azure.mgmt.appcontainers.models.BuilderResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -478,7 +483,7 @@ def _create_or_update_initial(
builder_envelope: Union[_models.BuilderResource, IO[bytes]],
**kwargs: Any
) -> _models.BuilderResource:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -677,7 +682,7 @@ def _update_initial(
builder_envelope: Union[_models.BuilderResourceUpdate, IO[bytes]],
**kwargs: Any
) -> Optional[_models.BuilderResource]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -869,7 +874,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, builder_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_by_builder_resource_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_by_builder_resource_operations.py
index b1a3d7ef324f..ebb7809b6fe6 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_by_builder_resource_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_builds_by_builder_resource_operations.py
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,7 @@ def build_list_request(resource_group_name: str, builder_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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -107,7 +112,7 @@ def list(self, resource_group_name: str, builder_name: str, **kwargs: Any) -> It
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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
index 8007534cc4ae..76c1816c6b3c 100644
--- 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
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, cast, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -81,7 +86,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -122,7 +127,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -188,7 +193,7 @@ def get(self, resource_group_name: str, builder_name: str, build_name: str, **kw
:rtype: ~azure.mgmt.appcontainers.models.BuildResource
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -241,7 +246,7 @@ def _create_or_update_initial(
build_envelope: Union[_models.BuildResource, IO[bytes]],
**kwargs: Any
) -> _models.BuildResource:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -447,7 +452,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, builder_name: str, build_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 2739382988f7..ae1647b87d72 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
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +81,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,7 +115,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +152,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +186,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -252,7 +257,7 @@ def list(self, resource_group_name: str, environment_name: str, **kwargs: Any) -
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -336,7 +341,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -472,7 +477,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -551,7 +556,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -683,7 +688,7 @@ def update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 e06b5f9cbd78..24c977c7ac23 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
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -80,7 +85,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -118,7 +123,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -159,7 +164,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -197,7 +202,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -270,7 +275,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -354,7 +359,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -490,7 +495,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -569,7 +574,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -701,7 +706,7 @@ def update(
:rtype: ~azure.mgmt.appcontainers.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 db1d06c8ffd3..203e76b83def 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
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +81,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,7 +115,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +152,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +186,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -251,7 +256,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -335,7 +340,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -471,7 +476,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -547,7 +552,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -607,7 +612,7 @@ def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.DaprSecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 8bc2e4540fbc..9aca6a085d77 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +72,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +104,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +137,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,7 +173,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -201,7 +206,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -234,7 +239,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -300,7 +305,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ConnectedEnvi
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectedEnvironmentCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -383,7 +388,7 @@ def list_by_resource_group(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectedEnvironmentCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -462,7 +467,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -513,7 +518,7 @@ def _create_or_update_initial(
environment_envelope: Union[_models.ConnectedEnvironment, IO[bytes]],
**kwargs: Any
) -> _models.ConnectedEnvironment:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -703,7 +708,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, connected_environment_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -820,7 +825,7 @@ def update(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -950,7 +955,7 @@ def check_name_availability(
:rtype: ~azure.mgmt.appcontainers.models.CheckNameAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 084b50d04075..7bb67f02a849 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
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -28,6 +29,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -41,7 +46,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -74,7 +79,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -108,7 +113,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -145,7 +150,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -209,7 +214,7 @@ def list(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStoragesCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -272,7 +277,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -409,7 +414,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.ConnectedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -485,7 +490,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 b959732eef68..346209a5a1c9 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
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -27,6 +28,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +81,7 @@ def build_get_custom_domain_verification_id_request( # pylint: disable=name-too
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,6 +104,7 @@ def build_get_custom_domain_verification_id_request( # pylint: disable=name-too
class ContainerAppsAPIClientOperationsMixin(ContainerAppsAPIClientMixinABC):
+
@distributed_trace
def job_execution(
self, resource_group_name: str, job_name: str, job_execution_name: str, **kwargs: Any
@@ -118,7 +124,7 @@ def job_execution(
:rtype: ~azure.mgmt.appcontainers.models.JobExecution
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -171,7 +177,7 @@ def get_custom_domain_verification_id(self, **kwargs: Any) -> str:
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 6d16ff0bbc57..e5020d2468c7 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
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +81,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,7 +115,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +152,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -217,7 +222,7 @@ def list_by_container_app(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AuthConfigCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -301,7 +306,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.AuthConfig
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -437,7 +442,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.AuthConfig
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -513,7 +518,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_builds_by_container_app_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_builds_by_container_app_operations.py
new file mode 100644
index 000000000000..6763a2defd16
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_builds_by_container_app_operations.py
@@ -0,0 +1,184 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, 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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+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, container_app_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_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 ContainerAppsBuildsByContainerAppOperations: # pylint: disable=name-too-long
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`container_apps_builds_by_container_app` 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, container_app_name: str, **kwargs: Any
+ ) -> Iterable["_models.ContainerAppsBuildResource"]:
+ """List Container Apps Build resources by Container App.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Build is associated. Required.
+ :type container_app_name: str
+ :return: An iterator like instance of either ContainerAppsBuildResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.ContainerAppsBuildResource]
+ :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.ContainerAppsBuildCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ container_app_name=container_app_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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("ContainerAppsBuildCollection", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_builds_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_builds_operations.py
new file mode 100644
index 000000000000..457c031a9dfe
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_builds_operations.py
@@ -0,0 +1,306 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Optional, Type, 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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_get_request(
+ resource_group_name: str, container_app_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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", 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_delete_request(
+ resource_group_name: str, container_app_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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", 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 ContainerAppsBuildsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`container_apps_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 get(
+ self, resource_group_name: str, container_app_name: str, build_name: str, **kwargs: Any
+ ) -> _models.ContainerAppsBuildResource:
+ """Get a Container Apps Build resource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Build is associated. Required.
+ :type container_app_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :return: ContainerAppsBuildResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.ContainerAppsBuildResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.ContainerAppsBuildResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("ContainerAppsBuildResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, container_app_name: str, build_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ container_app_name=container_app_name,
+ build_name=build_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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 [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, 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) # type: ignore
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, container_app_name: str, build_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete a Container Apps Build resource.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Build is associated. Required.
+ :type container_app_name: str
+ :param build_name: The name of a build. Required.
+ :type build_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
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 5014cf298b1b..5b32c40dd3ea 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar, cast
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -42,7 +47,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -75,7 +80,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -114,7 +119,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -149,7 +154,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -183,7 +188,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -253,7 +258,7 @@ def list_detectors(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DiagnosticsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -337,7 +342,7 @@ def get_detector(
:rtype: ~azure.mgmt.appcontainers.models.Diagnostics
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -407,7 +412,7 @@ def list_revisions(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RevisionCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -492,7 +497,7 @@ def get_revision(
:rtype: ~azure.mgmt.appcontainers.models.Revision
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -552,11 +557,14 @@ def get_root(self, resource_group_name: str, container_app_name: str, **kwargs:
:rtype: ~azure.mgmt.appcontainers.models.ContainerApp
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ 404: cast(
+ Type[HttpResponseError],
+ lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
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 c4bec66f23ce..e31548da9c7c 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +72,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +104,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +137,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,7 +173,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -201,7 +206,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -242,7 +247,7 @@ def build_list_custom_host_name_analysis_request( # pylint: disable=name-too-lo
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -277,7 +282,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -310,7 +315,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -343,7 +348,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -378,7 +383,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -442,7 +447,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ContainerApp"
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -524,7 +529,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerAppCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -603,11 +608,14 @@ def get(self, resource_group_name: str, container_app_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.appcontainers.models.ContainerApp
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ 404: cast(
+ Type[HttpResponseError],
+ lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -654,7 +662,7 @@ def _create_or_update_initial(
container_app_envelope: Union[_models.ContainerApp, IO[bytes]],
**kwargs: Any
) -> _models.ContainerApp:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -850,7 +858,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, container_app_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -957,7 +965,7 @@ def _update_initial(
container_app_envelope: Union[_models.ContainerApp, IO[bytes]],
**kwargs: Any
) -> Optional[_models.ContainerApp]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1169,7 +1177,7 @@ def list_custom_host_name_analysis(
:rtype: ~azure.mgmt.appcontainers.models.CustomHostnameAnalysisResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1231,7 +1239,7 @@ def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.SecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1292,11 +1300,14 @@ def get_auth_token(
:rtype: ~azure.mgmt.appcontainers.models.ContainerAppAuthToken
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 404: lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ 404: cast(
+ Type[HttpResponseError],
+ lambda response: ResourceNotFoundError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -1339,7 +1350,7 @@ def get_auth_token(
def _start_initial(
self, resource_group_name: str, container_app_name: str, **kwargs: Any
) -> Optional[_models.ContainerApp]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1455,7 +1466,7 @@ def get_long_running_output(pipeline_response):
def _stop_initial(
self, resource_group_name: str, container_app_name: str, **kwargs: Any
) -> Optional[_models.ContainerApp]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_patches_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_patches_operations.py
new file mode 100644
index 000000000000..58db93925d5e
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_patches_operations.py
@@ -0,0 +1,838 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, 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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+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_container_app_request(
+ resource_group_name: str,
+ container_app_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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_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")
+ 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, container_app_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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", 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, container_app_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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", 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, container_app_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", "2024-02-02-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/containerApps/{containerAppName}/patches/{patchName}/skipConfig",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", 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, **kwargs)
+
+
+def build_apply_request(
+ resource_group_name: str, container_app_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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", 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 ContainerAppsPatchesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`container_apps_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_container_app(
+ self, resource_group_name: str, container_app_name: str, filter: Optional[str] = None, **kwargs: Any
+ ) -> Iterable["_models.ContainerAppsPatchResource"]:
+ """List Container Apps Patch resources by ContainerApp.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param filter: The filter to apply on the operation. For example,
+ $filter=properties/patchApplyStatus eq 'Succeeded'. Default value is None.
+ :type filter: str
+ :return: An iterator like instance of either ContainerAppsPatchResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.ContainerAppsPatchResource]
+ :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.PatchCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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_container_app_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ subscription_id=self._config.subscription_id,
+ filter=filter,
+ api_version=api_version,
+ 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("PatchCollection", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def get(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> _models.ContainerAppsPatchResource:
+ """Get details for specific Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :return: ContainerAppsPatchResource or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.ContainerAppsPatchResource
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.ContainerAppsPatchResource] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("ContainerAppsPatchResource", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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 [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, 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) # type: ignore
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete specific Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _skip_configure_initial( # pylint: disable=inconsistent-return-statements
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: Union[_models.PatchSkipConfig, IO[bytes]],
+ **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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[None] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(patch_skip_config, (IOBase, bytes)):
+ _content = patch_skip_config
+ else:
+ _json = self._serialize.body(patch_skip_config, "PatchSkipConfig")
+
+ _request = build_skip_configure_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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 [202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, None, response_headers) # type: ignore
+
+ @overload
+ def begin_skip_configure(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: _models.PatchSkipConfig,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Configure the Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_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: ~azure.mgmt.appcontainers.models.PatchSkipConfig
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_skip_configure(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Configure the Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_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: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_skip_configure(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ patch_name: str,
+ patch_skip_config: Union[_models.PatchSkipConfig, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Configure the Container Apps 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_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. Is either a PatchSkipConfig
+ type or a IO[bytes] type. Required.
+ :type patch_skip_config: ~azure.mgmt.appcontainers.models.PatchSkipConfig or IO[bytes]
+ :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: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ 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,
+ container_app_name=container_app_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+
+ def _apply_initial(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> Optional[_models.ContainerAppsPatchResource]:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.ContainerAppsPatchResource]] = kwargs.pop("cls", None)
+
+ _request = build_apply_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ patch_name=patch_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize("ContainerAppsPatchResource", pipeline_response)
+
+ if response.status_code == 202:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_apply(
+ self, resource_group_name: str, container_app_name: str, patch_name: str, **kwargs: Any
+ ) -> LROPoller[_models.ContainerAppsPatchResource]:
+ """Apply a Container Apps Patch resource 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 container_app_name: Name of the Container App the Patch is associated. Required.
+ :type container_app_name: str
+ :param patch_name: The name of the patch. Required.
+ :type patch_name: str
+ :return: An instance of LROPoller that returns either ContainerAppsPatchResource or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.ContainerAppsPatchResource]
+ :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.ContainerAppsPatchResource] = 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,
+ container_app_name=container_app_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("ContainerAppsPatchResource", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.ContainerAppsPatchResource].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.ContainerAppsPatchResource](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
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 513cfd8687bd..52e62e6d0841 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
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -27,6 +28,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +50,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -80,7 +85,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -148,7 +153,7 @@ def get_replica(
:rtype: ~azure.mgmt.appcontainers.models.Replica
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -213,7 +218,7 @@ def list_replicas(
:rtype: ~azure.mgmt.appcontainers.models.ReplicaCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 dbb59afb6558..6e790ef94393 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -47,7 +52,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +87,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -116,7 +121,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -150,7 +155,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -184,7 +189,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -256,7 +261,7 @@ def list_revisions(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RevisionCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -341,7 +346,7 @@ def get_revision(
:rtype: ~azure.mgmt.appcontainers.models.Revision
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -405,7 +410,7 @@ def activate_revision( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -465,7 +470,7 @@ def deactivate_revision( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -525,7 +530,7 @@ def restart_revision( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_session_pools_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_session_pools_operations.py
new file mode 100644
index 000000000000..e143635e16a2
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_container_apps_session_pools_operations.py
@@ -0,0 +1,958 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, 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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.App/sessionPools")
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ }
+
+ _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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", 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, subscription_id: str, session_pool_name: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "sessionPoolName": _SERIALIZER.url(
+ "session_pool_name", session_pool_name, "str", max_length=63, min_length=3, pattern=r"^[a-z][a-z0-9]*$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _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, subscription_id: str, session_pool_name: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-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/sessionPools/{sessionPoolName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "sessionPoolName": _SERIALIZER.url(
+ "session_pool_name", session_pool_name, "str", max_length=63, min_length=3, pattern=r"^[a-z][a-z0-9]*$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_update_request(
+ resource_group_name: str, subscription_id: str, session_pool_name: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-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/sessionPools/{sessionPoolName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "sessionPoolName": _SERIALIZER.url(
+ "session_pool_name", session_pool_name, "str", max_length=63, min_length=3, pattern=r"^[a-z][a-z0-9]*$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_delete_request(
+ resource_group_name: str, subscription_id: str, session_pool_name: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "sessionPoolName": _SERIALIZER.url(
+ "session_pool_name", session_pool_name, "str", max_length=63, min_length=3, pattern=r"^[a-z][a-z0-9]*$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class ContainerAppsSessionPoolsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`container_apps_session_pools` 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.SessionPool"]:
+ """Get the session pools in a given subscription.
+
+ Get the session pools in a given subscription.
+
+ :return: An iterator like instance of either SessionPool or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPoolCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("SessionPoolCollection", 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)
+
+ @distributed_trace
+ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.SessionPool"]:
+ """Get the session pools in a given resource group of a subscription.
+
+ Get the session pools in a given resource group of a subscription.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :return: An iterator like instance of either SessionPool or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPoolCollection] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("SessionPoolCollection", 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)
+
+ @distributed_trace
+ def get(self, resource_group_name: str, **kwargs: Any) -> _models.SessionPool:
+ """Get the properties of a session pool.
+
+ Get the properties of a session pool.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :return: SessionPool or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.SessionPool
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.SessionPool] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ 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("SessionPool", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _create_or_update_initial(
+ self, resource_group_name: str, session_pool_envelope: Union[_models.SessionPool, IO[bytes]], **kwargs: Any
+ ) -> _models.SessionPool:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.SessionPool] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(session_pool_envelope, (IOBase, bytes)):
+ _content = session_pool_envelope
+ else:
+ _json = self._serialize.body(session_pool_envelope, "SessionPool")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize("SessionPool", pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize("SessionPool", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: _models.SessionPool,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.SessionPool]:
+ """Create or update a session pool.
+
+ Create or update a session pool with the given properties.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPool
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.SessionPool]:
+ """Create or update a session pool.
+
+ Create or update a session pool with the given properties.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_create_or_update(
+ self, resource_group_name: str, session_pool_envelope: Union[_models.SessionPool, IO[bytes]], **kwargs: Any
+ ) -> LROPoller[_models.SessionPool]:
+ """Create or update a session pool.
+
+ Create or update a session pool with the given properties.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Is either a SessionPool
+ type or a IO[bytes] type. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPool or IO[bytes]
+ :return: An instance of LROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPool] = 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,
+ session_pool_envelope=session_pool_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("SessionPool", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.SessionPool].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.SessionPool](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _update_initial(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: Union[_models.SessionPoolUpdatableProperties, IO[bytes]],
+ **kwargs: Any
+ ) -> Optional[_models.SessionPool]:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.SessionPool]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(session_pool_envelope, (IOBase, bytes)):
+ _content = session_pool_envelope
+ else:
+ _json = self._serialize.body(session_pool_envelope, "SessionPoolUpdatableProperties")
+
+ _request = build_update_request(
+ resource_group_name=resource_group_name,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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("SessionPool", 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) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: _models.SessionPoolUpdatableProperties,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.SessionPool]:
+ """Update properties of a session pool.
+
+ Patches a session pool using JSON merge patch.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPoolUpdatableProperties
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.SessionPool]:
+ """Update properties of a session pool.
+
+ Patches a session pool using JSON merge patch.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Required.
+ :type session_pool_envelope: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_update(
+ self,
+ resource_group_name: str,
+ session_pool_envelope: Union[_models.SessionPoolUpdatableProperties, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.SessionPool]:
+ """Update properties of a session pool.
+
+ Patches a session pool using JSON merge patch.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param session_pool_envelope: Properties used to create a session pool. Is either a
+ SessionPoolUpdatableProperties type or a IO[bytes] type. Required.
+ :type session_pool_envelope: ~azure.mgmt.appcontainers.models.SessionPoolUpdatableProperties or
+ IO[bytes]
+ :return: An instance of LROPoller that returns either SessionPool or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.SessionPool]
+ :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.SessionPool] = 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,
+ session_pool_envelope=session_pool_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("SessionPool", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.SessionPool].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.SessionPool](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ subscription_id=self._config.subscription_id,
+ session_pool_name=self._config.session_pool_name,
+ api_version=api_version,
+ 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 [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) # type: ignore
+
+ @distributed_trace
+ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[None]:
+ """Delete a session pool.
+
+ Delete the session pool with the given name.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial( # type: ignore
+ resource_group_name=resource_group_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
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 5c56850d64f3..da38e32b43f2 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +50,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,7 +83,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,7 +117,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -149,7 +154,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -219,7 +224,7 @@ def list_by_container_app(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -303,7 +308,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -356,7 +361,7 @@ def _create_or_update_initial(
source_control_envelope: Union[_models.SourceControl, IO[bytes]],
**kwargs: Any
) -> _models.SourceControl:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -563,7 +568,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, container_app_name: str, source_control_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_component_resiliency_policies_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_component_resiliency_policies_operations.py
index 8651964a9c97..eb839148186c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_component_resiliency_policies_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_component_resiliency_policies_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -77,7 +82,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,7 +117,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +155,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -225,7 +230,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprComponentResiliencyPoliciesCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -312,7 +317,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponentResiliencyPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -463,7 +468,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponentResiliencyPolicy
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -546,7 +551,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 6185be9c9fbe..ca741cc85532 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
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +81,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,7 +115,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +152,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +186,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -249,7 +254,7 @@ def list(self, resource_group_name: str, environment_name: str, **kwargs: Any) -
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -333,7 +338,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -469,7 +474,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -545,7 +550,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -605,7 +610,7 @@ def list_secrets(
:rtype: ~azure.mgmt.appcontainers.models.DaprSecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_subscriptions_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_subscriptions_operations.py
index 8b2488ce964a..0b7937994e5c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_subscriptions_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dapr_subscriptions_operations.py
@@ -7,7 +7,8 @@
# 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, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
import urllib.parse
from azure.core.exceptions import (
@@ -30,6 +31,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,7 +81,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,7 +115,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -147,7 +152,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -217,7 +222,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DaprSubscriptionsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -301,7 +306,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.DaprSubscription
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -438,7 +443,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.DaprSubscription
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -518,7 +523,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dot_net_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dot_net_components_operations.py
index eb95db3a3c78..45d43ca1e531 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dot_net_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_dot_net_components_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +50,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,7 +83,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,7 +117,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -149,7 +154,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -186,7 +191,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -256,7 +261,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DotNetComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -338,7 +343,7 @@ def get(self, resource_group_name: str, environment_name: str, name: str, **kwar
:rtype: ~azure.mgmt.appcontainers.models.DotNetComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -391,7 +396,7 @@ def _create_or_update_initial(
dot_net_component_envelope: Union[_models.DotNetComponent, IO[bytes]],
**kwargs: Any
) -> _models.DotNetComponent:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -603,7 +608,7 @@ def _update_initial(
dot_net_component_envelope: Union[_models.DotNetComponent, IO[bytes]],
**kwargs: Any
) -> Optional[_models.DotNetComponent]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -810,7 +815,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_functions_extension_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_functions_extension_operations.py
new file mode 100644
index 000000000000..e485c6a89cfa
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_functions_extension_operations.py
@@ -0,0 +1,173 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
+
+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.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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_invoke_functions_host_request(
+ resource_group_name: str,
+ container_app_name: str,
+ revision_name: str,
+ function_app_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "containerAppName": _SERIALIZER.url(
+ "container_app_name", container_app_name, "str", pattern=r"^[-\w\._\(\)]+$"
+ ),
+ "revisionName": _SERIALIZER.url("revision_name", revision_name, "str", pattern=r"^[-\w\._\(\)]+$"),
+ "functionAppName": _SERIALIZER.url("function_app_name", function_app_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="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class FunctionsExtensionOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`functions_extension` 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 invoke_functions_host(
+ self,
+ resource_group_name: str,
+ container_app_name: str,
+ revision_name: str,
+ function_app_name: str,
+ **kwargs: Any
+ ) -> str:
+ """Proxies a Functions host call to the function app backed by the container app.
+
+ Proxies a Functions host call to the function app backed by the container app.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param container_app_name: Name of the Container App. Required.
+ :type container_app_name: str
+ :param revision_name: Name of the Container App Revision, the parent resource. Required.
+ :type revision_name: str
+ :param function_app_name: Name of the Function App, the extension resource. Required.
+ :type function_app_name: str
+ :return: str or the result of cls(response)
+ :rtype: str
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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_invoke_functions_host_request(
+ resource_group_name=resource_group_name,
+ container_app_name=container_app_name,
+ revision_name=revision_name,
+ function_app_name=function_app_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_java_components_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_java_components_operations.py
index 46f755fed0e0..c32439a9d87b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_java_components_operations.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_java_components_operations.py
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +50,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,7 +83,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,7 +117,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -149,7 +154,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -186,7 +191,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -254,7 +259,7 @@ def list(self, resource_group_name: str, environment_name: str, **kwargs: Any) -
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JavaComponentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -336,7 +341,7 @@ def get(self, resource_group_name: str, environment_name: str, name: str, **kwar
:rtype: ~azure.mgmt.appcontainers.models.JavaComponent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -389,7 +394,7 @@ def _create_or_update_initial(
java_component_envelope: Union[_models.JavaComponent, IO[bytes]],
**kwargs: Any
) -> _models.JavaComponent:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -601,7 +606,7 @@ def _update_initial(
java_component_envelope: Union[_models.JavaComponent, IO[bytes]],
**kwargs: Any
) -> Optional[_models.JavaComponent]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -808,7 +813,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, environment_name: str, name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 eee36884768a..5b7eafb25ba0 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -42,7 +47,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -115,7 +120,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ContainerAppJobExecutions] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 9ad72330b0e7..091c0d248dec 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
@@ -7,7 +7,8 @@
# 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, Literal, Optional, TypeVar, Union, cast, overload
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Literal, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +50,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,7 +83,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +118,7 @@ def build_proxy_get_request(
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_name: Literal["rootApi"] = kwargs.pop("api_name", "rootApi")
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -145,7 +150,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -169,7 +174,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -199,7 +204,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -232,7 +237,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -266,7 +271,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -297,7 +302,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -331,7 +336,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -367,7 +372,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -403,7 +408,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -436,7 +441,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -497,7 +502,7 @@ def list_detectors(self, resource_group_name: str, job_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.appcontainers.models.DiagnosticsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -560,7 +565,7 @@ def get_detector(
:rtype: ~azure.mgmt.appcontainers.models.Diagnostics
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -620,7 +625,7 @@ def proxy_get(self, resource_group_name: str, job_name: str, **kwargs: Any) -> _
:rtype: ~azure.mgmt.appcontainers.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -682,7 +687,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.Job"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -764,7 +769,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -843,7 +848,7 @@ def get(self, resource_group_name: str, job_name: str, **kwargs: Any) -> _models
:rtype: ~azure.mgmt.appcontainers.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -890,7 +895,7 @@ def get(self, resource_group_name: str, job_name: str, **kwargs: Any) -> _models
def _create_or_update_initial(
self, resource_group_name: str, job_name: str, job_envelope: Union[_models.Job, IO[bytes]], **kwargs: Any
) -> _models.Job:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1077,7 +1082,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, job_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1184,7 +1189,7 @@ def _update_initial(
job_envelope: Union[_models.JobPatchProperties, IO[bytes]],
**kwargs: Any
) -> Optional[_models.Job]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1379,7 +1384,7 @@ def _start_initial(
template: Optional[Union[_models.JobExecutionTemplate, IO[bytes]]] = None,
**kwargs: Any
) -> Optional[_models.JobExecutionBase]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1580,7 +1585,7 @@ def get_long_running_output(pipeline_response):
def _stop_execution_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, job_name: str, job_execution_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1689,7 +1694,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
def _stop_multiple_executions_initial(
self, resource_group_name: str, job_name: str, **kwargs: Any
) -> Optional[_models.ContainerAppJobExecutions]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1818,7 +1823,7 @@ def list_secrets(self, resource_group_name: str, job_name: str, **kwargs: Any) -
:rtype: ~azure.mgmt.appcontainers.models.JobSecretsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 1d0a9bdec49f..74ae18421371 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +50,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +84,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -116,7 +121,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -150,7 +155,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +192,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +257,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.ManagedCertificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -305,12 +310,15 @@ def _create_or_update_initial(
managed_certificate_envelope: Optional[Union[_models.ManagedCertificate, IO[bytes]]] = None,
**kwargs: Any
) -> _models.ManagedCertificate:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
- 400: lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat),
+ 400: cast(
+ Type[HttpResponseError],
+ lambda response: HttpResponseError(response=response, error_format=ARMErrorFormat),
+ ),
}
error_map.update(kwargs.pop("error_map", {}) or {})
@@ -535,7 +543,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -670,7 +678,7 @@ def update(
:rtype: ~azure.mgmt.appcontainers.models.ManagedCertificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -750,7 +758,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ManagedCertificateCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 36671189de6e..3ff2f049c171 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
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -27,6 +28,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -73,7 +78,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -137,7 +142,7 @@ def list_detectors(
:rtype: ~azure.mgmt.appcontainers.models.DiagnosticsCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -200,7 +205,7 @@ def get_detector(
:rtype: ~azure.mgmt.appcontainers.models.Diagnostics
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_private_endpoint_connections_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_private_endpoint_connections_operations.py
new file mode 100644
index 000000000000..f36d429ac7a9
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_private_endpoint_connections_operations.py
@@ -0,0 +1,703 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+from io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, 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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", 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)
+
+
+def build_get_request(
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "environmentName": _SERIALIZER.url("environment_name", environment_name, "str", pattern=r"^[-\w\._\(\)]+$"),
+ "privateEndpointConnectionName": _SERIALIZER.url(
+ "private_endpoint_connection_name", private_endpoint_connection_name, "str"
+ ),
+ }
+
+ _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,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-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/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "environmentName": _SERIALIZER.url("environment_name", environment_name, "str", pattern=r"^[-\w\._\(\)]+$"),
+ "privateEndpointConnectionName": _SERIALIZER.url(
+ "private_endpoint_connection_name", private_endpoint_connection_name, "str"
+ ),
+ }
+
+ _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,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "environmentName": _SERIALIZER.url("environment_name", environment_name, "str", pattern=r"^[-\w\._\(\)]+$"),
+ "privateEndpointConnectionName": _SERIALIZER.url(
+ "private_endpoint_connection_name", private_endpoint_connection_name, "str"
+ ),
+ }
+
+ _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 ManagedEnvironmentPrivateEndpointConnectionsOperations: # pylint: disable=name-too-long
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`managed_environment_private_endpoint_connections` 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.PrivateEndpointConnection"]:
+ """List private endpoint connections for a given managed environment.
+
+ List private endpoint connections for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :return: An iterator like instance of either PrivateEndpointConnection or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :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.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("PrivateEndpointConnectionListResult", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def get(
+ self, resource_group_name: str, environment_name: str, private_endpoint_connection_name: str, **kwargs: Any
+ ) -> _models.PrivateEndpointConnection:
+ """Get a private endpoint connection for a given managed environment.
+
+ Get a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :return: PrivateEndpointConnection or the result of cls(response)
+ :rtype: ~azure.mgmt.appcontainers.models.PrivateEndpointConnection
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.PrivateEndpointConnection] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: Union[_models.PrivateEndpointConnection, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.PrivateEndpointConnection:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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.PrivateEndpointConnection] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(private_endpoint_connection_envelope, (IOBase, bytes)):
+ _content = private_endpoint_connection_envelope
+ else:
+ _json = self._serialize.body(private_endpoint_connection_envelope, "PrivateEndpointConnection")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: _models.PrivateEndpointConnection,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.PrivateEndpointConnection]:
+ """Update the state of a private endpoint connection for a given managed environment.
+
+ Update the state of a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :param private_endpoint_connection_envelope: The resource of private endpoint and its
+ properties. Required.
+ :type private_endpoint_connection_envelope:
+ ~azure.mgmt.appcontainers.models.PrivateEndpointConnection
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.PrivateEndpointConnection]:
+ """Update the state of a private endpoint connection for a given managed environment.
+
+ Update the state of a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :param private_endpoint_connection_envelope: The resource of private endpoint and its
+ properties. Required.
+ :type private_endpoint_connection_envelope: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ environment_name: str,
+ private_endpoint_connection_name: str,
+ private_endpoint_connection_envelope: Union[_models.PrivateEndpointConnection, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.PrivateEndpointConnection]:
+ """Update the state of a private endpoint connection for a given managed environment.
+
+ Update the state of a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :param private_endpoint_connection_envelope: The resource of private endpoint and its
+ properties. Is either a PrivateEndpointConnection type or a IO[bytes] type. Required.
+ :type private_endpoint_connection_envelope:
+ ~azure.mgmt.appcontainers.models.PrivateEndpointConnection or IO[bytes]
+ :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure.mgmt.appcontainers.models.PrivateEndpointConnection]
+ :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.PrivateEndpointConnection] = 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,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ private_endpoint_connection_envelope=private_endpoint_connection_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("PrivateEndpointConnection", pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.PrivateEndpointConnection].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.PrivateEndpointConnection](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _delete_initial( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, environment_name: str, private_endpoint_connection_name: str, **kwargs: Any
+ ) -> None:
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ 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 [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, 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) # type: ignore
+
+ @distributed_trace
+ def begin_delete(
+ self, resource_group_name: str, environment_name: str, private_endpoint_connection_name: str, **kwargs: Any
+ ) -> LROPoller[None]:
+ """Delete a private endpoint connection for a given managed environment.
+
+ Delete a private endpoint connection for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the Azure resource. Required.
+ :type private_endpoint_connection_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = kwargs.pop("headers", {}) or {}
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial( # type: ignore
+ resource_group_name=resource_group_name,
+ environment_name=environment_name,
+ private_endpoint_connection_name=private_endpoint_connection_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, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_private_link_resources_operations.py b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_private_link_resources_operations.py
new file mode 100644
index 000000000000..98a7d7d700f9
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environment_private_link_resources_operations.py
@@ -0,0 +1,182 @@
+# pylint: disable=too-many-lines,too-many-statements
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, 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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+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", "2024-02-02-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateLinkResources",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", 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 ManagedEnvironmentPrivateLinkResourcesOperations: # pylint: disable=name-too-long
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.appcontainers.ContainerAppsAPIClient`'s
+ :attr:`managed_environment_private_link_resources` 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.PrivateLinkResource"]:
+ """List private link resources for a given managed environment.
+
+ List private link resources for a given managed 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 Managed Environment. Required.
+ :type environment_name: str
+ :return: An iterator like instance of either PrivateLinkResource or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.appcontainers.models.PrivateLinkResource]
+ :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.PrivateLinkResourceListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ 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,
+ 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("PrivateLinkResourceListResult", 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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
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
index 82dec27ebb0a..dd1099b5e0c0 100644
--- 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -42,7 +47,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -107,7 +112,7 @@ def list(self, resource_group_name: str, environment_name: str, **kwargs: Any) -
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 077dcd413feb..e454444a702b 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
@@ -6,7 +6,8 @@
# 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
+import sys
+from typing import Any, Callable, Dict, Optional, Type, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -27,6 +28,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -101,7 +106,7 @@ def get_root(self, resource_group_name: str, environment_name: str, **kwargs: An
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 4d29d04b1a48..c4333f82ae92 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
@@ -7,7 +7,8 @@
# 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 sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -32,6 +33,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +48,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -67,7 +72,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +104,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +137,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,7 +173,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -201,7 +206,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -237,7 +242,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -270,7 +275,7 @@ def build_list_workload_profile_states_request( # pylint: disable=name-too-long
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -332,7 +337,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ManagedEnviro
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ManagedEnvironmentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -414,7 +419,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ManagedEnvironmentsCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -493,7 +498,7 @@ def get(self, resource_group_name: str, environment_name: str, **kwargs: Any) ->
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -544,7 +549,7 @@ def _create_or_update_initial(
environment_envelope: Union[_models.ManagedEnvironment, IO[bytes]],
**kwargs: Any
) -> _models.ManagedEnvironment:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -738,7 +743,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, environment_name: str, **kwargs: Any
) -> None:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -839,7 +844,7 @@ def _update_initial(
environment_envelope: Union[_models.ManagedEnvironment, IO[bytes]],
**kwargs: Any
) -> Optional[_models.ManagedEnvironment]:
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1045,7 +1050,7 @@ def get_auth_token(
:rtype: ~azure.mgmt.appcontainers.models.EnvironmentAuthToken
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1113,7 +1118,7 @@ def list_workload_profile_states(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.WorkloadProfileStatesCollection] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 efdd9a9c7d60..c48dbdf1137e 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
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -28,6 +29,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -41,7 +46,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -74,7 +79,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -108,7 +113,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -145,7 +150,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -209,7 +214,7 @@ def list(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStoragesCollection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -272,7 +277,7 @@ def get(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -408,7 +413,7 @@ def create_or_update(
:rtype: ~azure.mgmt.appcontainers.models.ManagedEnvironmentStorage
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -484,7 +489,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 56f460ad18ba..74b05b3b5a29 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
@@ -7,7 +7,8 @@
# 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, Optional, TypeVar, Union, overload
+import sys
+from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -28,6 +29,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -41,7 +46,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -174,7 +179,7 @@ def check_name_availability(
:rtype: ~azure.mgmt.appcontainers.models.CheckNameAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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 1a05294e4428..2fb5bc23a686 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,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-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -88,7 +93,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.OperationDetail"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AvailableOperations] = kwargs.pop("cls", None)
- error_map = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
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
index 03bc72d24244..3a9b6f2009fe 100644
--- 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
@@ -6,7 +6,8 @@
# 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 sys
+from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -29,6 +30,10 @@
from .._serialization import Serializer
from .._vendor import ContainerAppsAPIClientMixinABC, _convert_request
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -40,7 +45,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-02-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-02-02-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -99,7 +104,7 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.Usage"]:
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 = {
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_create_or_update.py
index e98b4e1f846b..6dbe68aaeb35 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_create_or_update.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -58,6 +59,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_delete.py
index fab04833c272..a31eb93a0677 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_get.py
index 26b4f027f9c5..03e4a7893c65 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_list.py
index 2ff4b5bb7403..5891b4f5885d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_patch.py
index e351bd2e4a3d..5218b3bb7715 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/app_resiliency_patch.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -43,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json
if __name__ == "__main__":
main()
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 bbc6ec8fc9b3..773089696138 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -53,6 +54,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6c96c3fdc91d..5cffa9e479de 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 1095283b90d4..595ac4ef7543 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 8edbbff4ffae..114db3de2e89 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_ListByContainer.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 865e1cbbd4fb..7454bcecf330 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AvailableWorkloadProfiles_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 dff89c99c439..c3b003ceabff 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/BillingMeters_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index 0f6707c6de5b..8d91612d738d 100644
--- 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -62,6 +63,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index f014b49a4339..7740feb52c6e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -36,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index e48ce3a5ca80..101f7d5bb6e9 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index 812800c9de41..59ef1c9e5060 100644
--- 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index 67032bc436ba..874a0c0dbf72 100644
--- 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -35,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index f5e123b1badb..672993067a90 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builders_update.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -40,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Update.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index 4fde89dd07ac..9533dd980806 100644
--- 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -67,6 +68,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index 0cd6d19d5c57..6d819de6b1ed 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -37,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index 7c6dda4f0e38..bde5680080ed 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_auth_token.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_auth_token.py
index 0adf09f0fcc0..d6ce6c932e9a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_auth_token.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/builds_list_auth_token.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListAuthToken.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.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
index 804827d40261..a02f74c4311f 100644
--- 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="00000000-0000-0000-0000-000000000000",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListByBuilderResource.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 675eb5b8c480..0774e9bab69b 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update_from_key_vault.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update_from_key_vault.py
index 68eda9fa1946..de53c3aac788 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update_from_key_vault.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_create_or_update_from_key_vault.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_CreateOrUpdate_FromKeyVault.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate_FromKeyVault.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 2989b2951a35..8bb4404ef977 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 49eeaff2ccb1..2e5d5bb18238 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificate_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 92c3839cc465..45fa15e33431 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -43,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_CheckNameAvailability.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ec5a8b88a5e7..e9c918e5dfee 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_ListByManagedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 4006011a62c5..57f82a22f0dc 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/certificates_patch.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -41,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 24c5e8187dd4..1e8f72d3c683 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 eafde70f5640..d329c17ccc2b 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsCertificate_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f54e0c564dae..419e219bd094 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 e7f072087734..229925830779 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -43,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 06e06685241e..823951d29cca 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 49e23990fabf..1fefc7212cbc 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -41,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsCertificates_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6e8f8e7c6140..af89657d21f8 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -51,6 +52,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 30dc14394373..f49874663a5a 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -63,6 +64,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 14fe8bfd6a9f..a3fc7b088da0 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 4fbf110564f2..09ebd07c0ca5 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f43c438ddde6..796be604b538 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsDaprComponents_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 5c81a547ae0c..a537d8bb0c68 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 7bca2f8f07cd..be9dcb64e9ef 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 5d8f8bd24481..e38dbea88867 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 52df79f1d713..631695a0bfad 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 211eaa06ed11..fc94a05897a6 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -35,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 860f287b5d10..689c55ca03b6 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 adf5251229f1..74fa080da714 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -50,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 d4ba700860ea..7e5ea38e51de 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsStorages_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 2b2bf696fe9a..02654aa7b214 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsStorages_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 cec40e7e7126..ecc98c324370 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironmentsStorages_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_delete.py
new file mode 100644
index 000000000000..c5abdd9817bb
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_delete.py
@@ -0,0 +1,43 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.container_apps_builds.begin_delete(
+ resource_group_name="rg",
+ container_app_name="testCapp",
+ build_name="testBuild",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_get.py
new file mode 100644
index 000000000000..e91440c09175
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_get.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.container_apps_builds.get(
+ resource_group_name="rg",
+ container_app_name="testCapp",
+ build_name="testBuild",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_list_by_container_app.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_list_by_container_app.py
new file mode 100644
index 000000000000..e8b318324f17
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_builds_list_by_container_app.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_builds_list_by_container_app.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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.container_apps_builds_by_container_app.list(
+ resource_group_name="rg",
+ container_app_name="testCapp",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_ListByContainerApp.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 ce1cd05f4de8..bb2435f01d21 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -40,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CheckNameAvailability.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 9f0444130090..3b1598c70236 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,12 @@ def main():
resource_group_name="rg",
container_app_name="testcontainerApp0",
container_app_envelope={
+ "identity": {
+ "type": "SystemAssigned,UserAssigned",
+ "userAssignedIdentities": {
+ "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": {}
+ },
+ },
"location": "East US",
"properties": {
"configuration": {
@@ -48,6 +55,13 @@ def main():
"httpReadBufferSize": 30,
"logLevel": "debug",
},
+ "identitySettings": [
+ {
+ "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
+ "lifecycle": "All",
+ },
+ {"identity": "system", "lifecycle": "Init"},
+ ],
"ingress": {
"additionalPortMappings": [
{"external": True, "targetPort": 1234},
@@ -94,6 +108,18 @@ def main():
"traffic": [{"label": "production", "revisionName": "testcontainerApp0-ab1234", "weight": 100}],
},
"maxInactiveRevisions": 10,
+ "runtime": {
+ "dotnet": {"autoConfigureDataProtection": True},
+ "java": {
+ "enableMetrics": True,
+ "javaAgent": {
+ "enabled": True,
+ "logging": {
+ "loggerSettings": [{"level": "debug", "logger": "org.springframework.boot"}]
+ },
+ },
+ },
+ },
"service": {"type": "redis"},
},
"environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
@@ -136,7 +162,28 @@ def main():
{
"custom": {"metadata": {"concurrentRequests": "50"}, "type": "http"},
"name": "httpscalingrule",
- }
+ },
+ {
+ "custom": {
+ "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
+ "metadata": {
+ "messageCount": "5",
+ "namespace": "mynamespace",
+ "queueName": "myqueue",
+ },
+ "type": "azure-servicebus",
+ },
+ "name": "servicebus",
+ },
+ {
+ "azureQueue": {
+ "accountName": "account1",
+ "identity": "system",
+ "queueLength": 1,
+ "queueName": "queue1",
+ },
+ "name": "azure-queue",
+ },
],
},
"serviceBinds": [
@@ -159,6 +206,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update_connected_environment.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update_connected_environment.py
index 02be9846c6a6..dd5762715213 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update_connected_environment.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_create_or_update_connected_environment.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -98,6 +99,18 @@ def main():
"traffic": [{"label": "production", "revisionName": "testcontainerApp0-ab1234", "weight": 100}],
},
"maxInactiveRevisions": 10,
+ "runtime": {
+ "dotnet": {"autoConfigureDataProtection": True},
+ "java": {
+ "enableMetrics": True,
+ "javaAgent": {
+ "enabled": True,
+ "logging": {
+ "loggerSettings": [{"level": "debug", "logger": "org.springframework.boot"}]
+ },
+ },
+ },
+ },
},
"environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube",
"template": {
@@ -145,6 +158,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CreateOrUpdate_ConnectedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate_ConnectedEnvironment.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 d4b0b91bd67d..f2492b031801 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0621e4623d72..eb69969d6c17 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="f07f3711-b45e-40fe-a941-4e6d93f851e6",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerAppsDiagnostics_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 948e502bc334..ec07eaa68a21 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="f07f3711-b45e-40fe-a941-4e6d93f851e6",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerAppsDiagnostics_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a8f09b0d5a5b..9f455f03e01d 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 97280c262a21..e79c163c77fe 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_GetAuthToken.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_GetAuthToken.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_kind_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_kind_create_or_update.py
new file mode 100644
index 000000000000..39716abf4e0a
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_kind_create_or_update.py
@@ -0,0 +1,67 @@
+# 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, IO, Union
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_kind_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.container_apps.begin_create_or_update(
+ resource_group_name="rg",
+ container_app_name="testcontainerAppKind",
+ container_app_envelope={
+ "kind": "workflowapp",
+ "location": "East Us",
+ "managedBy": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind",
+ "properties": {
+ "configuration": {
+ "activeRevisionsMode": "Single",
+ "ingress": {"allowInsecure": True, "external": True, "targetPort": 80},
+ },
+ "managedEnvironmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3",
+ "template": {
+ "containers": [
+ {
+ "image": "default/logicapps-base:latest",
+ "name": "logicapps-container",
+ "resources": {"cpu": 1, "memory": "2.0Gi"},
+ }
+ ],
+ "scale": {"maxReplicas": 30, "minReplicas": 1},
+ },
+ },
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Kind_CreateOrUpdate.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 3ddd12b249a7..42fe796c23f8 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 762384b44e69..c6b91cea4dd8 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -35,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 e39c06791164..938a9b88f3e5 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 eb5fab29e6b8..4269e2440f94 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 5c90c8d56eac..1f0d2c2f3fdd 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -76,6 +77,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 e0ebd96a01a5..b7d1ca859cd0 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -81,6 +82,18 @@ def main():
"traffic": [{"label": "production", "revisionName": "testcontainerApp0-ab1234", "weight": 100}],
},
"maxInactiveRevisions": 10,
+ "runtime": {
+ "dotnet": {"autoConfigureDataProtection": True},
+ "java": {
+ "enableMetrics": True,
+ "javaAgent": {
+ "enabled": True,
+ "logging": {
+ "loggerSettings": [{"level": "debug", "logger": "org.springframework.boot"}]
+ },
+ },
+ },
+ },
"service": {"type": "redis"},
},
"template": {
@@ -135,6 +148,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_apply.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_apply.py
new file mode 100644
index 000000000000..603893e3124a
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_apply.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.container_apps_patches.begin_apply(
+ resource_group_name="rg",
+ container_app_name="test-app",
+ patch_name="testPatch-25fe4b",
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Apply.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_delete.py
new file mode 100644
index 000000000000..11eee68a41be
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_delete.py
@@ -0,0 +1,43 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.container_apps_patches.begin_delete(
+ resource_group_name="rg",
+ container_app_name="test-app",
+ patch_name="testPatch-25fe4b",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_get.py
new file mode 100644
index 000000000000..54cd7d391226
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_get.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.container_apps_patches.get(
+ resource_group_name="rg",
+ container_app_name="test-app",
+ patch_name="testPatch-25fe4b",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_list_by_container_app.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_list_by_container_app.py
new file mode 100644
index 000000000000..8d7f81cb3db1
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_list_by_container_app.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_patches_list_by_container_app.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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ response = client.container_apps_patches.list_by_container_app(
+ resource_group_name="rg",
+ container_app_name="test-app",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_ListByContainerApp.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_skip_configure.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_skip_configure.py
new file mode 100644
index 000000000000..e5f2ccd608c0
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_patches_skip_configure.py
@@ -0,0 +1,46 @@
+# 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, IO, Union
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="00000000-0000-0000-0000-000000000000",
+ )
+
+ client.container_apps_patches.begin_skip_configure(
+ resource_group_name="rg",
+ container_app_name="test-app",
+ patch_name="testPatch-25fe4b",
+ patch_skip_config={"skip": True},
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Skip_Configure.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_source_to_cloud_app_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_source_to_cloud_app_create_or_update.py
new file mode 100644
index 000000000000..5b2beaeeac99
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/container_apps_source_to_cloud_app_create_or_update.py
@@ -0,0 +1,167 @@
+# 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, IO, Union
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python container_apps_source_to_cloud_app_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.container_apps.begin_create_or_update(
+ resource_group_name="rg",
+ container_app_name="testcontainerApp0",
+ container_app_envelope={
+ "location": "East US",
+ "properties": {
+ "configuration": {
+ "dapr": {
+ "appPort": 3000,
+ "appProtocol": "http",
+ "enableApiLogging": True,
+ "enabled": True,
+ "httpMaxRequestSize": 10,
+ "httpReadBufferSize": 30,
+ "logLevel": "debug",
+ },
+ "ingress": {
+ "additionalPortMappings": [
+ {"external": True, "targetPort": 1234},
+ {"exposedPort": 3456, "external": False, "targetPort": 2345},
+ ],
+ "clientCertificateMode": "accept",
+ "corsPolicy": {
+ "allowCredentials": True,
+ "allowedHeaders": ["HEADER1", "HEADER2"],
+ "allowedMethods": ["GET", "POST"],
+ "allowedOrigins": ["https://a.test.com", "https://b.test.com"],
+ "exposeHeaders": ["HEADER3", "HEADER4"],
+ "maxAge": 1234,
+ },
+ "customDomains": [
+ {
+ "bindingType": "SniEnabled",
+ "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com",
+ "name": "www.my-name.com",
+ },
+ {
+ "bindingType": "SniEnabled",
+ "certificateId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com",
+ "name": "www.my-other-name.com",
+ },
+ ],
+ "external": True,
+ "ipSecurityRestrictions": [
+ {
+ "action": "Allow",
+ "description": "Allowing all IP's within the subnet below to access containerapp",
+ "ipAddressRange": "192.168.1.1/32",
+ "name": "Allow work IP A subnet",
+ },
+ {
+ "action": "Allow",
+ "description": "Allowing all IP's within the subnet below to access containerapp",
+ "ipAddressRange": "192.168.1.1/8",
+ "name": "Allow work IP B subnet",
+ },
+ ],
+ "stickySessions": {"affinity": "sticky"},
+ "targetPort": 3000,
+ "traffic": [{"label": "production", "revisionName": "testcontainerApp0-ab1234", "weight": 100}],
+ },
+ "maxInactiveRevisions": 10,
+ "service": {"type": "redis"},
+ },
+ "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
+ "patchingConfiguration": {"patchingMode": "Automatic"},
+ "template": {
+ "containers": [
+ {
+ "image": "",
+ "imageType": "CloudBuild",
+ "name": "testcontainerApp0",
+ "probes": [
+ {
+ "httpGet": {
+ "httpHeaders": [{"name": "Custom-Header", "value": "Awesome"}],
+ "path": "/health",
+ "port": 8080,
+ },
+ "initialDelaySeconds": 3,
+ "periodSeconds": 3,
+ "type": "Liveness",
+ }
+ ],
+ "volumeMounts": [
+ {"mountPath": "/mnt/path1", "subPath": "subPath1", "volumeName": "azurefile"},
+ {"mountPath": "/mnt/path2", "subPath": "subPath2", "volumeName": "nfsazurefile"},
+ ],
+ }
+ ],
+ "initContainers": [
+ {
+ "args": ["-c", "while true; do echo hello; sleep 10;done"],
+ "command": ["/bin/sh"],
+ "image": "repo/testcontainerApp0:v4",
+ "name": "testinitcontainerApp0",
+ "resources": {"cpu": 0.2, "memory": "100Mi"},
+ }
+ ],
+ "scale": {
+ "maxReplicas": 5,
+ "minReplicas": 1,
+ "rules": [
+ {
+ "custom": {"metadata": {"concurrentRequests": "50"}, "type": "http"},
+ "name": "httpscalingrule",
+ }
+ ],
+ },
+ "serviceBinds": [
+ {
+ "clientType": "dotnet",
+ "customizedKeys": {"DesiredKey": "defaultKey"},
+ "name": "redisService",
+ "serviceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService",
+ }
+ ],
+ "volumes": [
+ {"name": "azurefile", "storageName": "storage", "storageType": "AzureFile"},
+ {"name": "nfsazurefile", "storageName": "nfsStorage", "storageType": "NfsAzureFile"},
+ ],
+ },
+ "workloadProfileName": "My-GP-01",
+ },
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_SourceToCloudApp_CreateOrUpdate.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 9125f2d8182a..f34a5d255568 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Start.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0fc89828ced7..31ac606383c7 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Stop.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 bd84fa656785..95be8460e38f 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -75,6 +76,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_delete.py
index eb3c02bb76d0..f3ee502ae8d1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponentResiliencyPolicies_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_get.py
index d3a007f91680..85ca5172379d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -39,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponentResiliencyPolicies_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_list.py
index 1fc552c48b8b..15b4b278f8ee 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policies_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -39,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponentResiliencyPolicies_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_all_options.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_all_options.py
index 399c7ed65abf..4980e6ae8471 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_all_options.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_all_options.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -61,6 +62,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_outbound_only.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_outbound_only.py
index f3b4323bad94..7ee7f4030d56 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_outbound_only.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_outbound_only.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -53,6 +54,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_sparse_options.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_sparse_options.py
index 692e76e00cf4..e37be2013c52 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_sparse_options.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_component_resiliency_policy_create_or_update_sparse_options.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -53,6 +54,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.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 98d1b2f380e4..2b6b10c1b3a8 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -63,6 +64,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 adff70eea4af..d79fae4c80b9 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -63,6 +64,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 edfbdb28f867..e8aafcb66e95 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ec4b1a935bb7..c65ac00cf183 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 e797ea7a4c3b..21f39007b48d 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Get_Secrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 742c780dd094..1b9d8b5592f2 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6071afa6717d..b3f131f04033 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_bulk_subscribe_and_scopes.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_bulk_subscribe_and_scopes.py
index c78a49eb395b..f27abc7a501a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_bulk_subscribe_and_scopes.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_bulk_subscribe_and_scopes.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -49,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_default_route.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_default_route.py
index 4756e5f0cf94..9d05dc741872 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_default_route.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_default_route.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -43,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_CreateOrUpdate_DefaultRoute.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_DefaultRoute.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_route_rules_and_metadata.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_route_rules_and_metadata.py
index 1005320a7c2a..1a8baf06efda 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_route_rules_and_metadata.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_create_or_update_route_rules_and_metadata.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -54,6 +55,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_delete.py
index ba81e2ee5418..72b2413229f9 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_bulk_subscribe_and_scopes.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_bulk_subscribe_and_scopes.py
index 65b1aaafe2ec..6ea7aeb579a0 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_bulk_subscribe_and_scopes.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_bulk_subscribe_and_scopes.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_default_route.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_default_route.py
index 505a1dc57b79..774785480b44 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_default_route.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_default_route.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_route_rules_and_metadata.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_route_rules_and_metadata.py
index 1b75ba87e155..55b7906a1b08 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_route_rules_and_metadata.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_get_route_rules_and_metadata.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_list.py
index 53d9fdff5473..44d6f653cc97 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dapr_subscriptions_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update.py
index 083c21be5588..7128690698f7 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -46,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update_service_bind.py
index 124f25f97468..4ce3f8a459c1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_create_or_update_service_bind.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -52,6 +53,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_CreateOrUpdate_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_CreateOrUpdate_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_delete.py
index 8f767c38f83f..63bbb71ede19 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get.py
index 527ce8b43bcb..6520ed1ad680 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get_service_bind.py
index bffb648b2e74..d98e67dc8b55 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_get_service_bind.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Get_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list.py
index 0505fb4bf395..9be0c300249f 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list_service_bind.py
index fd153eb24c56..0798f00591d4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_list_service_bind.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_List_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch.py
index 6dd065b5ee1b..0f4562eba8bb 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -46,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch_service_bind.py
index 7289c041a76c..455762ccb5b4 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/dot_net_components_patch_service_bind.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -52,6 +53,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Patch_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/functions_extension_post.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/functions_extension_post.py
new file mode 100644
index 000000000000..f41cf3208fff
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/functions_extension_post.py
@@ -0,0 +1,45 @@
+# 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 functions_extension_post.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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.functions_extension.invoke_functions_host(
+ resource_group_name="rg",
+ container_app_name="testcontainerApp0",
+ revision_name="testcontainerApp0-pjxhsye",
+ function_app_name="testcontainerApp0",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update.py
index 703c852b6736..79eafbb7c740 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -49,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update_service_bind.py
index a7fd208f05a6..8a5a4306318a 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_create_or_update_service_bind.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -55,6 +56,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_CreateOrUpdate_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_delete.py
index c90fd77d7b3d..0a17276173dd 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get.py
index 957441f7e6b6..31e9ee54cb2d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get_service_bind.py
index 51378453d799..2f33f2e476e7 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_get_service_bind.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Get_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list.py
index 0fb2ce7d5a59..e5641d8ce45b 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list_service_bind.py
index bfbbba681c61..1d4dc70b99b3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_list_service_bind.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_List_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List_ServiceBind.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch.py
index 95689cb92c43..6cb1e3412a91 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -49,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch_service_bind.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch_service_bind.py
index 4c0daf6835f0..d4dec7e1de0c 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch_service_bind.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/java_components_patch_service_bind.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -55,6 +56,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Patch_ServiceBind.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch_ServiceBind.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 226e0f4c27dc..5a8824ac8ac0 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,9 +37,22 @@ def main():
resource_group_name="rg",
job_name="testcontainerAppsJob0",
job_envelope={
+ "identity": {
+ "type": "SystemAssigned,UserAssigned",
+ "userAssignedIdentities": {
+ "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": {}
+ },
+ },
"location": "East US",
"properties": {
"configuration": {
+ "identitySettings": [
+ {
+ "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
+ "lifecycle": "All",
+ },
+ {"identity": "system", "lifecycle": "Init"},
+ ],
"manualTriggerConfig": {"parallelism": 4, "replicaCompletionCount": 1},
"replicaRetryLimit": 10,
"replicaTimeout": 10,
@@ -84,6 +98,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_connected_environment.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_connected_environment.py
index 3a34b6d23ba3..c653109daf9e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_connected_environment.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_createor_update_connected_environment.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -84,6 +85,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate_ConnectedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate_ConnectedEnvironment.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 76642c7b3be0..4d3145ca82a3 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,12 @@ def main():
resource_group_name="rg",
job_name="testcontainerAppsJob0",
job_envelope={
+ "identity": {
+ "type": "UserAssigned",
+ "userAssignedIdentities": {
+ "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity": {}
+ },
+ },
"location": "East US",
"properties": {
"configuration": {
@@ -48,6 +55,7 @@ def main():
"pollingInterval": 40,
"rules": [
{
+ "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
"metadata": {"topicName": "my-topic"},
"name": "servicebuscalingrule",
"type": "azure-servicebus",
@@ -78,6 +86,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate_EventTrigger.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 707d5be599a9..a5f8a4d5ac96 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_delete.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_delete.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 71e6f219196e..bf6290df66a7 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Execution_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 5c42446c93b7..30dc9c6effe8 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Executions_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 13df12d0d25a..6d5ebea7bae3 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get_detector.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get_detector.py
index 34492b40251e..54001019f29d 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get_detector.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_get_detector.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="f07f3711-b45e-40fe-a941-4e6d93f851e6",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_GetDetector.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_detectors.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_detectors.py
index 43aa91b84e69..b5d2c0f65301 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_detectors.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_list_detectors.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="f07f3711-b45e-40fe-a941-4e6d93f851e6",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListDetectors.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.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 a00a65ae0774..5dc6df21d303 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListSecrets.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 fdd90a62cd4d..e17b5dea27ab 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_patch.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_patch.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -78,6 +79,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_proxy_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_proxy_get.py
index cb08ef600bde..9696c6585f10 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_proxy_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_proxy_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ProxyGet.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.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 9c45dd9143a2..27201c09ffbf 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_start.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/job_start.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Start.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a35dbe1fdb88..46c75f02946b 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Execution.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 fc6afaa7d9e4..ab4f7bf2912e 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Multiple.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 bb74c063d810..b4b5e948ad14 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 417ccd48b7b5..db36908ff1f6 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -35,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f82b4b92f33e..35f3bc8b6d93 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 d81ae7f29fbe..143f01621ceb 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 fcf0c6f806e7..41cd9088910b 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 7d3485b3dc42..60e6f4427a85 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificates_ListByManagedEnvironment.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 3d48fd683378..4647c4ca0a83 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -41,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificates_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 9654c3282d2c..7ca356af513b 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="f07f3711-b45e-40fe-a941-4e6d93f851e6",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 5869e15ea3a5..5df36e7437b2 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="f07f3711-b45e-40fe-a941-4e6d93f851e6",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentDiagnostics_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentDiagnostics_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_create_or_update.py
new file mode 100644
index 000000000000..cee78e0bfc75
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_create_or_update.py
@@ -0,0 +1,49 @@
+# 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, IO, Union
+
+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_private_endpoint_connections_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
+ )
+
+ response = client.managed_environment_private_endpoint_connections.begin_create_or_update(
+ resource_group_name="examplerg",
+ environment_name="managedEnv",
+ private_endpoint_connection_name="jlaw-demo1",
+ private_endpoint_connection_envelope={
+ "properties": {"privateLinkServiceConnectionState": {"actionsRequired": "None", "status": "Approved"}}
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_delete.py
new file mode 100644
index 000000000000..e7367dd8f486
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_delete.py
@@ -0,0 +1,43 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python managed_environment_private_endpoint_connections_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
+ )
+
+ client.managed_environment_private_endpoint_connections.begin_delete(
+ resource_group_name="examplerg",
+ environment_name="managedEnv",
+ private_endpoint_connection_name="jlaw-demo1",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_get.py
new file mode 100644
index 000000000000..b00f1c75496b
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_get.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python managed_environment_private_endpoint_connections_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
+ )
+
+ response = client.managed_environment_private_endpoint_connections.get(
+ resource_group_name="examplerg",
+ environment_name="managedEnv",
+ private_endpoint_connection_name="jlaw-demo1",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_list.py
new file mode 100644
index 000000000000..5fa0c6a0e2c3
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_endpoint_connections_list.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python managed_environment_private_endpoint_connections_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
+ )
+
+ response = client.managed_environment_private_endpoint_connections.list(
+ resource_group_name="examplerg",
+ environment_name="managedEnv",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_List.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_link_resources_list.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_link_resources_list.py
new file mode 100644
index 000000000000..cf7385fcb262
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environment_private_link_resources_list.py
@@ -0,0 +1,44 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python managed_environment_private_link_resources_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
+ )
+
+ response = client.managed_environment_private_link_resources.list(
+ resource_group_name="examplerg",
+ environment_name="managedEnv",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateLinkResources_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
index 49df9cba2d41..c8f6d6f2cee0 100644
--- 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="subid",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentUsages_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 d14f9aa12b11..a424b4e2e219 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -77,6 +78,7 @@ def main():
"tracesConfiguration": {"destinations": ["appInsights"]},
},
"peerAuthentication": {"mtls": {"enabled": True}},
+ "peerTrafficConfiguration": {"encryption": {"enabled": True}},
"vnetConfiguration": {
"infrastructureSubnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1"
},
@@ -108,6 +110,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 bf8b11e1fa3d..981ed7457d6e 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -77,6 +78,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 75019f367c6c..1c0899085267 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -36,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0f70c08f3366..b0438a0d0d2d 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 e2020d33fdc3..3669d0cdb713 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_GetAuthToken.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6a42e68a13fb..6242c1ed6d5d 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_ListByResourceGroup.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 157f4e41569a..e08600fcb2f0 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -35,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_ListBySubscription.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 7fbce5c40111..31c18b2bad52 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6c8a286e29f8..710a267989f5 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -40,6 +41,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Patch.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 e1b2ea86cf93..6aa6c51cbceb 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -50,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update_nfs_azure_file.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update_nfs_azure_file.py
index 41af4163e581..9e81a78b80b8 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update_nfs_azure_file.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_create_or_update_nfs_azure_file.py
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -43,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.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 2998b568b579..1cef5fbdfe86 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentsStorages_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0d0955564cd3..645ad63fb13b 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentsStorages_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Get.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get_nfs_azure_file.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get_nfs_azure_file.py
index e61419aaacb1..0a1167c24cf7 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get_nfs_azure_file.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/managed_environments_storages_get_nfs_azure_file.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.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 eed274629609..1c0ea240cac8 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="8efdecc5-919e-44eb-b179-915dca89ebf9",
)
@@ -37,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironmentsStorages_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 119af87df18c..69d49e7ea88e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/operations_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/operations_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="SUBSCRIPTION_ID",
)
@@ -35,6 +36,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Operations_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Operations_List.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 f1e6923b9510..4955b873f020 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -39,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ced67bc69945..674a50bf5d87 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/replicas_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 16bf6566e1a4..e7eacc9cc543 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_activate.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_activate.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Activate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 12cf26fe99f8..2babc47da6d1 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_deactivate.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_deactivate.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Deactivate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 dd0b6278c92e..196075b53cc2 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_get.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_get.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 c9bde6a3e2c6..74304665b3ae 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 3e581135da72..9da642c9b49e 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_restart.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/revisions_restart.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
)
@@ -37,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Restart.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Restart.json
if __name__ == "__main__":
main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_create_or_update.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_create_or_update.py
new file mode 100644
index 000000000000..ab6097b03b22
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_create_or_update.py
@@ -0,0 +1,67 @@
+# 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, IO, Union
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python session_pools_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(),
+ session_pool_name="testsessionpool",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.container_apps_session_pools.begin_create_or_update(
+ resource_group_name="rg",
+ session_pool_envelope={
+ "location": "East US",
+ "properties": {
+ "containerType": "CustomContainer",
+ "customContainerTemplate": {
+ "containers": [
+ {
+ "args": ["-c", "while true; do echo hello; sleep 10;done"],
+ "command": ["/bin/sh"],
+ "image": "repo/testcontainer:v4",
+ "name": "testinitcontainer",
+ "resources": {"cpu": 0.25, "memory": "0.5Gi"},
+ }
+ ],
+ "ingress": {"targetPort": 80},
+ },
+ "dynamicPoolConfiguration": {"cooldownPeriodInSeconds": 600, "executionType": "Timed"},
+ "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
+ "poolManagementType": "Dynamic",
+ "scaleConfiguration": {"maxConcurrentSessions": 500, "readySessionInstances": 100},
+ "sessionNetworkConfiguration": {"status": "EgressEnabled"},
+ },
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_CreateOrUpdate.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_delete.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_delete.py
new file mode 100644
index 000000000000..d04b14b5b9f5
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_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 session_pools_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(),
+ session_pool_name="testsessionpool",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ client.container_apps_session_pools.begin_delete(
+ resource_group_name="rg",
+ ).result()
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_get.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_get.py
new file mode 100644
index 000000000000..11f9dd346370
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_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 session_pools_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(),
+ session_pool_name="testsessionpool",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.container_apps_session_pools.get(
+ resource_group_name="rg",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_list_by_resource_group.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_list_by_resource_group.py
new file mode 100644
index 000000000000..104cced4f60f
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_list_by_resource_group.py
@@ -0,0 +1,43 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python session_pools_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.container_apps_session_pools.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/2024-02-02-preview/examples/SessionPools_ListByResourceGroup.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_list_by_subscription.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_list_by_subscription.py
new file mode 100644
index 000000000000..f15a744313c0
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_list_by_subscription.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 session_pools_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(),
+ session_pool_name="SESSION_POOL_NAME",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.container_apps_session_pools.list_by_subscription()
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_ListBySubscription.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_patch.py b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_patch.py
new file mode 100644
index 000000000000..40503f4d52be
--- /dev/null
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/session_pools_patch.py
@@ -0,0 +1,63 @@
+# 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, IO, Union
+
+from azure.identity import DefaultAzureCredential
+
+from azure.mgmt.appcontainers import ContainerAppsAPIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-appcontainers
+# USAGE
+ python session_pools_patch.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(),
+ session_pool_name="testsessionpool",
+ subscription_id="34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
+ )
+
+ response = client.container_apps_session_pools.begin_update(
+ resource_group_name="rg",
+ session_pool_envelope={
+ "properties": {
+ "customContainerTemplate": {
+ "containers": [
+ {
+ "args": ["-c", "while true; do echo hello; sleep 10;done"],
+ "command": ["/bin/sh"],
+ "image": "repo/testcontainer:v4",
+ "name": "testinitcontainer",
+ "resources": {"cpu": 0.25, "memory": "0.5Gi"},
+ }
+ ],
+ "ingress": {"targetPort": 80},
+ },
+ "dynamicPoolConfiguration": {"cooldownPeriodInSeconds": 600, "executionType": "Timed"},
+ "scaleConfiguration": {"maxConcurrentSessions": 500, "readySessionInstances": 100},
+ "sessionNetworkConfiguration": {"status": "EgressEnabled"},
+ }
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Patch.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 b2a93c97a1fa..69292aff05a1 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
@@ -29,6 +29,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -63,6 +64,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_CreateOrUpdate.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ca22d4352d20..84567d8d9bc4 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -37,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Delete.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 9276b931e314..47290b049ed8 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -38,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Get.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 3d8e2b44f018..46e99894e080 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="651f8027-33e8-4ec4-97b4-f6e9f3dc8744",
)
@@ -38,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_ListByContainer.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index cea7244da098..809ccd2a3b03 100644
--- 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
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="d27c3573-f76e-4b26-b871-0ccd2203d08c",
)
@@ -34,6 +35,6 @@ def main():
print(response)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Subscriptions_GetCustomDomainVerificationId.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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
index c3633f4f65d5..eb12e6c83a66 100644
--- a/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/usages_list.py
+++ b/sdk/appcontainers/azure-mgmt-appcontainers/generated_samples/usages_list.py
@@ -27,6 +27,7 @@
def main():
client = ContainerAppsAPIClient(
credential=DefaultAzureCredential(),
+ session_pool_name="SESSION_POOL_NAME",
subscription_id="subid",
)
@@ -37,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Usages_List.json
+# x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json
if __name__ == "__main__":
main()