From 70fb3c5dd1a59ce17d855c34f96d3c6ce8370971 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 12 Apr 2022 10:58:45 +0000 Subject: [PATCH] CodeGen from PR 18660 in Azure/azure-rest-api-specs Merge 3c4872f4a43fbe1a285830461f48d8c0a5ffeee8 into f560f78c86eaf6dfdee064d3a36d0a12c653efa0 --- sdk/app/azure-mgmt-app/_meta.json | 4 +- .../azure/mgmt/app/_configuration.py | 2 +- .../mgmt/app/_container_apps_api_client.py | 47 +- .../azure/mgmt/app/_metadata.json | 15 +- .../azure/mgmt/app/aio/_configuration.py | 2 +- .../app/aio/_container_apps_api_client.py | 46 +- .../azure/mgmt/app/aio/operations/__init__.py | 18 +- .../operations/_certificates_operations.py | 99 ++- ..._container_apps_auth_configs_operations.py | 11 +- .../operations/_container_apps_operations.py | 130 ++-- ...ainer_apps_revision_replicas_operations.py | 16 +- .../_container_apps_revisions_operations.py | 52 +- ...ntainer_apps_source_controls_operations.py | 11 +- .../operations/_dapr_components_operations.py | 100 ++- .../_managed_environments_operations.py | 171 +++-- ...anaged_environments_storages_operations.py | 74 +- .../aio/operations/_namespaces_operations.py | 107 +++ .../mgmt/app/aio/operations/_operations.py | 5 +- .../azure/mgmt/app/models/__init__.py | 12 +- .../_container_apps_api_client_enums.py | 17 +- .../azure/mgmt/app/models/_models_py3.py | 691 ++++++++++-------- .../azure/mgmt/app/operations/__init__.py | 18 +- .../operations/_certificates_operations.py | 154 ++-- ..._container_apps_auth_configs_operations.py | 18 +- .../operations/_container_apps_operations.py | 144 ++-- ...ainer_apps_revision_replicas_operations.py | 26 +- .../_container_apps_revisions_operations.py | 89 ++- ...ntainer_apps_source_controls_operations.py | 18 +- .../operations/_dapr_components_operations.py | 162 +++- .../_managed_environments_operations.py | 208 ++++-- ...anaged_environments_storages_operations.py | 118 +-- .../app/operations/_namespaces_operations.py | 154 ++++ .../azure/mgmt/app/operations/_operations.py | 6 +- 33 files changed, 1721 insertions(+), 1024 deletions(-) create mode 100644 sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_namespaces_operations.py create mode 100644 sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_namespaces_operations.py diff --git a/sdk/app/azure-mgmt-app/_meta.json b/sdk/app/azure-mgmt-app/_meta.json index b635d5601ca5..1309c1b32198 100644 --- a/sdk/app/azure-mgmt-app/_meta.json +++ b/sdk/app/azure-mgmt-app/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "4ac6be1b22f88bfbb6ca3e294e73538bcac90b49", + "commit": "f27a39e1cbc269c09a056b897c450ea6bfbea279", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/app/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/app/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/app/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py index 90b7231faf5c..92ee73922f3e 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2022-01-01-preview" + self.api_version = "2022-03-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py index 714c5d778be9..e6aeb88001c1 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_container_apps_api_client.py @@ -15,7 +15,7 @@ from . import models from ._configuration import ContainerAppsAPIClientConfiguration -from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, Operations +from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, NamespacesOperations, Operations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -24,32 +24,32 @@ class ContainerAppsAPIClient: """ContainerAppsAPIClient. + :ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations + :vartype container_apps_auth_configs: + azure.mgmt.app.operations.ContainerAppsAuthConfigsOperations :ivar container_apps: ContainerAppsOperations operations - :vartype container_apps: container_apps_api_client.operations.ContainerAppsOperations + :vartype container_apps: azure.mgmt.app.operations.ContainerAppsOperations :ivar container_apps_revisions: ContainerAppsRevisionsOperations operations - :vartype container_apps_revisions: - container_apps_api_client.operations.ContainerAppsRevisionsOperations + :vartype container_apps_revisions: azure.mgmt.app.operations.ContainerAppsRevisionsOperations :ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations :vartype container_apps_revision_replicas: - container_apps_api_client.operations.ContainerAppsRevisionReplicasOperations + azure.mgmt.app.operations.ContainerAppsRevisionReplicasOperations + :ivar dapr_components: DaprComponentsOperations operations + :vartype dapr_components: azure.mgmt.app.operations.DaprComponentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.app.operations.Operations :ivar managed_environments: ManagedEnvironmentsOperations operations - :vartype managed_environments: - container_apps_api_client.operations.ManagedEnvironmentsOperations + :vartype managed_environments: azure.mgmt.app.operations.ManagedEnvironmentsOperations :ivar certificates: CertificatesOperations operations - :vartype certificates: container_apps_api_client.operations.CertificatesOperations - :ivar operations: Operations operations - :vartype operations: container_apps_api_client.operations.Operations - :ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations - :vartype container_apps_source_controls: - container_apps_api_client.operations.ContainerAppsSourceControlsOperations - :ivar dapr_components: DaprComponentsOperations operations - :vartype dapr_components: container_apps_api_client.operations.DaprComponentsOperations - :ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations - :vartype container_apps_auth_configs: - container_apps_api_client.operations.ContainerAppsAuthConfigsOperations + :vartype certificates: azure.mgmt.app.operations.CertificatesOperations + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: azure.mgmt.app.operations.NamespacesOperations :ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations :vartype managed_environments_storages: - container_apps_api_client.operations.ManagedEnvironmentsStoragesOperations + azure.mgmt.app.operations.ManagedEnvironmentsStoragesOperations + :ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations + :vartype container_apps_source_controls: + azure.mgmt.app.operations.ContainerAppsSourceControlsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -74,16 +74,17 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False + self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize) self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize) self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize) self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize) + self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize) - self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize) + self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize) self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request( diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/_metadata.json b/sdk/app/azure-mgmt-app/azure/mgmt/app/_metadata.json index eeb87a80b677..c4db26bdd055 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/_metadata.json +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2022-01-01-preview", - "total_api_version_list": ["2022-01-01-preview"], + "chosen_version": "2022-03-01", + "total_api_version_list": ["2022-03-01"], "client": { "name": "ContainerAppsAPIClient", "filename": "_container_apps_api_client", @@ -97,15 +97,16 @@ "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { + "container_apps_auth_configs": "ContainerAppsAuthConfigsOperations", "container_apps": "ContainerAppsOperations", "container_apps_revisions": "ContainerAppsRevisionsOperations", "container_apps_revision_replicas": "ContainerAppsRevisionReplicasOperations", + "dapr_components": "DaprComponentsOperations", + "operations": "Operations", "managed_environments": "ManagedEnvironmentsOperations", "certificates": "CertificatesOperations", - "operations": "Operations", - "container_apps_source_controls": "ContainerAppsSourceControlsOperations", - "dapr_components": "DaprComponentsOperations", - "container_apps_auth_configs": "ContainerAppsAuthConfigsOperations", - "managed_environments_storages": "ManagedEnvironmentsStoragesOperations" + "namespaces": "NamespacesOperations", + "managed_environments_storages": "ManagedEnvironmentsStoragesOperations", + "container_apps_source_controls": "ContainerAppsSourceControlsOperations" } } \ No newline at end of file diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py index ed19909a70d5..0a4b8fe89ba6 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2022-01-01-preview" + self.api_version = "2022-03-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py index f49b67610af1..7a2600918e0c 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/_container_apps_api_client.py @@ -15,7 +15,7 @@ from .. import models from ._configuration import ContainerAppsAPIClientConfiguration -from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, Operations +from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, NamespacesOperations, Operations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -24,32 +24,33 @@ class ContainerAppsAPIClient: """ContainerAppsAPIClient. + :ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations + :vartype container_apps_auth_configs: + azure.mgmt.app.aio.operations.ContainerAppsAuthConfigsOperations :ivar container_apps: ContainerAppsOperations operations - :vartype container_apps: container_apps_api_client.aio.operations.ContainerAppsOperations + :vartype container_apps: azure.mgmt.app.aio.operations.ContainerAppsOperations :ivar container_apps_revisions: ContainerAppsRevisionsOperations operations :vartype container_apps_revisions: - container_apps_api_client.aio.operations.ContainerAppsRevisionsOperations + azure.mgmt.app.aio.operations.ContainerAppsRevisionsOperations :ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations :vartype container_apps_revision_replicas: - container_apps_api_client.aio.operations.ContainerAppsRevisionReplicasOperations + azure.mgmt.app.aio.operations.ContainerAppsRevisionReplicasOperations + :ivar dapr_components: DaprComponentsOperations operations + :vartype dapr_components: azure.mgmt.app.aio.operations.DaprComponentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.app.aio.operations.Operations :ivar managed_environments: ManagedEnvironmentsOperations operations - :vartype managed_environments: - container_apps_api_client.aio.operations.ManagedEnvironmentsOperations + :vartype managed_environments: azure.mgmt.app.aio.operations.ManagedEnvironmentsOperations :ivar certificates: CertificatesOperations operations - :vartype certificates: container_apps_api_client.aio.operations.CertificatesOperations - :ivar operations: Operations operations - :vartype operations: container_apps_api_client.aio.operations.Operations - :ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations - :vartype container_apps_source_controls: - container_apps_api_client.aio.operations.ContainerAppsSourceControlsOperations - :ivar dapr_components: DaprComponentsOperations operations - :vartype dapr_components: container_apps_api_client.aio.operations.DaprComponentsOperations - :ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations - :vartype container_apps_auth_configs: - container_apps_api_client.aio.operations.ContainerAppsAuthConfigsOperations + :vartype certificates: azure.mgmt.app.aio.operations.CertificatesOperations + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: azure.mgmt.app.aio.operations.NamespacesOperations :ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations :vartype managed_environments_storages: - container_apps_api_client.aio.operations.ManagedEnvironmentsStoragesOperations + azure.mgmt.app.aio.operations.ManagedEnvironmentsStoragesOperations + :ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations + :vartype container_apps_source_controls: + azure.mgmt.app.aio.operations.ContainerAppsSourceControlsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -74,16 +75,17 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False + self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize) self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize) self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize) self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize) + self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize) - self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize) + self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize) self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize) def _send_request( diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py index 021cee48b4be..505be253220b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/__init__.py @@ -6,26 +6,28 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._container_apps_auth_configs_operations import ContainerAppsAuthConfigsOperations from ._container_apps_operations import ContainerAppsOperations from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations from ._container_apps_revision_replicas_operations import ContainerAppsRevisionReplicasOperations +from ._dapr_components_operations import DaprComponentsOperations +from ._operations import Operations from ._managed_environments_operations import ManagedEnvironmentsOperations from ._certificates_operations import CertificatesOperations -from ._operations import Operations -from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations -from ._dapr_components_operations import DaprComponentsOperations -from ._container_apps_auth_configs_operations import ContainerAppsAuthConfigsOperations +from ._namespaces_operations import NamespacesOperations from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations +from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations __all__ = [ + 'ContainerAppsAuthConfigsOperations', 'ContainerAppsOperations', 'ContainerAppsRevisionsOperations', 'ContainerAppsRevisionReplicasOperations', + 'DaprComponentsOperations', + 'Operations', 'ManagedEnvironmentsOperations', 'CertificatesOperations', - 'Operations', - 'ContainerAppsSourceControlsOperations', - 'DaprComponentsOperations', - 'ContainerAppsAuthConfigsOperations', + 'NamespacesOperations', 'ManagedEnvironmentsStoragesOperations', + 'ContainerAppsSourceControlsOperations', ] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py index b261b386cb07..c8d23c353e40 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_certificates_operations.py @@ -31,7 +31,7 @@ class CertificatesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group_name: str, - managed_environment_name: str, + environment_name: str, **kwargs: Any ) -> AsyncIterable["_models.CertificateCollection"]: """Get the Certificates in a given managed environment. @@ -59,13 +59,12 @@ def list( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.CertificateCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] @@ -79,7 +78,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, + environment_name=environment_name, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -90,7 +89,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, + environment_name=environment_name, template_url=next_link, ) request = _convert_request(request) @@ -122,14 +121,14 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates'} # type: ignore @distributed_trace_async async def get( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, **kwargs: Any ) -> "_models.Certificate": """Get the specified Certificate. @@ -138,13 +137,13 @@ async def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Certificate, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Certificate + :rtype: ~azure.mgmt.app.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] @@ -157,8 +156,8 @@ async def get( request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -179,15 +178,15 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore @distributed_trace_async async def create_or_update( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, certificate_envelope: Optional["_models.Certificate"] = None, **kwargs: Any ) -> "_models.Certificate": @@ -197,15 +196,15 @@ async def create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :param certificate_envelope: Certificate to be created or updated. - :type certificate_envelope: ~container_apps_api_client.models.Certificate + :type certificate_envelope: ~azure.mgmt.app.models.Certificate :keyword callable cls: A custom type or function that will be passed the direct response :return: Certificate, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Certificate + :rtype: ~azure.mgmt.app.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] @@ -224,8 +223,8 @@ async def create_or_update( request = build_create_or_update_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -248,15 +247,15 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore @distributed_trace_async async def delete( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, **kwargs: Any ) -> None: """Deletes the specified Certificate. @@ -265,10 +264,10 @@ async def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -284,8 +283,8 @@ async def delete( request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, template_url=self.delete.metadata['url'], ) request = _convert_request(request) @@ -302,15 +301,15 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore @distributed_trace_async async def update( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, certificate_envelope: "_models.CertificatePatch", **kwargs: Any ) -> "_models.Certificate": @@ -320,15 +319,15 @@ async def update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :param certificate_envelope: Properties of a certificate that need to be updated. - :type certificate_envelope: ~container_apps_api_client.models.CertificatePatch + :type certificate_envelope: ~azure.mgmt.app.models.CertificatePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Certificate, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Certificate + :rtype: ~azure.mgmt.app.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] @@ -344,8 +343,8 @@ async def update( request = build_update_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -368,5 +367,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py index e8fdce3d7522..5f1a82b40350 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_auth_configs_operations.py @@ -31,7 +31,7 @@ class ContainerAppsAuthConfigsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -64,8 +64,7 @@ def list_by_container_app( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AuthConfigCollection or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.AuthConfigCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.AuthConfigCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfigCollection"] @@ -144,7 +143,7 @@ async def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AuthConfig, or the result of cls(response) - :rtype: ~container_apps_api_client.models.AuthConfig + :rtype: ~azure.mgmt.app.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] @@ -202,10 +201,10 @@ async def create_or_update( :param name: Name of the Container App AuthConfig. :type name: str :param auth_config_envelope: Properties used to create a Container App AuthConfig. - :type auth_config_envelope: ~container_apps_api_client.models.AuthConfig + :type auth_config_envelope: ~azure.mgmt.app.models.AuthConfig :keyword callable cls: A custom type or function that will be passed the direct response :return: AuthConfig, or the result of cls(response) - :rtype: ~container_apps_api_client.models.AuthConfig + :rtype: ~azure.mgmt.app.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py index abea0c93db47..77e24bf48f34 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_operations.py @@ -22,7 +22,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._container_apps_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_custom_host_name_analysis_request, build_list_secrets_request, build_update_request +from ...operations._container_apps_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_custom_host_name_analysis_request, build_list_secrets_request, build_update_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class ContainerAppsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,8 +60,7 @@ def list_by_subscription( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ContainerAppCollection or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ContainerAppCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] @@ -131,8 +130,7 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ContainerAppCollection or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ContainerAppCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] @@ -206,7 +204,7 @@ async def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ContainerApp, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ContainerApp + :rtype: ~azure.mgmt.app.models.ContainerApp :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] @@ -309,7 +307,7 @@ async def begin_create_or_update( :param name: Name of the Container App. :type name: str :param container_app_envelope: Properties used to create a container app. - :type container_app_envelope: ~container_apps_api_client.models.ContainerApp + :type container_app_envelope: ~azure.mgmt.app.models.ContainerApp :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -320,7 +318,7 @@ async def begin_create_or_update( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ContainerApp or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~container_apps_api_client.models.ContainerApp] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.app.models.ContainerApp] :raises: ~azure.core.exceptions.HttpResponseError """ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] @@ -463,30 +461,14 @@ def get_long_running_output(pipeline_response): begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - @distributed_trace_async - async def update( + async def _update_initial( self, resource_group_name: str, name: str, - container_app_envelope: "_models.ContainerAppPatch", + container_app_envelope: "_models.ContainerApp", **kwargs: Any - ) -> "_models.ContainerApp": - """Update properties of a Container App. - - Patches a Container App. Currently only patching of tags is supported. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param name: Name of the Container App. - :type name: str - :param container_app_envelope: Properties of a container app that need to be updated. - :type container_app_envelope: ~container_apps_api_client.models.ContainerAppPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerApp, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ContainerApp - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -494,15 +476,15 @@ async def update( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - _json = self._serialize.body(container_app_envelope, 'ContainerAppPatch') + _json = self._serialize.body(container_app_envelope, 'ContainerApp') - request = build_update_request( + request = build_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self._update_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -510,20 +492,84 @@ async def update( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + 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.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerApp', pipeline_response) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + name: str, + container_app_envelope: "_models.ContainerApp", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Update properties of a Container App. - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore + Patches a Container App using JSON Merge Patch. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param name: Name of the Container App. + :type name: str + :param container_app_envelope: Properties of a Container App that need to be updated. + :type container_app_envelope: ~azure.mgmt.app.models.ContainerApp + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + name=name, + container_app_envelope=container_app_envelope, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore @distributed_trace_async async def list_custom_host_name_analysis( @@ -545,7 +591,7 @@ async def list_custom_host_name_analysis( :type custom_hostname: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) - :rtype: ~container_apps_api_client.models.CustomHostnameAnalysisResult + :rtype: ~azure.mgmt.app.models.CustomHostnameAnalysisResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] @@ -600,7 +646,7 @@ async def list_secrets( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretsCollection, or the result of cls(response) - :rtype: ~container_apps_api_client.models.SecretsCollection + :rtype: ~azure.mgmt.app.models.SecretsCollection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretsCollection"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py index 7b64ea72d645..7970f71a6994 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revision_replicas_operations.py @@ -29,7 +29,7 @@ class ContainerAppsRevisionReplicasOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ async def get_replica( resource_group_name: str, container_app_name: str, revision_name: str, - name: str, + replica_name: str, **kwargs: Any ) -> "_models.Replica": """Get a replica for a Container App Revision. @@ -63,11 +63,11 @@ async def get_replica( :type container_app_name: str :param revision_name: Name of the Container App Revision. :type revision_name: str - :param name: Name of the Container App Revision Replica. - :type name: str + :param replica_name: Name of the Container App Revision Replica. + :type replica_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Replica, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Replica + :rtype: ~azure.mgmt.app.models.Replica :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Replica"] @@ -82,7 +82,7 @@ async def get_replica( resource_group_name=resource_group_name, container_app_name=container_app_name, revision_name=revision_name, - name=name, + replica_name=replica_name, template_url=self.get_replica.metadata['url'], ) request = _convert_request(request) @@ -103,7 +103,7 @@ async def get_replica( return deserialized - get_replica.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}'} # type: ignore + get_replica.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}'} # type: ignore @distributed_trace_async @@ -126,7 +126,7 @@ async def list_replicas( :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ReplicaCollection, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ReplicaCollection + :rtype: ~azure.mgmt.app.models.ReplicaCollection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaCollection"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py index 5cd9f2e3fd2d..39f8106a4c6d 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_revisions_operations.py @@ -31,7 +31,7 @@ class ContainerAppsRevisionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,6 +51,7 @@ def list_revisions( self, resource_group_name: str, container_app_name: str, + filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.RevisionCollection"]: """Get the Revisions for a given Container App. @@ -61,10 +62,11 @@ def list_revisions( :type resource_group_name: str :param container_app_name: Name of the Container App for which Revisions are needed. :type container_app_name: str + :param filter: The filter to apply on the operation. + :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RevisionCollection or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.RevisionCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.RevisionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RevisionCollection"] @@ -79,6 +81,7 @@ def prepare_request(next_link=None): subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, + filter=filter, template_url=self.list_revisions.metadata['url'], ) request = _convert_request(request) @@ -90,6 +93,7 @@ def prepare_request(next_link=None): subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, + filter=filter, template_url=next_link, ) request = _convert_request(request) @@ -128,7 +132,7 @@ async def get_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> "_models.Revision": """Get a revision of a Container App. @@ -139,11 +143,11 @@ async def get_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Revision, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Revision + :rtype: ~azure.mgmt.app.models.Revision :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Revision"] @@ -157,7 +161,7 @@ async def get_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.get_revision.metadata['url'], ) request = _convert_request(request) @@ -178,7 +182,7 @@ async def get_revision( return deserialized - get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}'} # type: ignore + get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}'} # type: ignore @distributed_trace_async @@ -186,7 +190,7 @@ async def activate_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> None: """Activates a revision for a Container App. @@ -197,8 +201,8 @@ async def activate_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -215,7 +219,7 @@ async def activate_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.activate_revision.metadata['url'], ) request = _convert_request(request) @@ -232,7 +236,7 @@ async def activate_revision( if cls: return cls(pipeline_response, None, {}) - activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate'} # type: ignore + activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate'} # type: ignore @distributed_trace_async @@ -240,7 +244,7 @@ async def deactivate_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> None: """Deactivates a revision for a Container App. @@ -251,8 +255,8 @@ async def deactivate_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -269,7 +273,7 @@ async def deactivate_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.deactivate_revision.metadata['url'], ) request = _convert_request(request) @@ -286,7 +290,7 @@ async def deactivate_revision( if cls: return cls(pipeline_response, None, {}) - deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate'} # type: ignore + deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate'} # type: ignore @distributed_trace_async @@ -294,7 +298,7 @@ async def restart_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> None: """Restarts a revision for a Container App. @@ -305,8 +309,8 @@ async def restart_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -323,7 +327,7 @@ async def restart_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.restart_revision.metadata['url'], ) request = _convert_request(request) @@ -340,5 +344,5 @@ async def restart_revision( if cls: return cls(pipeline_response, None, {}) - restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart'} # type: ignore + restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py index f3b24eef4db3..9d0edb7fbe7a 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_container_apps_source_controls_operations.py @@ -33,7 +33,7 @@ class ContainerAppsSourceControlsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -66,8 +66,7 @@ def list_by_container_app( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.SourceControlCollection] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] @@ -146,7 +145,7 @@ async def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SourceControl, or the result of cls(response) - :rtype: ~container_apps_api_client.models.SourceControl + :rtype: ~azure.mgmt.app.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] @@ -255,7 +254,7 @@ async def begin_create_or_update( :param name: Name of the Container App SourceControl. :type name: str :param source_control_envelope: Properties used to create a Container App SourceControl. - :type source_control_envelope: ~container_apps_api_client.models.SourceControl + :type source_control_envelope: ~azure.mgmt.app.models.SourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -266,7 +265,7 @@ async def begin_create_or_update( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SourceControl or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~container_apps_api_client.models.SourceControl] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.app.models.SourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py index fa4d365e7441..c62437c228a0 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_dapr_components_operations.py @@ -20,7 +20,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._dapr_components_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +from ...operations._dapr_components_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request, build_list_secrets_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -31,7 +31,7 @@ class DaprComponentsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,7 +65,7 @@ def list( :return: An iterator like instance of either DaprComponentsCollection or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.DaprComponentsCollection] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.DaprComponentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponentsCollection"] @@ -129,7 +129,7 @@ async def get( self, resource_group_name: str, environment_name: str, - name: str, + component_name: str, **kwargs: Any ) -> "_models.DaprComponent": """Get a dapr component. @@ -140,11 +140,11 @@ async def get( :type resource_group_name: str :param environment_name: Name of the Managed Environment. :type environment_name: str - :param name: Name of the Dapr Component. - :type name: str + :param component_name: Name of the Dapr Component. + :type component_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DaprComponent, or the result of cls(response) - :rtype: ~container_apps_api_client.models.DaprComponent + :rtype: ~azure.mgmt.app.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] @@ -158,7 +158,7 @@ async def get( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - name=name, + component_name=component_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -179,7 +179,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}'} # type: ignore @distributed_trace_async @@ -187,7 +187,7 @@ async def create_or_update( self, resource_group_name: str, environment_name: str, - name: str, + component_name: str, dapr_component_envelope: "_models.DaprComponent", **kwargs: Any ) -> "_models.DaprComponent": @@ -199,13 +199,13 @@ async def create_or_update( :type resource_group_name: str :param environment_name: Name of the Managed Environment. :type environment_name: str - :param name: Name of the Dapr Component. - :type name: str + :param component_name: Name of the Dapr Component. + :type component_name: str :param dapr_component_envelope: Configuration details of the Dapr Component. - :type dapr_component_envelope: ~container_apps_api_client.models.DaprComponent + :type dapr_component_envelope: ~azure.mgmt.app.models.DaprComponent :keyword callable cls: A custom type or function that will be passed the direct response :return: DaprComponent, or the result of cls(response) - :rtype: ~container_apps_api_client.models.DaprComponent + :rtype: ~azure.mgmt.app.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] @@ -222,7 +222,7 @@ async def create_or_update( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - name=name, + component_name=component_name, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -245,7 +245,7 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}'} # type: ignore @distributed_trace_async @@ -253,7 +253,7 @@ async def delete( self, resource_group_name: str, environment_name: str, - name: str, + component_name: str, **kwargs: Any ) -> None: """Delete a Dapr Component. @@ -264,8 +264,8 @@ async def delete( :type resource_group_name: str :param environment_name: Name of the Managed Environment. :type environment_name: str - :param name: Name of the Dapr Component. - :type name: str + :param component_name: Name of the Dapr Component. + :type component_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -282,7 +282,7 @@ async def delete( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - name=name, + component_name=component_name, template_url=self.delete.metadata['url'], ) request = _convert_request(request) @@ -299,5 +299,63 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}'} # type: ignore + + + @distributed_trace_async + async def list_secrets( + self, + resource_group_name: str, + environment_name: str, + component_name: str, + **kwargs: Any + ) -> "_models.DaprSecretsCollection": + """List secrets for a dapr component. + + List secrets for a dapr component. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param component_name: Name of the Dapr Component. + :type component_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DaprSecretsCollection, or the result of cls(response) + :rtype: ~azure.mgmt.app.models.DaprSecretsCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprSecretsCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_secrets_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + environment_name=environment_name, + component_name=component_name, + template_url=self.list_secrets.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **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('DaprSecretsCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py index a7cc217cfe3f..84615b59abe3 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_operations.py @@ -22,7 +22,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._managed_environments_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_update_request +from ...operations._managed_environments_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_update_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class ManagedEnvironmentsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,7 +61,7 @@ def list_by_subscription( :return: An iterator like instance of either ManagedEnvironmentsCollection or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] @@ -132,7 +132,7 @@ def list_by_resource_group( :return: An iterator like instance of either ManagedEnvironmentsCollection or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] @@ -193,7 +193,7 @@ async def get_next(next_link=None): async def get( self, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> "_models.ManagedEnvironment": """Get the properties of a Managed Environment. @@ -202,11 +202,11 @@ async def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param name: Name of the Environment. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironment, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironment + :rtype: ~azure.mgmt.app.models.ManagedEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] @@ -219,7 +219,7 @@ async def get( request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -240,13 +240,13 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - name: str, + environment_name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> "_models.ManagedEnvironment": @@ -263,7 +263,7 @@ async def _create_or_update_initial( request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -289,14 +289,14 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore @distributed_trace_async async def begin_create_or_update( self, resource_group_name: str, - name: str, + environment_name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> AsyncLROPoller["_models.ManagedEnvironment"]: @@ -306,10 +306,10 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param name: Name of the Environment. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str :param environment_envelope: Configuration details of the Environment. - :type environment_envelope: ~container_apps_api_client.models.ManagedEnvironment + :type environment_envelope: ~azure.mgmt.app.models.ManagedEnvironment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -320,8 +320,7 @@ async def begin_create_or_update( Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ManagedEnvironment or the result of cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~container_apps_api_client.models.ManagedEnvironment] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.app.models.ManagedEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] @@ -335,7 +334,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, environment_envelope=environment_envelope, content_type=content_type, cls=lambda x,y,z: x, @@ -364,12 +363,12 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore async def _delete_initial( self, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -382,7 +381,7 @@ async def _delete_initial( request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) @@ -398,14 +397,14 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore @distributed_trace_async async def begin_delete( self, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a Managed Environment. @@ -414,8 +413,8 @@ async def begin_delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param name: Name of the Environment. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -438,7 +437,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, cls=lambda x,y,z: x, **kwargs ) @@ -462,32 +461,16 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore - @distributed_trace_async - async def update( + async def _update_initial( self, resource_group_name: str, - name: str, - environment_envelope: "_models.ManagedEnvironmentPatch", + environment_name: str, + environment_envelope: "_models.ManagedEnvironment", **kwargs: Any - ) -> "_models.ManagedEnvironment": - """Update Managed Environment's properties. - - Patches a Managed Environment. Only patching of tags is supported currently. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param name: Name of the Environment. - :type name: str - :param environment_envelope: Configuration details of the Environment. - :type environment_envelope: ~container_apps_api_client.models.ManagedEnvironmentPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedEnvironment, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -495,15 +478,15 @@ async def update( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - _json = self._serialize.body(environment_envelope, 'ManagedEnvironmentPatch') + _json = self._serialize.body(environment_envelope, 'ManagedEnvironment') - request = build_update_request( + request = build_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self._update_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -511,17 +494,81 @@ async def update( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + 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.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + environment_name: str, + environment_envelope: "_models.ManagedEnvironment", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Update Managed Environment's properties. + + Patches a Managed Environment using JSON Merge Patch. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param environment_envelope: Configuration details of the Environment. + :type environment_envelope: ~azure.mgmt.app.models.ManagedEnvironment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + environment_name=environment_name, + environment_envelope=environment_envelope, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py index a9db1bf2ac83..e4dabcc8739d 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_managed_environments_storages_operations.py @@ -29,7 +29,7 @@ class ManagedEnvironmentsStoragesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,7 +48,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, resource_group_name: str, - env_name: str, + environment_name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStoragesCollection": """Get all storages for a managedEnvironment. @@ -57,11 +57,11 @@ async def list( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str + :param environment_name: Name of the Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironmentStoragesCollection, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironmentStoragesCollection + :rtype: ~azure.mgmt.app.models.ManagedEnvironmentStoragesCollection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStoragesCollection"] @@ -74,7 +74,7 @@ async def list( request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, + environment_name=environment_name, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -95,15 +95,15 @@ async def list( return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages'} # type: ignore @distributed_trace_async async def get( self, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStorage": """Get storage for a managedEnvironment. @@ -112,13 +112,13 @@ async def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str - :param name: Name of the storage. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param storage_name: Name of the storage. + :type storage_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironmentStorage, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage + :rtype: ~azure.mgmt.app.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] @@ -131,8 +131,8 @@ async def get( request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, - name=name, + environment_name=environment_name, + storage_name=storage_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -153,15 +153,15 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}'} # type: ignore @distributed_trace_async async def create_or_update( self, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, storage_envelope: "_models.ManagedEnvironmentStorage", **kwargs: Any ) -> "_models.ManagedEnvironmentStorage": @@ -171,15 +171,15 @@ async def create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str - :param name: Name of the storage. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param storage_name: Name of the storage. + :type storage_name: str :param storage_envelope: Configuration details of storage. - :type storage_envelope: ~container_apps_api_client.models.ManagedEnvironmentStorage + :type storage_envelope: ~azure.mgmt.app.models.ManagedEnvironmentStorage :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironmentStorage, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage + :rtype: ~azure.mgmt.app.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] @@ -195,8 +195,8 @@ async def create_or_update( request = build_create_or_update_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, - name=name, + environment_name=environment_name, + storage_name=storage_name, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -219,15 +219,15 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}'} # type: ignore @distributed_trace_async async def delete( self, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, **kwargs: Any ) -> None: """Delete storage for a managedEnvironment. @@ -236,10 +236,10 @@ async def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str - :param name: Name of the storage. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param storage_name: Name of the storage. + :type storage_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -255,8 +255,8 @@ async def delete( request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, - name=name, + environment_name=environment_name, + storage_name=storage_name, template_url=self.delete.metadata['url'], ) request = _convert_request(request) @@ -273,5 +273,5 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_namespaces_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_namespaces_operations.py new file mode 100644 index 000000000000..e7283913aa7f --- /dev/null +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_namespaces_operations.py @@ -0,0 +1,107 @@ +# 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 functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, 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.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._namespaces_operations import build_check_name_availability_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NamespacesOperations: + """NamespacesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.app.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def check_name_availability( + self, + resource_group_name: str, + environment_name: str, + check_name_availability_request: "_models.CheckNameAvailabilityRequest", + **kwargs: Any + ) -> "_models.CheckNameAvailabilityResponse": + """Checks the resource name availability. + + Checks if resource name is available. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param check_name_availability_request: The check name availability request. + :type check_name_availability_request: ~azure.mgmt.app.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResponse, or the result of cls(response) + :rtype: ~azure.mgmt.app.models.CheckNameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(check_name_availability_request, 'CheckNameAvailabilityRequest') + + request = build_check_name_availability_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + environment_name=environment_name, + content_type=content_type, + json=_json, + template_url=self.check_name_availability.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **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('CheckNameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability'} # type: ignore + diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py index 7280e090ac90..4049771fc2c4 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/aio/operations/_operations.py @@ -31,7 +31,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,8 +55,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableOperations or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~container_apps_api_client.models.AvailableOperations] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.app.models.AvailableOperations] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py index 97ddbb90753e..cfdcf8a0559f 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/__init__.py @@ -28,12 +28,13 @@ from ._models_py3 import CertificateCollection from ._models_py3 import CertificatePatch from ._models_py3 import CertificateProperties +from ._models_py3 import CheckNameAvailabilityRequest +from ._models_py3 import CheckNameAvailabilityResponse from ._models_py3 import ClientRegistration from ._models_py3 import Configuration from ._models_py3 import Container from ._models_py3 import ContainerApp from ._models_py3 import ContainerAppCollection -from ._models_py3 import ContainerAppPatch from ._models_py3 import ContainerAppProbe from ._models_py3 import ContainerAppProbeHttpGet from ._models_py3 import ContainerAppProbeHttpGetHttpHeadersItem @@ -49,6 +50,7 @@ from ._models_py3 import DaprComponent from ._models_py3 import DaprComponentsCollection from ._models_py3 import DaprMetadata +from ._models_py3 import DaprSecretsCollection from ._models_py3 import DefaultAuthorizationPolicy from ._models_py3 import DefaultErrorResponse from ._models_py3 import DefaultErrorResponseError @@ -71,7 +73,6 @@ from ._models_py3 import LoginRoutes from ._models_py3 import LoginScopes from ._models_py3 import ManagedEnvironment -from ._models_py3 import ManagedEnvironmentPatch from ._models_py3 import ManagedEnvironmentStorage from ._models_py3 import ManagedEnvironmentStorageProperties from ._models_py3 import ManagedEnvironmentStoragesCollection @@ -119,6 +120,7 @@ AppProtocol, BindingType, CertificateProvisioningState, + CheckNameAvailabilityReason, ContainerAppProvisioningState, CookieExpirationConvention, CreatedByType, @@ -158,12 +160,13 @@ 'CertificateCollection', 'CertificatePatch', 'CertificateProperties', + 'CheckNameAvailabilityRequest', + 'CheckNameAvailabilityResponse', 'ClientRegistration', 'Configuration', 'Container', 'ContainerApp', 'ContainerAppCollection', - 'ContainerAppPatch', 'ContainerAppProbe', 'ContainerAppProbeHttpGet', 'ContainerAppProbeHttpGetHttpHeadersItem', @@ -179,6 +182,7 @@ 'DaprComponent', 'DaprComponentsCollection', 'DaprMetadata', + 'DaprSecretsCollection', 'DefaultAuthorizationPolicy', 'DefaultErrorResponse', 'DefaultErrorResponseError', @@ -201,7 +205,6 @@ 'LoginRoutes', 'LoginScopes', 'ManagedEnvironment', - 'ManagedEnvironmentPatch', 'ManagedEnvironmentStorage', 'ManagedEnvironmentStorageProperties', 'ManagedEnvironmentStoragesCollection', @@ -246,6 +249,7 @@ 'AppProtocol', 'BindingType', 'CertificateProvisioningState', + 'CheckNameAvailabilityReason', 'ContainerAppProvisioningState', 'CookieExpirationConvention', 'CreatedByType', diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py index dfd7bb186bd7..3d420c8496a0 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_container_apps_api_client_enums.py @@ -24,13 +24,13 @@ class ActiveRevisionsMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): .. raw:: html - Multiple: multiple revisions can be active. If no value if provided, this is the - defaultSingle: Only one revision can be active at a time. Revision weights can not - be used in this mode + Multiple: multiple revisions can be active.Single: Only one + revision can be active at a time. Revision weights can not be used in this mode. If no value if + provided, this is the default. """ - MULTIPLE = "multiple" - SINGLE = "single" + MULTIPLE = "Multiple" + SINGLE = "Single" class AppProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Tells Dapr which protocol your application is using. Valid options are http and grpc. Default @@ -57,6 +57,13 @@ class CertificateProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, DELETE_FAILED = "DeleteFailed" PENDING = "Pending" +class CheckNameAvailabilityReason(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The reason why the given name is not available. + """ + + INVALID = "Invalid" + ALREADY_EXISTS = "AlreadyExists" + class ContainerAppProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state of the Container App. """ diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py index 56167390e75d..98cec6b2b9f1 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/models/_models_py3.py @@ -81,9 +81,9 @@ class Apple(msrest.serialization.Model): the set registration; otherwise, :code:`true`. :vartype enabled: bool :ivar registration: The configuration settings of the Apple registration. - :vartype registration: ~container_apps_api_client.models.AppleRegistration + :vartype registration: ~azure.mgmt.app.models.AppleRegistration :ivar login: The configuration settings of the login flow. - :vartype login: ~container_apps_api_client.models.LoginScopes + :vartype login: ~azure.mgmt.app.models.LoginScopes """ _attribute_map = { @@ -105,9 +105,9 @@ def __init__( despite the set registration; otherwise, :code:`true`. :paramtype enabled: bool :keyword registration: The configuration settings of the Apple registration. - :paramtype registration: ~container_apps_api_client.models.AppleRegistration + :paramtype registration: ~azure.mgmt.app.models.AppleRegistration :keyword login: The configuration settings of the login flow. - :paramtype login: ~container_apps_api_client.models.LoginScopes + :paramtype login: ~azure.mgmt.app.models.LoginScopes """ super(Apple, self).__init__(**kwargs) self.enabled = enabled @@ -153,8 +153,7 @@ class AppLogsConfiguration(msrest.serialization.Model): :ivar destination: Logs destination. :vartype destination: str :ivar log_analytics_configuration: Log Analytics configuration. - :vartype log_analytics_configuration: - ~container_apps_api_client.models.LogAnalyticsConfiguration + :vartype log_analytics_configuration: ~azure.mgmt.app.models.LogAnalyticsConfiguration """ _attribute_map = { @@ -173,8 +172,7 @@ def __init__( :keyword destination: Logs destination. :paramtype destination: str :keyword log_analytics_configuration: Log Analytics configuration. - :paramtype log_analytics_configuration: - ~container_apps_api_client.models.LogAnalyticsConfiguration + :paramtype log_analytics_configuration: ~azure.mgmt.app.models.LogAnalyticsConfiguration """ super(AppLogsConfiguration, self).__init__(**kwargs) self.destination = destination @@ -228,7 +226,7 @@ class Resource(msrest.serialization.Model): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData """ _validation = { @@ -273,7 +271,7 @@ class ProxyResource(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData """ _validation = { @@ -314,22 +312,22 @@ class AuthConfig(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar platform: The configuration settings of the platform of ContainerApp Service Authentication/Authorization. - :vartype platform: ~container_apps_api_client.models.AuthPlatform + :vartype platform: ~azure.mgmt.app.models.AuthPlatform :ivar global_validation: The configuration settings that determines the validation flow of users using Service Authentication/Authorization. - :vartype global_validation: ~container_apps_api_client.models.GlobalValidation + :vartype global_validation: ~azure.mgmt.app.models.GlobalValidation :ivar identity_providers: The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. - :vartype identity_providers: ~container_apps_api_client.models.IdentityProviders + :vartype identity_providers: ~azure.mgmt.app.models.IdentityProviders :ivar login: The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. - :vartype login: ~container_apps_api_client.models.Login + :vartype login: ~azure.mgmt.app.models.Login :ivar http_settings: The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. - :vartype http_settings: ~container_apps_api_client.models.HttpSettings + :vartype http_settings: ~azure.mgmt.app.models.HttpSettings """ _validation = { @@ -364,19 +362,19 @@ def __init__( """ :keyword platform: The configuration settings of the platform of ContainerApp Service Authentication/Authorization. - :paramtype platform: ~container_apps_api_client.models.AuthPlatform + :paramtype platform: ~azure.mgmt.app.models.AuthPlatform :keyword global_validation: The configuration settings that determines the validation flow of users using Service Authentication/Authorization. - :paramtype global_validation: ~container_apps_api_client.models.GlobalValidation + :paramtype global_validation: ~azure.mgmt.app.models.GlobalValidation :keyword identity_providers: The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. - :paramtype identity_providers: ~container_apps_api_client.models.IdentityProviders + :paramtype identity_providers: ~azure.mgmt.app.models.IdentityProviders :keyword login: The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. - :paramtype login: ~container_apps_api_client.models.Login + :paramtype login: ~azure.mgmt.app.models.Login :keyword http_settings: The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. - :paramtype http_settings: ~container_apps_api_client.models.HttpSettings + :paramtype http_settings: ~azure.mgmt.app.models.HttpSettings """ super(AuthConfig, self).__init__(**kwargs) self.platform = platform @@ -394,7 +392,7 @@ class AuthConfigCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.AuthConfig] + :vartype value: list[~azure.mgmt.app.models.AuthConfig] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -417,7 +415,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.AuthConfig] + :paramtype value: list[~azure.mgmt.app.models.AuthConfig] """ super(AuthConfigCollection, self).__init__(**kwargs) self.value = value @@ -468,7 +466,7 @@ class AvailableOperations(msrest.serialization.Model): """Available operations of the service. :ivar value: Collection of available operation details. - :vartype value: list[~container_apps_api_client.models.OperationDetail] + :vartype value: list[~azure.mgmt.app.models.OperationDetail] :ivar next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :vartype next_link: str @@ -488,7 +486,7 @@ def __init__( ): """ :keyword value: Collection of available operation details. - :paramtype value: list[~container_apps_api_client.models.OperationDetail] + :paramtype value: list[~azure.mgmt.app.models.OperationDetail] :keyword next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :paramtype next_link: str @@ -505,12 +503,12 @@ class AzureActiveDirectory(msrest.serialization.Model): enabled despite the set registration; otherwise, :code:`true`. :vartype enabled: bool :ivar registration: The configuration settings of the Azure Active Directory app registration. - :vartype registration: ~container_apps_api_client.models.AzureActiveDirectoryRegistration + :vartype registration: ~azure.mgmt.app.models.AzureActiveDirectoryRegistration :ivar login: The configuration settings of the Azure Active Directory login flow. - :vartype login: ~container_apps_api_client.models.AzureActiveDirectoryLogin + :vartype login: ~azure.mgmt.app.models.AzureActiveDirectoryLogin :ivar validation: The configuration settings of the Azure Active Directory token validation flow. - :vartype validation: ~container_apps_api_client.models.AzureActiveDirectoryValidation + :vartype validation: ~azure.mgmt.app.models.AzureActiveDirectoryValidation :ivar is_auto_provisioned: Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure Management Portal. Users @@ -543,12 +541,12 @@ def __init__( :paramtype enabled: bool :keyword registration: The configuration settings of the Azure Active Directory app registration. - :paramtype registration: ~container_apps_api_client.models.AzureActiveDirectoryRegistration + :paramtype registration: ~azure.mgmt.app.models.AzureActiveDirectoryRegistration :keyword login: The configuration settings of the Azure Active Directory login flow. - :paramtype login: ~container_apps_api_client.models.AzureActiveDirectoryLogin + :paramtype login: ~azure.mgmt.app.models.AzureActiveDirectoryLogin :keyword validation: The configuration settings of the Azure Active Directory token validation flow. - :paramtype validation: ~container_apps_api_client.models.AzureActiveDirectoryValidation + :paramtype validation: ~azure.mgmt.app.models.AzureActiveDirectoryValidation :keyword is_auto_provisioned: Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure Management Portal. Users @@ -703,14 +701,13 @@ class AzureActiveDirectoryValidation(msrest.serialization.Model): :ivar jwt_claim_checks: The configuration settings of the checks that should be made while validating the JWT Claims. - :vartype jwt_claim_checks: ~container_apps_api_client.models.JwtClaimChecks + :vartype jwt_claim_checks: ~azure.mgmt.app.models.JwtClaimChecks :ivar allowed_audiences: The list of audiences that can make successful authentication/authorization requests. :vartype allowed_audiences: list[str] :ivar default_authorization_policy: The configuration settings of the default authorization policy. - :vartype default_authorization_policy: - ~container_apps_api_client.models.DefaultAuthorizationPolicy + :vartype default_authorization_policy: ~azure.mgmt.app.models.DefaultAuthorizationPolicy """ _attribute_map = { @@ -730,14 +727,13 @@ def __init__( """ :keyword jwt_claim_checks: The configuration settings of the checks that should be made while validating the JWT Claims. - :paramtype jwt_claim_checks: ~container_apps_api_client.models.JwtClaimChecks + :paramtype jwt_claim_checks: ~azure.mgmt.app.models.JwtClaimChecks :keyword allowed_audiences: The list of audiences that can make successful authentication/authorization requests. :paramtype allowed_audiences: list[str] :keyword default_authorization_policy: The configuration settings of the default authorization policy. - :paramtype default_authorization_policy: - ~container_apps_api_client.models.DefaultAuthorizationPolicy + :paramtype default_authorization_policy: ~azure.mgmt.app.models.DefaultAuthorizationPolicy """ super(AzureActiveDirectoryValidation, self).__init__(**kwargs) self.jwt_claim_checks = jwt_claim_checks @@ -799,7 +795,7 @@ class AzureFileProperties(msrest.serialization.Model): :ivar account_key: Storage account key for azure file. :vartype account_key: str :ivar access_mode: Access mode for storage. Possible values include: "ReadOnly", "ReadWrite". - :vartype access_mode: str or ~container_apps_api_client.models.AccessMode + :vartype access_mode: str or ~azure.mgmt.app.models.AccessMode :ivar share_name: Azure file share name. :vartype share_name: str """ @@ -827,7 +823,7 @@ def __init__( :paramtype account_key: str :keyword access_mode: Access mode for storage. Possible values include: "ReadOnly", "ReadWrite". - :paramtype access_mode: str or ~container_apps_api_client.models.AccessMode + :paramtype access_mode: str or ~azure.mgmt.app.models.AccessMode :keyword share_name: Azure file share name. :paramtype share_name: str """ @@ -845,7 +841,7 @@ class AzureStaticWebApps(msrest.serialization.Model): enabled despite the set registration; otherwise, :code:`true`. :vartype enabled: bool :ivar registration: The configuration settings of the Azure Static Web Apps registration. - :vartype registration: ~container_apps_api_client.models.AzureStaticWebAppsRegistration + :vartype registration: ~azure.mgmt.app.models.AzureStaticWebAppsRegistration """ _attribute_map = { @@ -865,7 +861,7 @@ def __init__( be enabled despite the set registration; otherwise, :code:`true`. :paramtype enabled: bool :keyword registration: The configuration settings of the Azure Static Web Apps registration. - :paramtype registration: ~container_apps_api_client.models.AzureStaticWebAppsRegistration + :paramtype registration: ~azure.mgmt.app.models.AzureStaticWebAppsRegistration """ super(AzureStaticWebApps, self).__init__(**kwargs) self.enabled = enabled @@ -914,7 +910,7 @@ class TrackedResource(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar location: Required. The geo-location where the resource lives. @@ -973,13 +969,13 @@ class Certificate(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar location: Required. The geo-location where the resource lives. :vartype location: str :ivar properties: Certificate resource specific properties. - :vartype properties: ~container_apps_api_client.models.CertificateProperties + :vartype properties: ~azure.mgmt.app.models.CertificateProperties """ _validation = { @@ -1014,7 +1010,7 @@ def __init__( :keyword location: Required. The geo-location where the resource lives. :paramtype location: str :keyword properties: Certificate resource specific properties. - :paramtype properties: ~container_apps_api_client.models.CertificateProperties + :paramtype properties: ~azure.mgmt.app.models.CertificateProperties """ super(Certificate, self).__init__(tags=tags, location=location, **kwargs) self.properties = properties @@ -1028,7 +1024,7 @@ class CertificateCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.Certificate] + :vartype value: list[~azure.mgmt.app.models.Certificate] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -1051,7 +1047,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.Certificate] + :paramtype value: list[~azure.mgmt.app.models.Certificate] """ super(CertificateCollection, self).__init__(**kwargs) self.value = value @@ -1090,8 +1086,7 @@ class CertificateProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the certificate. Possible values include: "Succeeded", "Failed", "Canceled", "DeleteFailed", "Pending". - :vartype provisioning_state: str or - ~container_apps_api_client.models.CertificateProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.app.models.CertificateProvisioningState :ivar password: Certificate password. :vartype password: str :ivar subject_name: Subject name of the certificate. @@ -1162,6 +1157,79 @@ def __init__( self.public_key_hash = None +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """The check availability request body. + + :ivar name: The name of the resource for which availability needs to be checked. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the resource for which availability needs to be checked. + :paramtype name: str + :keyword type: The resource type. + :paramtype type: str + """ + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResponse(msrest.serialization.Model): + """The check availability result. + + :ivar name_available: Indicates if the resource name is available. + :vartype name_available: bool + :ivar reason: The reason why the given name is not available. Possible values include: + "Invalid", "AlreadyExists". + :vartype reason: str or ~azure.mgmt.app.models.CheckNameAvailabilityReason + :ivar message: Detailed reason why the given name is available. + :vartype message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "CheckNameAvailabilityReason"]] = None, + message: Optional[str] = None, + **kwargs + ): + """ + :keyword name_available: Indicates if the resource name is available. + :paramtype name_available: bool + :keyword reason: The reason why the given name is not available. Possible values include: + "Invalid", "AlreadyExists". + :paramtype reason: str or ~azure.mgmt.app.models.CheckNameAvailabilityReason + :keyword message: Detailed reason why the given name is available. + :paramtype message: str + """ + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + class ClientRegistration(msrest.serialization.Model): """The configuration settings of the app registration for providers that have client ids and client secrets. @@ -1198,24 +1266,24 @@ class Configuration(msrest.serialization.Model): """Non versioned Container App configuration properties that define the mutable settings of a Container app. :ivar secrets: Collection of secrets used by a Container app. - :vartype secrets: list[~container_apps_api_client.models.Secret] + :vartype secrets: list[~azure.mgmt.app.models.Secret] :ivar active_revisions_mode: ActiveRevisionsMode controls how active revisions are handled for the Container app: .. raw:: html - Multiple: multiple revisions can be active. If no value if provided, this is - the defaultSingle: Only one revision can be active at a time. Revision weights can - not be used in this mode. Possible values include: "multiple", "single". - :vartype active_revisions_mode: str or ~container_apps_api_client.models.ActiveRevisionsMode + Multiple: multiple revisions can be active.Single: Only one + revision can be active at a time. Revision weights can not be used in this mode. If no value if + provided, this is the default.. Possible values include: "Multiple", "Single". + :vartype active_revisions_mode: str or ~azure.mgmt.app.models.ActiveRevisionsMode :ivar ingress: Ingress configurations. - :vartype ingress: ~container_apps_api_client.models.Ingress + :vartype ingress: ~azure.mgmt.app.models.Ingress :ivar registries: Collection of private container registry credentials for containers used by the Container app. - :vartype registries: list[~container_apps_api_client.models.RegistryCredentials] + :vartype registries: list[~azure.mgmt.app.models.RegistryCredentials] :ivar dapr: Dapr configuration for the Container App. - :vartype dapr: ~container_apps_api_client.models.Dapr + :vartype dapr: ~azure.mgmt.app.models.Dapr """ _attribute_map = { @@ -1238,24 +1306,24 @@ def __init__( ): """ :keyword secrets: Collection of secrets used by a Container app. - :paramtype secrets: list[~container_apps_api_client.models.Secret] + :paramtype secrets: list[~azure.mgmt.app.models.Secret] :keyword active_revisions_mode: ActiveRevisionsMode controls how active revisions are handled for the Container app: .. raw:: html - Multiple: multiple revisions can be active. If no value if provided, this is - the defaultSingle: Only one revision can be active at a time. Revision weights can - not be used in this mode. Possible values include: "multiple", "single". - :paramtype active_revisions_mode: str or ~container_apps_api_client.models.ActiveRevisionsMode + Multiple: multiple revisions can be active.Single: Only one + revision can be active at a time. Revision weights can not be used in this mode. If no value if + provided, this is the default.. Possible values include: "Multiple", "Single". + :paramtype active_revisions_mode: str or ~azure.mgmt.app.models.ActiveRevisionsMode :keyword ingress: Ingress configurations. - :paramtype ingress: ~container_apps_api_client.models.Ingress + :paramtype ingress: ~azure.mgmt.app.models.Ingress :keyword registries: Collection of private container registry credentials for containers used by the Container app. - :paramtype registries: list[~container_apps_api_client.models.RegistryCredentials] + :paramtype registries: list[~azure.mgmt.app.models.RegistryCredentials] :keyword dapr: Dapr configuration for the Container App. - :paramtype dapr: ~container_apps_api_client.models.Dapr + :paramtype dapr: ~azure.mgmt.app.models.Dapr """ super(Configuration, self).__init__(**kwargs) self.secrets = secrets @@ -1277,13 +1345,13 @@ class Container(msrest.serialization.Model): :ivar args: Container start command arguments. :vartype args: list[str] :ivar env: Container environment variables. - :vartype env: list[~container_apps_api_client.models.EnvironmentVar] + :vartype env: list[~azure.mgmt.app.models.EnvironmentVar] :ivar resources: Container resource requirements. - :vartype resources: ~container_apps_api_client.models.ContainerResources + :vartype resources: ~azure.mgmt.app.models.ContainerResources :ivar probes: List of probes for the container. - :vartype probes: list[~container_apps_api_client.models.ContainerAppProbe] + :vartype probes: list[~azure.mgmt.app.models.ContainerAppProbe] :ivar volume_mounts: Container volume mounts. - :vartype volume_mounts: list[~container_apps_api_client.models.VolumeMount] + :vartype volume_mounts: list[~azure.mgmt.app.models.VolumeMount] """ _attribute_map = { @@ -1320,13 +1388,13 @@ def __init__( :keyword args: Container start command arguments. :paramtype args: list[str] :keyword env: Container environment variables. - :paramtype env: list[~container_apps_api_client.models.EnvironmentVar] + :paramtype env: list[~azure.mgmt.app.models.EnvironmentVar] :keyword resources: Container resource requirements. - :paramtype resources: ~container_apps_api_client.models.ContainerResources + :paramtype resources: ~azure.mgmt.app.models.ContainerResources :keyword probes: List of probes for the container. - :paramtype probes: list[~container_apps_api_client.models.ContainerAppProbe] + :paramtype probes: list[~azure.mgmt.app.models.ContainerAppProbe] :keyword volume_mounts: Container volume mounts. - :paramtype volume_mounts: list[~container_apps_api_client.models.VolumeMount] + :paramtype volume_mounts: list[~azure.mgmt.app.models.VolumeMount] """ super(Container, self).__init__(**kwargs) self.image = image @@ -1356,18 +1424,17 @@ class ContainerApp(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar location: Required. The geo-location where the resource lives. :vartype location: str :ivar identity: managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. - :vartype identity: ~container_apps_api_client.models.ManagedServiceIdentity + :vartype identity: ~azure.mgmt.app.models.ManagedServiceIdentity :ivar provisioning_state: Provisioning state of the Container App. Possible values include: "InProgress", "Succeeded", "Failed", "Canceled". - :vartype provisioning_state: str or - ~container_apps_api_client.models.ContainerAppProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.app.models.ContainerAppProvisioningState :ivar managed_environment_id: Resource ID of the Container App's environment. :vartype managed_environment_id: str :ivar latest_revision_name: Name of the latest revision of the Container App. @@ -1378,9 +1445,9 @@ class ContainerApp(TrackedResource): :ivar custom_domain_verification_id: Id used to verify domain name ownership. :vartype custom_domain_verification_id: str :ivar configuration: Non versioned Container App configuration properties. - :vartype configuration: ~container_apps_api_client.models.Configuration + :vartype configuration: ~azure.mgmt.app.models.Configuration :ivar template: Container App versioned application definition. - :vartype template: ~container_apps_api_client.models.Template + :vartype template: ~azure.mgmt.app.models.Template :ivar outbound_ip_addresses: Outbound IP Addresses for container app. :vartype outbound_ip_addresses: list[str] """ @@ -1434,13 +1501,13 @@ def __init__( :paramtype location: str :keyword identity: managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. - :paramtype identity: ~container_apps_api_client.models.ManagedServiceIdentity + :paramtype identity: ~azure.mgmt.app.models.ManagedServiceIdentity :keyword managed_environment_id: Resource ID of the Container App's environment. :paramtype managed_environment_id: str :keyword configuration: Non versioned Container App configuration properties. - :paramtype configuration: ~container_apps_api_client.models.Configuration + :paramtype configuration: ~azure.mgmt.app.models.Configuration :keyword template: Container App versioned application definition. - :paramtype template: ~container_apps_api_client.models.Template + :paramtype template: ~azure.mgmt.app.models.Template """ super(ContainerApp, self).__init__(tags=tags, location=location, **kwargs) self.identity = identity @@ -1462,7 +1529,7 @@ class ContainerAppCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.ContainerApp] + :vartype value: list[~azure.mgmt.app.models.ContainerApp] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -1485,38 +1552,13 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.ContainerApp] + :paramtype value: list[~azure.mgmt.app.models.ContainerApp] """ super(ContainerAppCollection, self).__init__(**kwargs) self.value = value self.next_link = None -class ContainerAppPatch(msrest.serialization.Model): - """Container App Patch. - - :ivar tags: A set of tags. Application-specific metadata in the form of key-value pairs. - :vartype tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - """ - :keyword tags: A set of tags. Application-specific metadata in the form of key-value pairs. - :paramtype tags: dict[str, str] - """ - super(ContainerAppPatch, self).__init__(**kwargs) - self.tags = tags - - class ContainerAppProbe(msrest.serialization.Model): """Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. @@ -1524,7 +1566,7 @@ class ContainerAppProbe(msrest.serialization.Model): after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. :vartype failure_threshold: int :ivar http_get: HTTPGet specifies the http request to perform. - :vartype http_get: ~container_apps_api_client.models.ContainerAppProbeHttpGet + :vartype http_get: ~azure.mgmt.app.models.ContainerAppProbeHttpGet :ivar initial_delay_seconds: Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. :vartype initial_delay_seconds: int @@ -1537,7 +1579,7 @@ class ContainerAppProbe(msrest.serialization.Model): :vartype success_threshold: int :ivar tcp_socket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - :vartype tcp_socket: ~container_apps_api_client.models.ContainerAppProbeTcpSocket + :vartype tcp_socket: ~azure.mgmt.app.models.ContainerAppProbeTcpSocket :ivar termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly @@ -1552,7 +1594,7 @@ class ContainerAppProbe(msrest.serialization.Model): Minimum value is 1. Maximum value is 240. :vartype timeout_seconds: int :ivar type: The type of probe. Possible values include: "liveness", "readiness", "startup". - :vartype type: str or ~container_apps_api_client.models.Type + :vartype type: str or ~azure.mgmt.app.models.Type """ _attribute_map = { @@ -1586,7 +1628,7 @@ def __init__( after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. :paramtype failure_threshold: int :keyword http_get: HTTPGet specifies the http request to perform. - :paramtype http_get: ~container_apps_api_client.models.ContainerAppProbeHttpGet + :paramtype http_get: ~azure.mgmt.app.models.ContainerAppProbeHttpGet :keyword initial_delay_seconds: Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. :paramtype initial_delay_seconds: int @@ -1599,7 +1641,7 @@ def __init__( :paramtype success_threshold: int :keyword tcp_socket: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - :paramtype tcp_socket: ~container_apps_api_client.models.ContainerAppProbeTcpSocket + :paramtype tcp_socket: ~azure.mgmt.app.models.ContainerAppProbeTcpSocket :keyword termination_grace_period_seconds: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are @@ -1614,7 +1656,7 @@ def __init__( second. Minimum value is 1. Maximum value is 240. :paramtype timeout_seconds: int :keyword type: The type of probe. Possible values include: "liveness", "readiness", "startup". - :paramtype type: str or ~container_apps_api_client.models.Type + :paramtype type: str or ~azure.mgmt.app.models.Type """ super(ContainerAppProbe, self).__init__(**kwargs) self.failure_threshold = failure_threshold @@ -1637,8 +1679,7 @@ class ContainerAppProbeHttpGet(msrest.serialization.Model): httpHeaders instead. :vartype host: str :ivar http_headers: Custom headers to set in the request. HTTP allows repeated headers. - :vartype http_headers: - list[~container_apps_api_client.models.ContainerAppProbeHttpGetHttpHeadersItem] + :vartype http_headers: list[~azure.mgmt.app.models.ContainerAppProbeHttpGetHttpHeadersItem] :ivar path: Path to access on the HTTP server. :vartype path: str :ivar port: Required. Name or number of the port to access on the container. Number must be in @@ -1675,8 +1716,7 @@ def __init__( in httpHeaders instead. :paramtype host: str :keyword http_headers: Custom headers to set in the request. HTTP allows repeated headers. - :paramtype http_headers: - list[~container_apps_api_client.models.ContainerAppProbeHttpGetHttpHeadersItem] + :paramtype http_headers: list[~azure.mgmt.app.models.ContainerAppProbeHttpGetHttpHeadersItem] :keyword path: Path to access on the HTTP server. :paramtype path: str :keyword port: Required. Name or number of the port to access on the container. Number must be @@ -1851,7 +1891,7 @@ class CookieExpiration(msrest.serialization.Model): :ivar convention: The convention used when determining the session cookie's expiration. Possible values include: "FixedTime", "IdentityProviderDerived". - :vartype convention: str or ~container_apps_api_client.models.CookieExpirationConvention + :vartype convention: str or ~azure.mgmt.app.models.CookieExpirationConvention :ivar time_to_expiration: The time after the request is made when the session cookie should expire. :vartype time_to_expiration: str @@ -1872,7 +1912,7 @@ def __init__( """ :keyword convention: The convention used when determining the session cookie's expiration. Possible values include: "FixedTime", "IdentityProviderDerived". - :paramtype convention: str or ~container_apps_api_client.models.CookieExpirationConvention + :paramtype convention: str or ~azure.mgmt.app.models.CookieExpirationConvention :keyword time_to_expiration: The time after the request is made when the session cookie should expire. :paramtype time_to_expiration: str @@ -1891,7 +1931,7 @@ class CustomDomain(msrest.serialization.Model): :vartype name: str :ivar binding_type: Custom Domain binding type. Possible values include: "Disabled", "SniEnabled". - :vartype binding_type: str or ~container_apps_api_client.models.BindingType + :vartype binding_type: str or ~azure.mgmt.app.models.BindingType :ivar certificate_id: Required. Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. :vartype certificate_id: str @@ -1921,7 +1961,7 @@ def __init__( :paramtype name: str :keyword binding_type: Custom Domain binding type. Possible values include: "Disabled", "SniEnabled". - :paramtype binding_type: str or ~container_apps_api_client.models.BindingType + :paramtype binding_type: str or ~azure.mgmt.app.models.BindingType :keyword certificate_id: Required. Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. :paramtype certificate_id: str @@ -1947,7 +1987,7 @@ class CustomHostnameAnalysisResult(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar host_name: Host name that was analyzed. :vartype host_name: str :ivar is_hostname_already_verified: :code:`true` if hostname is already verified; @@ -1956,11 +1996,10 @@ class CustomHostnameAnalysisResult(ProxyResource): :ivar custom_domain_verification_test: DNS verification test result. Possible values include: "Passed", "Failed", "Skipped". :vartype custom_domain_verification_test: str or - ~container_apps_api_client.models.DnsVerificationTestResult + ~azure.mgmt.app.models.DnsVerificationTestResult :ivar custom_domain_verification_failure_info: Raw failure information if DNS verification fails. - :vartype custom_domain_verification_failure_info: - ~container_apps_api_client.models.DefaultErrorResponse + :vartype custom_domain_verification_failure_info: ~azure.mgmt.app.models.DefaultErrorResponse :ivar has_conflict_on_managed_environment: :code:`true` if there is a conflict on the Container App's managed environment; otherwise, :code:`false`. :vartype has_conflict_on_managed_environment: bool @@ -2054,10 +2093,10 @@ class CustomOpenIdConnectProvider(msrest.serialization.Model): :vartype enabled: bool :ivar registration: The configuration settings of the app registration for the custom Open ID Connect provider. - :vartype registration: ~container_apps_api_client.models.OpenIdConnectRegistration + :vartype registration: ~azure.mgmt.app.models.OpenIdConnectRegistration :ivar login: The configuration settings of the login flow of the custom Open ID Connect provider. - :vartype login: ~container_apps_api_client.models.OpenIdConnectLogin + :vartype login: ~azure.mgmt.app.models.OpenIdConnectLogin """ _attribute_map = { @@ -2080,10 +2119,10 @@ def __init__( :paramtype enabled: bool :keyword registration: The configuration settings of the app registration for the custom Open ID Connect provider. - :paramtype registration: ~container_apps_api_client.models.OpenIdConnectRegistration + :paramtype registration: ~azure.mgmt.app.models.OpenIdConnectRegistration :keyword login: The configuration settings of the login flow of the custom Open ID Connect provider. - :paramtype login: ~container_apps_api_client.models.OpenIdConnectLogin + :paramtype login: ~azure.mgmt.app.models.OpenIdConnectLogin """ super(CustomOpenIdConnectProvider, self).__init__(**kwargs) self.enabled = enabled @@ -2100,7 +2139,7 @@ class CustomScaleRule(msrest.serialization.Model): :ivar metadata: Metadata properties to describe custom scale rule. :vartype metadata: dict[str, str] :ivar auth: Authentication secrets for the custom scale rule. - :vartype auth: list[~container_apps_api_client.models.ScaleRuleAuth] + :vartype auth: list[~azure.mgmt.app.models.ScaleRuleAuth] """ _attribute_map = { @@ -2124,7 +2163,7 @@ def __init__( :keyword metadata: Metadata properties to describe custom scale rule. :paramtype metadata: dict[str, str] :keyword auth: Authentication secrets for the custom scale rule. - :paramtype auth: list[~container_apps_api_client.models.ScaleRuleAuth] + :paramtype auth: list[~azure.mgmt.app.models.ScaleRuleAuth] """ super(CustomScaleRule, self).__init__(**kwargs) self.type = type @@ -2141,7 +2180,7 @@ class Dapr(msrest.serialization.Model): :vartype app_id: str :ivar app_protocol: Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. Possible values include: "http", "grpc". - :vartype app_protocol: str or ~container_apps_api_client.models.AppProtocol + :vartype app_protocol: str or ~azure.mgmt.app.models.AppProtocol :ivar app_port: Tells Dapr which port your application is listening on. :vartype app_port: int """ @@ -2169,7 +2208,7 @@ def __init__( :paramtype app_id: str :keyword app_protocol: Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. Possible values include: "http", "grpc". - :paramtype app_protocol: str or ~container_apps_api_client.models.AppProtocol + :paramtype app_protocol: str or ~azure.mgmt.app.models.AppProtocol :keyword app_port: Tells Dapr which port your application is listening on. :paramtype app_port: int """ @@ -2195,7 +2234,7 @@ class DaprComponent(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar component_type: Component type. :vartype component_type: str :ivar version: Component version. @@ -2205,9 +2244,9 @@ class DaprComponent(ProxyResource): :ivar init_timeout: Initialization timeout. :vartype init_timeout: str :ivar secrets: Collection of secrets used by a Dapr component. - :vartype secrets: list[~container_apps_api_client.models.Secret] + :vartype secrets: list[~azure.mgmt.app.models.Secret] :ivar metadata: Component metadata. - :vartype metadata: list[~container_apps_api_client.models.DaprMetadata] + :vartype metadata: list[~azure.mgmt.app.models.DaprMetadata] :ivar scopes: Names of container apps that can use this Dapr component. :vartype scopes: list[str] """ @@ -2255,9 +2294,9 @@ def __init__( :keyword init_timeout: Initialization timeout. :paramtype init_timeout: str :keyword secrets: Collection of secrets used by a Dapr component. - :paramtype secrets: list[~container_apps_api_client.models.Secret] + :paramtype secrets: list[~azure.mgmt.app.models.Secret] :keyword metadata: Component metadata. - :paramtype metadata: list[~container_apps_api_client.models.DaprMetadata] + :paramtype metadata: list[~azure.mgmt.app.models.DaprMetadata] :keyword scopes: Names of container apps that can use this Dapr component. :paramtype scopes: list[str] """ @@ -2279,7 +2318,7 @@ class DaprComponentsCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.DaprComponent] + :vartype value: list[~azure.mgmt.app.models.DaprComponent] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -2302,7 +2341,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.DaprComponent] + :paramtype value: list[~azure.mgmt.app.models.DaprComponent] """ super(DaprComponentsCollection, self).__init__(**kwargs) self.value = value @@ -2350,12 +2389,43 @@ def __init__( self.secret_ref = secret_ref +class DaprSecretsCollection(msrest.serialization.Model): + """Dapr component Secrets Collection ARM resource. + + All required parameters must be populated in order to send to Azure. + + :ivar value: Required. Collection of secrets used by a Dapr component. + :vartype value: list[~azure.mgmt.app.models.Secret] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Secret]'}, + } + + def __init__( + self, + *, + value: List["Secret"], + **kwargs + ): + """ + :keyword value: Required. Collection of secrets used by a Dapr component. + :paramtype value: list[~azure.mgmt.app.models.Secret] + """ + super(DaprSecretsCollection, self).__init__(**kwargs) + self.value = value + + class DefaultAuthorizationPolicy(msrest.serialization.Model): """The configuration settings of the Azure Active Directory default authorization policy. :ivar allowed_principals: The configuration settings of the Azure Active Directory allowed principals. - :vartype allowed_principals: ~container_apps_api_client.models.AllowedPrincipals + :vartype allowed_principals: ~azure.mgmt.app.models.AllowedPrincipals :ivar allowed_applications: The configuration settings of the Azure Active Directory allowed applications. :vartype allowed_applications: list[str] @@ -2376,7 +2446,7 @@ def __init__( """ :keyword allowed_principals: The configuration settings of the Azure Active Directory allowed principals. - :paramtype allowed_principals: ~container_apps_api_client.models.AllowedPrincipals + :paramtype allowed_principals: ~azure.mgmt.app.models.AllowedPrincipals :keyword allowed_applications: The configuration settings of the Azure Active Directory allowed applications. :paramtype allowed_applications: list[str] @@ -2392,7 +2462,7 @@ class DefaultErrorResponse(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar error: Error model. - :vartype error: ~container_apps_api_client.models.DefaultErrorResponseError + :vartype error: ~azure.mgmt.app.models.DefaultErrorResponseError """ _validation = { @@ -2425,7 +2495,7 @@ class DefaultErrorResponseError(msrest.serialization.Model): :ivar target: Detailed error description and debugging information. :vartype target: str :ivar details: Details or the error. - :vartype details: list[~container_apps_api_client.models.DefaultErrorResponseErrorDetailsItem] + :vartype details: list[~azure.mgmt.app.models.DefaultErrorResponseErrorDetailsItem] :ivar innererror: More information to debug error. :vartype innererror: str """ @@ -2453,8 +2523,7 @@ def __init__( ): """ :keyword details: Details or the error. - :paramtype details: - list[~container_apps_api_client.models.DefaultErrorResponseErrorDetailsItem] + :paramtype details: list[~azure.mgmt.app.models.DefaultErrorResponseErrorDetailsItem] """ super(DefaultErrorResponseError, self).__init__(**kwargs) self.code = None @@ -2550,11 +2619,11 @@ class Facebook(msrest.serialization.Model): :vartype enabled: bool :ivar registration: The configuration settings of the app registration for the Facebook provider. - :vartype registration: ~container_apps_api_client.models.AppRegistration + :vartype registration: ~azure.mgmt.app.models.AppRegistration :ivar graph_api_version: The version of the Facebook api to be used while logging in. :vartype graph_api_version: str :ivar login: The configuration settings of the login flow. - :vartype login: ~container_apps_api_client.models.LoginScopes + :vartype login: ~azure.mgmt.app.models.LoginScopes """ _attribute_map = { @@ -2579,11 +2648,11 @@ def __init__( :paramtype enabled: bool :keyword registration: The configuration settings of the app registration for the Facebook provider. - :paramtype registration: ~container_apps_api_client.models.AppRegistration + :paramtype registration: ~azure.mgmt.app.models.AppRegistration :keyword graph_api_version: The version of the Facebook api to be used while logging in. :paramtype graph_api_version: str :keyword login: The configuration settings of the login flow. - :paramtype login: ~container_apps_api_client.models.LoginScopes + :paramtype login: ~azure.mgmt.app.models.LoginScopes """ super(Facebook, self).__init__(**kwargs) self.enabled = enabled @@ -2597,7 +2666,7 @@ class ForwardProxy(msrest.serialization.Model): :ivar convention: The convention used to determine the url of the request made. Possible values include: "NoProxy", "Standard", "Custom". - :vartype convention: str or ~container_apps_api_client.models.ForwardProxyConvention + :vartype convention: str or ~azure.mgmt.app.models.ForwardProxyConvention :ivar custom_host_header_name: The name of the header containing the host of the request. :vartype custom_host_header_name: str :ivar custom_proto_header_name: The name of the header containing the scheme of the request. @@ -2621,7 +2690,7 @@ def __init__( """ :keyword convention: The convention used to determine the url of the request made. Possible values include: "NoProxy", "Standard", "Custom". - :paramtype convention: str or ~container_apps_api_client.models.ForwardProxyConvention + :paramtype convention: str or ~azure.mgmt.app.models.ForwardProxyConvention :keyword custom_host_header_name: The name of the header containing the host of the request. :paramtype custom_host_header_name: str :keyword custom_proto_header_name: The name of the header containing the scheme of the request. @@ -2640,9 +2709,9 @@ class GitHub(msrest.serialization.Model): the set registration; otherwise, :code:`true`. :vartype enabled: bool :ivar registration: The configuration settings of the app registration for the GitHub provider. - :vartype registration: ~container_apps_api_client.models.ClientRegistration + :vartype registration: ~azure.mgmt.app.models.ClientRegistration :ivar login: The configuration settings of the login flow. - :vartype login: ~container_apps_api_client.models.LoginScopes + :vartype login: ~azure.mgmt.app.models.LoginScopes """ _attribute_map = { @@ -2665,9 +2734,9 @@ def __init__( :paramtype enabled: bool :keyword registration: The configuration settings of the app registration for the GitHub provider. - :paramtype registration: ~container_apps_api_client.models.ClientRegistration + :paramtype registration: ~azure.mgmt.app.models.ClientRegistration :keyword login: The configuration settings of the login flow. - :paramtype login: ~container_apps_api_client.models.LoginScopes + :paramtype login: ~azure.mgmt.app.models.LoginScopes """ super(GitHub, self).__init__(**kwargs) self.enabled = enabled @@ -2679,25 +2748,28 @@ class GithubActionConfiguration(msrest.serialization.Model): """Configuration properties that define the mutable settings of a Container App SourceControl. :ivar registry_info: Registry configurations. - :vartype registry_info: ~container_apps_api_client.models.RegistryInfo + :vartype registry_info: ~azure.mgmt.app.models.RegistryInfo :ivar azure_credentials: AzureCredentials configurations. - :vartype azure_credentials: ~container_apps_api_client.models.AzureCredentials - :ivar dockerfile_path: Docker file path. - :vartype dockerfile_path: str + :vartype azure_credentials: ~azure.mgmt.app.models.AzureCredentials + :ivar context_path: Context path. + :vartype context_path: str + :ivar image: Image name. + :vartype image: str :ivar publish_type: Code or Image. :vartype publish_type: str :ivar os: Operation system. :vartype os: str :ivar runtime_stack: Runtime stack. :vartype runtime_stack: str - :ivar runtime_version: Runtime Version. + :ivar runtime_version: Runtime version. :vartype runtime_version: str """ _attribute_map = { 'registry_info': {'key': 'registryInfo', 'type': 'RegistryInfo'}, 'azure_credentials': {'key': 'azureCredentials', 'type': 'AzureCredentials'}, - 'dockerfile_path': {'key': 'dockerfilePath', 'type': 'str'}, + 'context_path': {'key': 'contextPath', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, 'publish_type': {'key': 'publishType', 'type': 'str'}, 'os': {'key': 'os', 'type': 'str'}, 'runtime_stack': {'key': 'runtimeStack', 'type': 'str'}, @@ -2709,7 +2781,8 @@ def __init__( *, registry_info: Optional["RegistryInfo"] = None, azure_credentials: Optional["AzureCredentials"] = None, - dockerfile_path: Optional[str] = None, + context_path: Optional[str] = None, + image: Optional[str] = None, publish_type: Optional[str] = None, os: Optional[str] = None, runtime_stack: Optional[str] = None, @@ -2718,24 +2791,27 @@ def __init__( ): """ :keyword registry_info: Registry configurations. - :paramtype registry_info: ~container_apps_api_client.models.RegistryInfo + :paramtype registry_info: ~azure.mgmt.app.models.RegistryInfo :keyword azure_credentials: AzureCredentials configurations. - :paramtype azure_credentials: ~container_apps_api_client.models.AzureCredentials - :keyword dockerfile_path: Docker file path. - :paramtype dockerfile_path: str + :paramtype azure_credentials: ~azure.mgmt.app.models.AzureCredentials + :keyword context_path: Context path. + :paramtype context_path: str + :keyword image: Image name. + :paramtype image: str :keyword publish_type: Code or Image. :paramtype publish_type: str :keyword os: Operation system. :paramtype os: str :keyword runtime_stack: Runtime stack. :paramtype runtime_stack: str - :keyword runtime_version: Runtime Version. + :keyword runtime_version: Runtime version. :paramtype runtime_version: str """ super(GithubActionConfiguration, self).__init__(**kwargs) self.registry_info = registry_info self.azure_credentials = azure_credentials - self.dockerfile_path = dockerfile_path + self.context_path = context_path + self.image = image self.publish_type = publish_type self.os = os self.runtime_stack = runtime_stack @@ -2749,7 +2825,7 @@ class GlobalValidation(msrest.serialization.Model): to access the app. Possible values include: "RedirectToLoginPage", "AllowAnonymous", "Return401", "Return403". :vartype unauthenticated_client_action: str or - ~container_apps_api_client.models.UnauthenticatedClientActionV2 + ~azure.mgmt.app.models.UnauthenticatedClientActionV2 :ivar redirect_to_provider: The default authentication provider to use when multiple providers are configured. This setting is only needed if multiple providers are configured and the unauthenticated @@ -2780,7 +2856,7 @@ def __init__( attempts to access the app. Possible values include: "RedirectToLoginPage", "AllowAnonymous", "Return401", "Return403". :paramtype unauthenticated_client_action: str or - ~container_apps_api_client.models.UnauthenticatedClientActionV2 + ~azure.mgmt.app.models.UnauthenticatedClientActionV2 :keyword redirect_to_provider: The default authentication provider to use when multiple providers are configured. This setting is only needed if multiple providers are configured and the unauthenticated @@ -2804,12 +2880,12 @@ class Google(msrest.serialization.Model): the set registration; otherwise, :code:`true`. :vartype enabled: bool :ivar registration: The configuration settings of the app registration for the Google provider. - :vartype registration: ~container_apps_api_client.models.ClientRegistration + :vartype registration: ~azure.mgmt.app.models.ClientRegistration :ivar login: The configuration settings of the login flow. - :vartype login: ~container_apps_api_client.models.LoginScopes + :vartype login: ~azure.mgmt.app.models.LoginScopes :ivar validation: The configuration settings of the Azure Active Directory token validation flow. - :vartype validation: ~container_apps_api_client.models.AllowedAudiencesValidation + :vartype validation: ~azure.mgmt.app.models.AllowedAudiencesValidation """ _attribute_map = { @@ -2834,12 +2910,12 @@ def __init__( :paramtype enabled: bool :keyword registration: The configuration settings of the app registration for the Google provider. - :paramtype registration: ~container_apps_api_client.models.ClientRegistration + :paramtype registration: ~azure.mgmt.app.models.ClientRegistration :keyword login: The configuration settings of the login flow. - :paramtype login: ~container_apps_api_client.models.LoginScopes + :paramtype login: ~azure.mgmt.app.models.LoginScopes :keyword validation: The configuration settings of the Azure Active Directory token validation flow. - :paramtype validation: ~container_apps_api_client.models.AllowedAudiencesValidation + :paramtype validation: ~azure.mgmt.app.models.AllowedAudiencesValidation """ super(Google, self).__init__(**kwargs) self.enabled = enabled @@ -2854,7 +2930,7 @@ class HttpScaleRule(msrest.serialization.Model): :ivar metadata: Metadata properties to describe http scale rule. :vartype metadata: dict[str, str] :ivar auth: Authentication secrets for the custom scale rule. - :vartype auth: list[~container_apps_api_client.models.ScaleRuleAuth] + :vartype auth: list[~azure.mgmt.app.models.ScaleRuleAuth] """ _attribute_map = { @@ -2873,7 +2949,7 @@ def __init__( :keyword metadata: Metadata properties to describe http scale rule. :paramtype metadata: dict[str, str] :keyword auth: Authentication secrets for the custom scale rule. - :paramtype auth: list[~container_apps_api_client.models.ScaleRuleAuth] + :paramtype auth: list[~azure.mgmt.app.models.ScaleRuleAuth] """ super(HttpScaleRule, self).__init__(**kwargs) self.metadata = metadata @@ -2887,9 +2963,9 @@ class HttpSettings(msrest.serialization.Model): not having the HTTPS scheme are permissible; otherwise, :code:`true`. :vartype require_https: bool :ivar routes: The configuration settings of the paths HTTP requests. - :vartype routes: ~container_apps_api_client.models.HttpSettingsRoutes + :vartype routes: ~azure.mgmt.app.models.HttpSettingsRoutes :ivar forward_proxy: The configuration settings of a forward proxy used to make the requests. - :vartype forward_proxy: ~container_apps_api_client.models.ForwardProxy + :vartype forward_proxy: ~azure.mgmt.app.models.ForwardProxy """ _attribute_map = { @@ -2911,10 +2987,10 @@ def __init__( responses not having the HTTPS scheme are permissible; otherwise, :code:`true`. :paramtype require_https: bool :keyword routes: The configuration settings of the paths HTTP requests. - :paramtype routes: ~container_apps_api_client.models.HttpSettingsRoutes + :paramtype routes: ~azure.mgmt.app.models.HttpSettingsRoutes :keyword forward_proxy: The configuration settings of a forward proxy used to make the requests. - :paramtype forward_proxy: ~container_apps_api_client.models.ForwardProxy + :paramtype forward_proxy: ~azure.mgmt.app.models.ForwardProxy """ super(HttpSettings, self).__init__(**kwargs) self.require_https = require_https @@ -2952,24 +3028,24 @@ class IdentityProviders(msrest.serialization.Model): :ivar azure_active_directory: The configuration settings of the Azure Active directory provider. - :vartype azure_active_directory: ~container_apps_api_client.models.AzureActiveDirectory + :vartype azure_active_directory: ~azure.mgmt.app.models.AzureActiveDirectory :ivar facebook: The configuration settings of the Facebook provider. - :vartype facebook: ~container_apps_api_client.models.Facebook + :vartype facebook: ~azure.mgmt.app.models.Facebook :ivar git_hub: The configuration settings of the GitHub provider. - :vartype git_hub: ~container_apps_api_client.models.GitHub + :vartype git_hub: ~azure.mgmt.app.models.GitHub :ivar google: The configuration settings of the Google provider. - :vartype google: ~container_apps_api_client.models.Google + :vartype google: ~azure.mgmt.app.models.Google :ivar twitter: The configuration settings of the Twitter provider. - :vartype twitter: ~container_apps_api_client.models.Twitter + :vartype twitter: ~azure.mgmt.app.models.Twitter :ivar apple: The configuration settings of the Apple provider. - :vartype apple: ~container_apps_api_client.models.Apple + :vartype apple: ~azure.mgmt.app.models.Apple :ivar azure_static_web_apps: The configuration settings of the Azure Static Web Apps provider. - :vartype azure_static_web_apps: ~container_apps_api_client.models.AzureStaticWebApps + :vartype azure_static_web_apps: ~azure.mgmt.app.models.AzureStaticWebApps :ivar custom_open_id_connect_providers: The map of the name of the alias of each custom Open ID Connect provider to the configuration settings of the custom Open ID Connect provider. :vartype custom_open_id_connect_providers: dict[str, - ~container_apps_api_client.models.CustomOpenIdConnectProvider] + ~azure.mgmt.app.models.CustomOpenIdConnectProvider] """ _attribute_map = { @@ -2999,25 +3075,25 @@ def __init__( """ :keyword azure_active_directory: The configuration settings of the Azure Active directory provider. - :paramtype azure_active_directory: ~container_apps_api_client.models.AzureActiveDirectory + :paramtype azure_active_directory: ~azure.mgmt.app.models.AzureActiveDirectory :keyword facebook: The configuration settings of the Facebook provider. - :paramtype facebook: ~container_apps_api_client.models.Facebook + :paramtype facebook: ~azure.mgmt.app.models.Facebook :keyword git_hub: The configuration settings of the GitHub provider. - :paramtype git_hub: ~container_apps_api_client.models.GitHub + :paramtype git_hub: ~azure.mgmt.app.models.GitHub :keyword google: The configuration settings of the Google provider. - :paramtype google: ~container_apps_api_client.models.Google + :paramtype google: ~azure.mgmt.app.models.Google :keyword twitter: The configuration settings of the Twitter provider. - :paramtype twitter: ~container_apps_api_client.models.Twitter + :paramtype twitter: ~azure.mgmt.app.models.Twitter :keyword apple: The configuration settings of the Apple provider. - :paramtype apple: ~container_apps_api_client.models.Apple + :paramtype apple: ~azure.mgmt.app.models.Apple :keyword azure_static_web_apps: The configuration settings of the Azure Static Web Apps provider. - :paramtype azure_static_web_apps: ~container_apps_api_client.models.AzureStaticWebApps + :paramtype azure_static_web_apps: ~azure.mgmt.app.models.AzureStaticWebApps :keyword custom_open_id_connect_providers: The map of the name of the alias of each custom Open ID Connect provider to the configuration settings of the custom Open ID Connect provider. :paramtype custom_open_id_connect_providers: dict[str, - ~container_apps_api_client.models.CustomOpenIdConnectProvider] + ~azure.mgmt.app.models.CustomOpenIdConnectProvider] """ super(IdentityProviders, self).__init__(**kwargs) self.azure_active_directory = azure_active_directory @@ -3042,11 +3118,11 @@ class Ingress(msrest.serialization.Model): :ivar target_port: Target Port in containers for traffic from ingress. :vartype target_port: int :ivar transport: Ingress transport protocol. Possible values include: "auto", "http", "http2". - :vartype transport: str or ~container_apps_api_client.models.IngressTransportMethod + :vartype transport: str or ~azure.mgmt.app.models.IngressTransportMethod :ivar traffic: Traffic weights for app's revisions. - :vartype traffic: list[~container_apps_api_client.models.TrafficWeight] + :vartype traffic: list[~azure.mgmt.app.models.TrafficWeight] :ivar custom_domains: custom domain bindings for Container Apps' hostnames. - :vartype custom_domains: list[~container_apps_api_client.models.CustomDomain] + :vartype custom_domains: list[~azure.mgmt.app.models.CustomDomain] :ivar allow_insecure: Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections. :vartype allow_insecure: bool @@ -3084,11 +3160,11 @@ def __init__( :paramtype target_port: int :keyword transport: Ingress transport protocol. Possible values include: "auto", "http", "http2". - :paramtype transport: str or ~container_apps_api_client.models.IngressTransportMethod + :paramtype transport: str or ~azure.mgmt.app.models.IngressTransportMethod :keyword traffic: Traffic weights for app's revisions. - :paramtype traffic: list[~container_apps_api_client.models.TrafficWeight] + :paramtype traffic: list[~azure.mgmt.app.models.TrafficWeight] :keyword custom_domains: custom domain bindings for Container Apps' hostnames. - :paramtype custom_domains: list[~container_apps_api_client.models.CustomDomain] + :paramtype custom_domains: list[~azure.mgmt.app.models.CustomDomain] :keyword allow_insecure: Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections. :paramtype allow_insecure: bool @@ -3171,7 +3247,7 @@ class Login(msrest.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: ~container_apps_api_client.models.LoginRoutes + :vartype routes: ~azure.mgmt.app.models.LoginRoutes :ivar preserve_url_fragments_for_logins: :code:`true` if the fragments from the request are preserved after the login request is made; otherwise, :code:`false`. :vartype preserve_url_fragments_for_logins: bool @@ -3181,9 +3257,9 @@ class Login(msrest.serialization.Model): Note that URLs within the current domain are always implicitly allowed. :vartype allowed_external_redirect_urls: list[str] :ivar cookie_expiration: The configuration settings of the session cookie's expiration. - :vartype cookie_expiration: ~container_apps_api_client.models.CookieExpiration + :vartype cookie_expiration: ~azure.mgmt.app.models.CookieExpiration :ivar nonce: The configuration settings of the nonce used in the login flow. - :vartype nonce: ~container_apps_api_client.models.Nonce + :vartype nonce: ~azure.mgmt.app.models.Nonce """ _attribute_map = { @@ -3206,7 +3282,7 @@ def __init__( ): """ :keyword routes: The routes that specify the endpoints used for login and logout requests. - :paramtype routes: ~container_apps_api_client.models.LoginRoutes + :paramtype routes: ~azure.mgmt.app.models.LoginRoutes :keyword preserve_url_fragments_for_logins: :code:`true` if the fragments from the request are preserved after the login request is made; otherwise, :code:`false`. :paramtype preserve_url_fragments_for_logins: bool @@ -3216,9 +3292,9 @@ def __init__( Note that URLs within the current domain are always implicitly allowed. :paramtype allowed_external_redirect_urls: list[str] :keyword cookie_expiration: The configuration settings of the session cookie's expiration. - :paramtype cookie_expiration: ~container_apps_api_client.models.CookieExpiration + :paramtype cookie_expiration: ~azure.mgmt.app.models.CookieExpiration :keyword nonce: The configuration settings of the nonce used in the login flow. - :paramtype nonce: ~container_apps_api_client.models.Nonce + :paramtype nonce: ~azure.mgmt.app.models.Nonce """ super(Login, self).__init__(**kwargs) self.routes = routes @@ -3295,7 +3371,7 @@ class ManagedEnvironment(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar tags: A set of tags. Resource tags. :vartype tags: dict[str, str] :ivar location: Required. The geo-location where the resource lives. @@ -3304,13 +3380,15 @@ class ManagedEnvironment(TrackedResource): "Succeeded", "Failed", "Canceled", "Waiting", "InitializationInProgress", "InfrastructureSetupInProgress", "InfrastructureSetupComplete", "ScheduledForDelete", "UpgradeRequested", "UpgradeFailed". - :vartype provisioning_state: str or - ~container_apps_api_client.models.EnvironmentProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.app.models.EnvironmentProvisioningState :ivar dapr_ai_instrumentation_key: Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. :vartype dapr_ai_instrumentation_key: str + :ivar dapr_ai_connection_string: Application Insights connection string used by Dapr to export + Service to Service communication telemetry. + :vartype dapr_ai_connection_string: str :ivar vnet_configuration: Vnet configuration for the environment. - :vartype vnet_configuration: ~container_apps_api_client.models.VnetConfiguration + :vartype vnet_configuration: ~azure.mgmt.app.models.VnetConfiguration :ivar deployment_errors: Any errors that occurred during deployment or deployment validation. :vartype deployment_errors: str :ivar default_domain: Default Domain Name for the cluster. @@ -3320,7 +3398,9 @@ class ManagedEnvironment(TrackedResource): :ivar app_logs_configuration: Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" is supported. - :vartype app_logs_configuration: ~container_apps_api_client.models.AppLogsConfiguration + :vartype app_logs_configuration: ~azure.mgmt.app.models.AppLogsConfiguration + :ivar zone_redundant: Whether or not this Managed Environment is zone-redundant. + :vartype zone_redundant: bool """ _validation = { @@ -3344,11 +3424,13 @@ class ManagedEnvironment(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'dapr_ai_instrumentation_key': {'key': 'properties.daprAIInstrumentationKey', 'type': 'str'}, + 'dapr_ai_connection_string': {'key': 'properties.daprAIConnectionString', 'type': 'str'}, 'vnet_configuration': {'key': 'properties.vnetConfiguration', 'type': 'VnetConfiguration'}, 'deployment_errors': {'key': 'properties.deploymentErrors', 'type': 'str'}, 'default_domain': {'key': 'properties.defaultDomain', 'type': 'str'}, 'static_ip': {'key': 'properties.staticIp', 'type': 'str'}, 'app_logs_configuration': {'key': 'properties.appLogsConfiguration', 'type': 'AppLogsConfiguration'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, } def __init__( @@ -3357,8 +3439,10 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, dapr_ai_instrumentation_key: Optional[str] = None, + dapr_ai_connection_string: Optional[str] = None, vnet_configuration: Optional["VnetConfiguration"] = None, app_logs_configuration: Optional["AppLogsConfiguration"] = None, + zone_redundant: Optional[bool] = None, **kwargs ): """ @@ -3369,46 +3453,28 @@ def __init__( :keyword dapr_ai_instrumentation_key: Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. :paramtype dapr_ai_instrumentation_key: str + :keyword dapr_ai_connection_string: Application Insights connection string used by Dapr to + export Service to Service communication telemetry. + :paramtype dapr_ai_connection_string: str :keyword vnet_configuration: Vnet configuration for the environment. - :paramtype vnet_configuration: ~container_apps_api_client.models.VnetConfiguration + :paramtype vnet_configuration: ~azure.mgmt.app.models.VnetConfiguration :keyword app_logs_configuration: Cluster configuration which enables the log daemon to export app logs to a destination. Currently only "log-analytics" is supported. - :paramtype app_logs_configuration: ~container_apps_api_client.models.AppLogsConfiguration + :paramtype app_logs_configuration: ~azure.mgmt.app.models.AppLogsConfiguration + :keyword zone_redundant: Whether or not this Managed Environment is zone-redundant. + :paramtype zone_redundant: bool """ super(ManagedEnvironment, self).__init__(tags=tags, location=location, **kwargs) self.provisioning_state = None self.dapr_ai_instrumentation_key = dapr_ai_instrumentation_key + self.dapr_ai_connection_string = dapr_ai_connection_string self.vnet_configuration = vnet_configuration self.deployment_errors = None self.default_domain = None self.static_ip = None self.app_logs_configuration = app_logs_configuration - - -class ManagedEnvironmentPatch(msrest.serialization.Model): - """An environment for hosting container apps. - - :ivar tags: A set of tags. Application-specific metadata in the form of key-value pairs. - :vartype tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - """ - :keyword tags: A set of tags. Application-specific metadata in the form of key-value pairs. - :paramtype tags: dict[str, str] - """ - super(ManagedEnvironmentPatch, self).__init__(**kwargs) - self.tags = tags + self.zone_redundant = zone_redundant class ManagedEnvironmentsCollection(msrest.serialization.Model): @@ -3419,7 +3485,7 @@ class ManagedEnvironmentsCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.ManagedEnvironment] + :vartype value: list[~azure.mgmt.app.models.ManagedEnvironment] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -3442,7 +3508,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.ManagedEnvironment] + :paramtype value: list[~azure.mgmt.app.models.ManagedEnvironment] """ super(ManagedEnvironmentsCollection, self).__init__(**kwargs) self.value = value @@ -3464,9 +3530,9 @@ class ManagedEnvironmentStorage(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar properties: Storage properties. - :vartype properties: ~container_apps_api_client.models.ManagedEnvironmentStorageProperties + :vartype properties: ~azure.mgmt.app.models.ManagedEnvironmentStorageProperties """ _validation = { @@ -3492,7 +3558,7 @@ def __init__( ): """ :keyword properties: Storage properties. - :paramtype properties: ~container_apps_api_client.models.ManagedEnvironmentStorageProperties + :paramtype properties: ~azure.mgmt.app.models.ManagedEnvironmentStorageProperties """ super(ManagedEnvironmentStorage, self).__init__(**kwargs) self.properties = properties @@ -3502,7 +3568,7 @@ class ManagedEnvironmentStorageProperties(msrest.serialization.Model): """Storage properties. :ivar azure_file: Azure file properties. - :vartype azure_file: ~container_apps_api_client.models.AzureFileProperties + :vartype azure_file: ~azure.mgmt.app.models.AzureFileProperties """ _attribute_map = { @@ -3517,7 +3583,7 @@ def __init__( ): """ :keyword azure_file: Azure file properties. - :paramtype azure_file: ~container_apps_api_client.models.AzureFileProperties + :paramtype azure_file: ~azure.mgmt.app.models.AzureFileProperties """ super(ManagedEnvironmentStorageProperties, self).__init__(**kwargs) self.azure_file = azure_file @@ -3529,7 +3595,7 @@ class ManagedEnvironmentStoragesCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of storage resources. - :vartype value: list[~container_apps_api_client.models.ManagedEnvironmentStorage] + :vartype value: list[~azure.mgmt.app.models.ManagedEnvironmentStorage] """ _validation = { @@ -3548,7 +3614,7 @@ def __init__( ): """ :keyword value: Required. Collection of storage resources. - :paramtype value: list[~container_apps_api_client.models.ManagedEnvironmentStorage] + :paramtype value: list[~azure.mgmt.app.models.ManagedEnvironmentStorage] """ super(ManagedEnvironmentStoragesCollection, self).__init__(**kwargs) self.value = value @@ -3570,13 +3636,12 @@ class ManagedServiceIdentity(msrest.serialization.Model): :ivar type: Required. Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned". - :vartype type: str or ~container_apps_api_client.models.ManagedServiceIdentityType + :vartype type: str or ~azure.mgmt.app.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. - :vartype user_assigned_identities: dict[str, - ~container_apps_api_client.models.UserAssignedIdentity] + :vartype user_assigned_identities: dict[str, ~azure.mgmt.app.models.UserAssignedIdentity] """ _validation = { @@ -3603,13 +3668,12 @@ def __init__( :keyword type: Required. Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned". - :paramtype type: str or ~container_apps_api_client.models.ManagedServiceIdentityType + :paramtype type: str or ~azure.mgmt.app.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. - :paramtype user_assigned_identities: dict[str, - ~container_apps_api_client.models.UserAssignedIdentity] + :paramtype user_assigned_identities: dict[str, ~azure.mgmt.app.models.UserAssignedIdentity] """ super(ManagedServiceIdentity, self).__init__(**kwargs) self.principal_id = None @@ -3784,10 +3848,10 @@ class OpenIdConnectRegistration(msrest.serialization.Model): :ivar client_id: The client id of the custom Open ID Connect provider. :vartype client_id: str :ivar client_credential: The authentication credentials of the custom Open ID Connect provider. - :vartype client_credential: ~container_apps_api_client.models.OpenIdConnectClientCredential + :vartype client_credential: ~azure.mgmt.app.models.OpenIdConnectClientCredential :ivar open_id_connect_configuration: The configuration settings of the endpoints used for the custom Open ID Connect provider. - :vartype open_id_connect_configuration: ~container_apps_api_client.models.OpenIdConnectConfig + :vartype open_id_connect_configuration: ~azure.mgmt.app.models.OpenIdConnectConfig """ _attribute_map = { @@ -3809,10 +3873,10 @@ def __init__( :paramtype client_id: str :keyword client_credential: The authentication credentials of the custom Open ID Connect provider. - :paramtype client_credential: ~container_apps_api_client.models.OpenIdConnectClientCredential + :paramtype client_credential: ~azure.mgmt.app.models.OpenIdConnectClientCredential :keyword open_id_connect_configuration: The configuration settings of the endpoints used for the custom Open ID Connect provider. - :paramtype open_id_connect_configuration: ~container_apps_api_client.models.OpenIdConnectConfig + :paramtype open_id_connect_configuration: ~azure.mgmt.app.models.OpenIdConnectConfig """ super(OpenIdConnectRegistration, self).__init__(**kwargs) self.client_id = client_id @@ -3828,7 +3892,7 @@ class OperationDetail(msrest.serialization.Model): :ivar is_data_action: Indicates whether the operation is a data action. :vartype is_data_action: bool :ivar display: Display of the operation. - :vartype display: ~container_apps_api_client.models.OperationDisplay + :vartype display: ~azure.mgmt.app.models.OperationDisplay :ivar origin: Origin of the operation. :vartype origin: str """ @@ -3855,7 +3919,7 @@ def __init__( :keyword is_data_action: Indicates whether the operation is a data action. :paramtype is_data_action: bool :keyword display: Display of the operation. - :paramtype display: ~container_apps_api_client.models.OperationDisplay + :paramtype display: ~azure.mgmt.app.models.OperationDisplay :keyword origin: Origin of the operation. :paramtype origin: str """ @@ -3920,7 +3984,7 @@ class QueueScaleRule(msrest.serialization.Model): :ivar queue_length: Queue length. :vartype queue_length: int :ivar auth: Authentication secrets for the queue scale rule. - :vartype auth: list[~container_apps_api_client.models.ScaleRuleAuth] + :vartype auth: list[~azure.mgmt.app.models.ScaleRuleAuth] """ _attribute_map = { @@ -3943,7 +4007,7 @@ def __init__( :keyword queue_length: Queue length. :paramtype queue_length: int :keyword auth: Authentication secrets for the queue scale rule. - :paramtype auth: list[~container_apps_api_client.models.ScaleRuleAuth] + :paramtype auth: list[~azure.mgmt.app.models.ScaleRuleAuth] """ super(QueueScaleRule, self).__init__(**kwargs) self.queue_name = queue_name @@ -4044,11 +4108,11 @@ class Replica(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar created_time: Timestamp describing when the pod was created by controller. :vartype created_time: ~datetime.datetime :ivar containers: The containers collection under a replica. - :vartype containers: list[~container_apps_api_client.models.ReplicaContainer] + :vartype containers: list[~azure.mgmt.app.models.ReplicaContainer] """ _validation = { @@ -4076,7 +4140,7 @@ def __init__( ): """ :keyword containers: The containers collection under a replica. - :paramtype containers: list[~container_apps_api_client.models.ReplicaContainer] + :paramtype containers: list[~azure.mgmt.app.models.ReplicaContainer] """ super(Replica, self).__init__(**kwargs) self.created_time = None @@ -4089,7 +4153,7 @@ class ReplicaCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.Replica] + :vartype value: list[~azure.mgmt.app.models.Replica] """ _validation = { @@ -4108,7 +4172,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.Replica] + :paramtype value: list[~azure.mgmt.app.models.Replica] """ super(ReplicaCollection, self).__init__(**kwargs) self.value = value @@ -4182,7 +4246,7 @@ class Revision(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar created_time: Timestamp describing when the revision was created by controller. :vartype created_time: ~datetime.datetime @@ -4191,7 +4255,7 @@ class Revision(ProxyResource): :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: ~container_apps_api_client.models.Template + :vartype template: ~azure.mgmt.app.models.Template :ivar active: Boolean describing if the Revision is Active. :vartype active: bool :ivar replicas: Number of pods currently running for this revision. @@ -4202,10 +4266,10 @@ class Revision(ProxyResource): :vartype provisioning_error: str :ivar health_state: Current health State of the revision. Possible values include: "Healthy", "Unhealthy", "None". - :vartype health_state: str or ~container_apps_api_client.models.RevisionHealthState + :vartype health_state: str or ~azure.mgmt.app.models.RevisionHealthState :ivar provisioning_state: Current provisioning State of the revision. Possible values include: "Provisioning", "Provisioned", "Failed", "Deprovisioning", "Deprovisioned". - :vartype provisioning_state: str or ~container_apps_api_client.models.RevisionProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.app.models.RevisionProvisioningState """ _validation = { @@ -4266,7 +4330,7 @@ class RevisionCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.Revision] + :vartype value: list[~azure.mgmt.app.models.Revision] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -4289,7 +4353,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.Revision] + :paramtype value: list[~azure.mgmt.app.models.Revision] """ super(RevisionCollection, self).__init__(**kwargs) self.value = value @@ -4304,7 +4368,7 @@ class Scale(msrest.serialization.Model): :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[~container_apps_api_client.models.ScaleRule] + :vartype rules: list[~azure.mgmt.app.models.ScaleRule] """ _attribute_map = { @@ -4328,7 +4392,7 @@ def __init__( set. :paramtype max_replicas: int :keyword rules: Scaling rules. - :paramtype rules: list[~container_apps_api_client.models.ScaleRule] + :paramtype rules: list[~azure.mgmt.app.models.ScaleRule] """ super(Scale, self).__init__(**kwargs) self.min_replicas = min_replicas @@ -4342,11 +4406,11 @@ class ScaleRule(msrest.serialization.Model): :ivar name: Scale Rule Name. :vartype name: str :ivar azure_queue: Azure Queue based scaling. - :vartype azure_queue: ~container_apps_api_client.models.QueueScaleRule + :vartype azure_queue: ~azure.mgmt.app.models.QueueScaleRule :ivar custom: Custom scale rule. - :vartype custom: ~container_apps_api_client.models.CustomScaleRule + :vartype custom: ~azure.mgmt.app.models.CustomScaleRule :ivar http: HTTP requests based scaling. - :vartype http: ~container_apps_api_client.models.HttpScaleRule + :vartype http: ~azure.mgmt.app.models.HttpScaleRule """ _attribute_map = { @@ -4369,11 +4433,11 @@ def __init__( :keyword name: Scale Rule Name. :paramtype name: str :keyword azure_queue: Azure Queue based scaling. - :paramtype azure_queue: ~container_apps_api_client.models.QueueScaleRule + :paramtype azure_queue: ~azure.mgmt.app.models.QueueScaleRule :keyword custom: Custom scale rule. - :paramtype custom: ~container_apps_api_client.models.CustomScaleRule + :paramtype custom: ~azure.mgmt.app.models.CustomScaleRule :keyword http: HTTP requests based scaling. - :paramtype http: ~container_apps_api_client.models.HttpScaleRule + :paramtype http: ~azure.mgmt.app.models.HttpScaleRule """ super(ScaleRule, self).__init__(**kwargs) self.name = name @@ -4452,7 +4516,7 @@ class SecretsCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.ContainerAppSecret] + :vartype value: list[~azure.mgmt.app.models.ContainerAppSecret] """ _validation = { @@ -4471,7 +4535,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.ContainerAppSecret] + :paramtype value: list[~azure.mgmt.app.models.ContainerAppSecret] """ super(SecretsCollection, self).__init__(**kwargs) self.value = value @@ -4492,10 +4556,10 @@ class SourceControl(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~container_apps_api_client.models.SystemData + :vartype system_data: ~azure.mgmt.app.models.SystemData :ivar operation_state: Current provisioning State of the operation. Possible values include: "InProgress", "Succeeded", "Failed", "Canceled". - :vartype operation_state: str or ~container_apps_api_client.models.SourceControlOperationState + :vartype operation_state: str or ~azure.mgmt.app.models.SourceControlOperationState :ivar repo_url: The repo url which will be integrated to ContainerApp. :vartype repo_url: str :ivar branch: The branch which will trigger the auto deployment. @@ -4504,8 +4568,7 @@ class SourceControl(ProxyResource): and the defaults if user did not provide them. The defaults are populated as they were at the creation time. - :vartype github_action_configuration: - ~container_apps_api_client.models.GithubActionConfiguration + :vartype github_action_configuration: ~azure.mgmt.app.models.GithubActionConfiguration """ _validation = { @@ -4544,8 +4607,7 @@ def __init__( settings and the defaults if user did not provide them. The defaults are populated as they were at the creation time. - :paramtype github_action_configuration: - ~container_apps_api_client.models.GithubActionConfiguration + :paramtype github_action_configuration: ~azure.mgmt.app.models.GithubActionConfiguration """ super(SourceControl, self).__init__(**kwargs) self.operation_state = None @@ -4562,7 +4624,7 @@ class SourceControlCollection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. - :vartype value: list[~container_apps_api_client.models.SourceControl] + :vartype value: list[~azure.mgmt.app.models.SourceControl] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -4585,7 +4647,7 @@ def __init__( ): """ :keyword value: Required. Collection of resources. - :paramtype value: list[~container_apps_api_client.models.SourceControl] + :paramtype value: list[~azure.mgmt.app.models.SourceControl] """ super(SourceControlCollection, self).__init__(**kwargs) self.value = value @@ -4599,14 +4661,14 @@ class SystemData(msrest.serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :vartype created_by_type: str or ~container_apps_api_client.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.app.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :vartype last_modified_by_type: str or ~container_apps_api_client.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.app.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -4636,14 +4698,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype created_by_type: str or ~container_apps_api_client.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.app.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :paramtype last_modified_by_type: str or ~container_apps_api_client.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.app.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -4664,11 +4726,11 @@ class Template(msrest.serialization.Model): :ivar revision_suffix: User friendly suffix that is appended to the revision name. :vartype revision_suffix: str :ivar containers: List of container definitions for the Container App. - :vartype containers: list[~container_apps_api_client.models.Container] + :vartype containers: list[~azure.mgmt.app.models.Container] :ivar scale: Scaling properties for the Container App. - :vartype scale: ~container_apps_api_client.models.Scale + :vartype scale: ~azure.mgmt.app.models.Scale :ivar volumes: List of volume definitions for the Container App. - :vartype volumes: list[~container_apps_api_client.models.Volume] + :vartype volumes: list[~azure.mgmt.app.models.Volume] """ _attribute_map = { @@ -4691,11 +4753,11 @@ def __init__( :keyword revision_suffix: User friendly suffix that is appended to the revision name. :paramtype revision_suffix: str :keyword containers: List of container definitions for the Container App. - :paramtype containers: list[~container_apps_api_client.models.Container] + :paramtype containers: list[~azure.mgmt.app.models.Container] :keyword scale: Scaling properties for the Container App. - :paramtype scale: ~container_apps_api_client.models.Scale + :paramtype scale: ~azure.mgmt.app.models.Scale :keyword volumes: List of volume definitions for the Container App. - :paramtype volumes: list[~container_apps_api_client.models.Volume] + :paramtype volumes: list[~azure.mgmt.app.models.Volume] """ super(Template, self).__init__(**kwargs) self.revision_suffix = revision_suffix @@ -4713,12 +4775,15 @@ class TrafficWeight(msrest.serialization.Model): :vartype weight: int :ivar latest_revision: Indicates that the traffic weight belongs to a latest stable revision. :vartype latest_revision: bool + :ivar label: Associates a traffic label with a revision. + :vartype label: str """ _attribute_map = { 'revision_name': {'key': 'revisionName', 'type': 'str'}, 'weight': {'key': 'weight', 'type': 'int'}, 'latest_revision': {'key': 'latestRevision', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, } def __init__( @@ -4727,6 +4792,7 @@ def __init__( revision_name: Optional[str] = None, weight: Optional[int] = None, latest_revision: Optional[bool] = False, + label: Optional[str] = None, **kwargs ): """ @@ -4737,11 +4803,14 @@ def __init__( :keyword latest_revision: Indicates that the traffic weight belongs to a latest stable revision. :paramtype latest_revision: bool + :keyword label: Associates a traffic label with a revision. + :paramtype label: str """ super(TrafficWeight, self).__init__(**kwargs) self.revision_name = revision_name self.weight = weight self.latest_revision = latest_revision + self.label = label class Twitter(msrest.serialization.Model): @@ -4752,7 +4821,7 @@ class Twitter(msrest.serialization.Model): :vartype enabled: bool :ivar registration: The configuration settings of the app registration for the Twitter provider. - :vartype registration: ~container_apps_api_client.models.TwitterRegistration + :vartype registration: ~azure.mgmt.app.models.TwitterRegistration """ _attribute_map = { @@ -4773,7 +4842,7 @@ def __init__( :paramtype enabled: bool :keyword registration: The configuration settings of the app registration for the Twitter provider. - :paramtype registration: ~container_apps_api_client.models.TwitterRegistration + :paramtype registration: ~azure.mgmt.app.models.TwitterRegistration """ super(Twitter, self).__init__(**kwargs) self.enabled = enabled @@ -4937,7 +5006,7 @@ class Volume(msrest.serialization.Model): :vartype name: str :ivar storage_type: Storage type for the volume. If not provided, use EmptyDir. Possible values include: "AzureFile", "EmptyDir". - :vartype storage_type: str or ~container_apps_api_client.models.StorageType + :vartype storage_type: str or ~azure.mgmt.app.models.StorageType :ivar storage_name: Name of storage resource. No need to provide for EmptyDir. :vartype storage_name: str """ @@ -4961,7 +5030,7 @@ def __init__( :paramtype name: str :keyword storage_type: Storage type for the volume. If not provided, use EmptyDir. Possible values include: "AzureFile", "EmptyDir". - :paramtype storage_type: str or ~container_apps_api_client.models.StorageType + :paramtype storage_type: str or ~azure.mgmt.app.models.StorageType :keyword storage_name: Name of storage resource. No need to provide for EmptyDir. :paramtype storage_name: str """ diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py index 021cee48b4be..505be253220b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/__init__.py @@ -6,26 +6,28 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._container_apps_auth_configs_operations import ContainerAppsAuthConfigsOperations from ._container_apps_operations import ContainerAppsOperations from ._container_apps_revisions_operations import ContainerAppsRevisionsOperations from ._container_apps_revision_replicas_operations import ContainerAppsRevisionReplicasOperations +from ._dapr_components_operations import DaprComponentsOperations +from ._operations import Operations from ._managed_environments_operations import ManagedEnvironmentsOperations from ._certificates_operations import CertificatesOperations -from ._operations import Operations -from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations -from ._dapr_components_operations import DaprComponentsOperations -from ._container_apps_auth_configs_operations import ContainerAppsAuthConfigsOperations +from ._namespaces_operations import NamespacesOperations from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations +from ._container_apps_source_controls_operations import ContainerAppsSourceControlsOperations __all__ = [ + 'ContainerAppsAuthConfigsOperations', 'ContainerAppsOperations', 'ContainerAppsRevisionsOperations', 'ContainerAppsRevisionReplicasOperations', + 'DaprComponentsOperations', + 'Operations', 'ManagedEnvironmentsOperations', 'CertificatesOperations', - 'Operations', - 'ContainerAppsSourceControlsOperations', - 'DaprComponentsOperations', - 'ContainerAppsAuthConfigsOperations', + 'NamespacesOperations', 'ManagedEnvironmentsStoragesOperations', + 'ContainerAppsSourceControlsOperations', ] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py index a0d95b39d63c..e94e35fa7d87 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_certificates_operations.py @@ -30,17 +30,17 @@ def build_list_request( subscription_id: str, resource_group_name: str, - managed_environment_name: str, + environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -65,19 +65,19 @@ def build_list_request( def build_get_request( subscription_id: str, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -102,8 +102,8 @@ def build_get_request( def build_create_or_update_request( subscription_id: str, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, *, json: JSONType = None, content: Any = None, @@ -111,15 +111,15 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -148,19 +148,19 @@ def build_create_or_update_request( def build_delete_request( subscription_id: str, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -185,8 +185,8 @@ def build_delete_request( def build_update_request( subscription_id: str, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, *, json: JSONType = None, content: Any = None, @@ -194,15 +194,15 @@ def build_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "managedEnvironmentName": _SERIALIZER.url("managed_environment_name", managed_environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -234,7 +234,7 @@ class CertificatesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -253,7 +253,7 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name: str, - managed_environment_name: str, + environment_name: str, **kwargs: Any ) -> Iterable["_models.CertificateCollection"]: """Get the Certificates in a given managed environment. @@ -262,12 +262,12 @@ def list( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.CertificateCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] @@ -281,7 +281,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, + environment_name=environment_name, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -292,7 +292,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, + environment_name=environment_name, template_url=next_link, ) request = _convert_request(request) @@ -324,14 +324,14 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates'} # type: ignore @distributed_trace def get( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, **kwargs: Any ) -> "_models.Certificate": """Get the specified Certificate. @@ -340,13 +340,13 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Certificate, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Certificate + :rtype: ~azure.mgmt.app.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] @@ -359,8 +359,8 @@ def get( request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -381,15 +381,15 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore @distributed_trace def create_or_update( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, certificate_envelope: Optional["_models.Certificate"] = None, **kwargs: Any ) -> "_models.Certificate": @@ -399,15 +399,15 @@ def create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :param certificate_envelope: Certificate to be created or updated. - :type certificate_envelope: ~container_apps_api_client.models.Certificate + :type certificate_envelope: ~azure.mgmt.app.models.Certificate :keyword callable cls: A custom type or function that will be passed the direct response :return: Certificate, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Certificate + :rtype: ~azure.mgmt.app.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] @@ -426,8 +426,8 @@ def create_or_update( request = build_create_or_update_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -450,15 +450,15 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore @distributed_trace def delete( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, **kwargs: Any ) -> None: """Deletes the specified Certificate. @@ -467,10 +467,10 @@ def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -486,8 +486,8 @@ def delete( request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, template_url=self.delete.metadata['url'], ) request = _convert_request(request) @@ -504,15 +504,15 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore @distributed_trace def update( self, resource_group_name: str, - managed_environment_name: str, - name: str, + environment_name: str, + certificate_name: str, certificate_envelope: "_models.CertificatePatch", **kwargs: Any ) -> "_models.Certificate": @@ -522,15 +522,15 @@ def update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param managed_environment_name: Name of the Managed Environment. - :type managed_environment_name: str - :param name: Name of the Certificate. - :type name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param certificate_name: Name of the Certificate. + :type certificate_name: str :param certificate_envelope: Properties of a certificate that need to be updated. - :type certificate_envelope: ~container_apps_api_client.models.CertificatePatch + :type certificate_envelope: ~azure.mgmt.app.models.CertificatePatch :keyword callable cls: A custom type or function that will be passed the direct response :return: Certificate, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Certificate + :rtype: ~azure.mgmt.app.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Certificate"] @@ -546,8 +546,8 @@ def update( request = build_update_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - managed_environment_name=managed_environment_name, - name=name, + environment_name=environment_name, + certificate_name=certificate_name, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -570,5 +570,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/certificates/{name}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py index 5cf790e91218..00f36a5ab1ee 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_auth_configs_operations.py @@ -33,7 +33,7 @@ def build_list_by_container_app_request( container_app_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs') @@ -69,7 +69,7 @@ def build_get_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}') @@ -111,7 +111,7 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}') @@ -152,7 +152,7 @@ def build_delete_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{name}') @@ -188,7 +188,7 @@ class ContainerAppsAuthConfigsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -221,7 +221,7 @@ def list_by_container_app( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AuthConfigCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.AuthConfigCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.AuthConfigCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfigCollection"] @@ -300,7 +300,7 @@ def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AuthConfig, or the result of cls(response) - :rtype: ~container_apps_api_client.models.AuthConfig + :rtype: ~azure.mgmt.app.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] @@ -358,10 +358,10 @@ def create_or_update( :param name: Name of the Container App AuthConfig. :type name: str :param auth_config_envelope: Properties used to create a Container App AuthConfig. - :type auth_config_envelope: ~container_apps_api_client.models.AuthConfig + :type auth_config_envelope: ~azure.mgmt.app.models.AuthConfig :keyword callable cls: A custom type or function that will be passed the direct response :return: AuthConfig, or the result of cls(response) - :rtype: ~container_apps_api_client.models.AuthConfig + :rtype: ~azure.mgmt.app.models.AuthConfig :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthConfig"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py index 84b483c37f78..0d681897ee71 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_operations.py @@ -33,7 +33,7 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps') @@ -65,7 +65,7 @@ def build_list_by_resource_group_request( resource_group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps') @@ -99,7 +99,7 @@ def build_get_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') @@ -139,7 +139,7 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') @@ -178,7 +178,7 @@ def build_delete_request_initial( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') @@ -207,7 +207,7 @@ def build_delete_request_initial( ) -def build_update_request( +def build_update_request_initial( subscription_id: str, resource_group_name: str, name: str, @@ -218,7 +218,7 @@ def build_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}') @@ -259,7 +259,7 @@ def build_list_custom_host_name_analysis_request( custom_hostname: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis') @@ -296,7 +296,7 @@ def build_list_secrets_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}/listSecrets') @@ -331,7 +331,7 @@ class ContainerAppsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -358,7 +358,7 @@ def list_by_subscription( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ContainerAppCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ContainerAppCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] @@ -428,7 +428,7 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ContainerAppCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ContainerAppCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] @@ -502,7 +502,7 @@ def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ContainerApp, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ContainerApp + :rtype: ~azure.mgmt.app.models.ContainerApp :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] @@ -605,7 +605,7 @@ def begin_create_or_update( :param name: Name of the Container App. :type name: str :param container_app_envelope: Properties used to create a container app. - :type container_app_envelope: ~container_apps_api_client.models.ContainerApp + :type container_app_envelope: ~azure.mgmt.app.models.ContainerApp :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -616,7 +616,7 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either ContainerApp or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~container_apps_api_client.models.ContainerApp] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.app.models.ContainerApp] :raises: ~azure.core.exceptions.HttpResponseError """ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] @@ -759,30 +759,14 @@ def get_long_running_output(pipeline_response): begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore - @distributed_trace - def update( + def _update_initial( self, resource_group_name: str, name: str, - container_app_envelope: "_models.ContainerAppPatch", + container_app_envelope: "_models.ContainerApp", **kwargs: Any - ) -> "_models.ContainerApp": - """Update properties of a Container App. - - Patches a Container App. Currently only patching of tags is supported. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param name: Name of the Container App. - :type name: str - :param container_app_envelope: Properties of a container app that need to be updated. - :type container_app_envelope: ~container_apps_api_client.models.ContainerAppPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ContainerApp, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ContainerApp - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -790,15 +774,15 @@ def update( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - _json = self._serialize.body(container_app_envelope, 'ContainerAppPatch') + _json = self._serialize.body(container_app_envelope, 'ContainerApp') - request = build_update_request( + request = build_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, name=name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self._update_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -806,20 +790,84 @@ def update( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + 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.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ContainerApp', pipeline_response) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + name: str, + container_app_envelope: "_models.ContainerApp", + **kwargs: Any + ) -> LROPoller[None]: + """Update properties of a Container App. - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore + Patches a Container App using JSON Merge Patch. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param name: Name of the Container App. + :type name: str + :param container_app_envelope: Properties of a Container App that need to be updated. + :type container_app_envelope: ~azure.mgmt.app.models.ContainerApp + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + name=name, + container_app_envelope=container_app_envelope, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{name}'} # type: ignore @distributed_trace def list_custom_host_name_analysis( @@ -841,7 +889,7 @@ def list_custom_host_name_analysis( :type custom_hostname: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) - :rtype: ~container_apps_api_client.models.CustomHostnameAnalysisResult + :rtype: ~azure.mgmt.app.models.CustomHostnameAnalysisResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameAnalysisResult"] @@ -896,7 +944,7 @@ def list_secrets( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecretsCollection, or the result of cls(response) - :rtype: ~container_apps_api_client.models.SecretsCollection + :rtype: ~azure.mgmt.app.models.SecretsCollection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretsCollection"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py index 7ed14ea71456..c1e499652011 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revision_replicas_operations.py @@ -30,19 +30,19 @@ def build_get_replica_request( resource_group_name: str, container_app_name: str, revision_name: str, - name: str, + replica_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "replicaName": _SERIALIZER.url("replica_name", replica_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -71,7 +71,7 @@ def build_list_replicas_request( revision_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas') @@ -107,7 +107,7 @@ class ContainerAppsRevisionReplicasOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -128,7 +128,7 @@ def get_replica( resource_group_name: str, container_app_name: str, revision_name: str, - name: str, + replica_name: str, **kwargs: Any ) -> "_models.Replica": """Get a replica for a Container App Revision. @@ -141,11 +141,11 @@ def get_replica( :type container_app_name: str :param revision_name: Name of the Container App Revision. :type revision_name: str - :param name: Name of the Container App Revision Replica. - :type name: str + :param replica_name: Name of the Container App Revision Replica. + :type replica_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Replica, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Replica + :rtype: ~azure.mgmt.app.models.Replica :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Replica"] @@ -160,7 +160,7 @@ def get_replica( resource_group_name=resource_group_name, container_app_name=container_app_name, revision_name=revision_name, - name=name, + replica_name=replica_name, template_url=self.get_replica.metadata['url'], ) request = _convert_request(request) @@ -181,7 +181,7 @@ def get_replica( return deserialized - get_replica.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{name}'} # type: ignore + get_replica.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}'} # type: ignore @distributed_trace @@ -204,7 +204,7 @@ def list_replicas( :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ReplicaCollection, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ReplicaCollection + :rtype: ~azure.mgmt.app.models.ReplicaCollection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicaCollection"] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py index 55acb0f3d9c7..cbb69b153432 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_revisions_operations.py @@ -30,9 +30,11 @@ def build_list_revisions_request( subscription_id: str, resource_group_name: str, container_app_name: str, + *, + filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions') @@ -47,6 +49,8 @@ def build_list_revisions_request( # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] @@ -65,18 +69,18 @@ def build_get_revision_request( subscription_id: str, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -102,18 +106,18 @@ def build_activate_revision_request( subscription_id: str, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -139,18 +143,18 @@ def build_deactivate_revision_request( subscription_id: str, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -176,18 +180,18 @@ def build_restart_revision_request( subscription_id: str, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "revisionName": _SERIALIZER.url("revision_name", revision_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -215,7 +219,7 @@ class ContainerAppsRevisionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -235,6 +239,7 @@ def list_revisions( self, resource_group_name: str, container_app_name: str, + filter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.RevisionCollection"]: """Get the Revisions for a given Container App. @@ -245,9 +250,11 @@ def list_revisions( :type resource_group_name: str :param container_app_name: Name of the Container App for which Revisions are needed. :type container_app_name: str + :param filter: The filter to apply on the operation. + :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RevisionCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.RevisionCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.RevisionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RevisionCollection"] @@ -262,6 +269,7 @@ def prepare_request(next_link=None): subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, + filter=filter, template_url=self.list_revisions.metadata['url'], ) request = _convert_request(request) @@ -273,6 +281,7 @@ def prepare_request(next_link=None): subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, + filter=filter, template_url=next_link, ) request = _convert_request(request) @@ -311,7 +320,7 @@ def get_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> "_models.Revision": """Get a revision of a Container App. @@ -322,11 +331,11 @@ def get_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Revision, or the result of cls(response) - :rtype: ~container_apps_api_client.models.Revision + :rtype: ~azure.mgmt.app.models.Revision :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Revision"] @@ -340,7 +349,7 @@ def get_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.get_revision.metadata['url'], ) request = _convert_request(request) @@ -361,7 +370,7 @@ def get_revision( return deserialized - get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}'} # type: ignore + get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}'} # type: ignore @distributed_trace @@ -369,7 +378,7 @@ def activate_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> None: """Activates a revision for a Container App. @@ -380,8 +389,8 @@ def activate_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -398,7 +407,7 @@ def activate_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.activate_revision.metadata['url'], ) request = _convert_request(request) @@ -415,7 +424,7 @@ def activate_revision( if cls: return cls(pipeline_response, None, {}) - activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/activate'} # type: ignore + activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate'} # type: ignore @distributed_trace @@ -423,7 +432,7 @@ def deactivate_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> None: """Deactivates a revision for a Container App. @@ -434,8 +443,8 @@ def deactivate_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -452,7 +461,7 @@ def deactivate_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.deactivate_revision.metadata['url'], ) request = _convert_request(request) @@ -469,7 +478,7 @@ def deactivate_revision( if cls: return cls(pipeline_response, None, {}) - deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/deactivate'} # type: ignore + deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate'} # type: ignore @distributed_trace @@ -477,7 +486,7 @@ def restart_revision( self, resource_group_name: str, container_app_name: str, - name: str, + revision_name: str, **kwargs: Any ) -> None: """Restarts a revision for a Container App. @@ -488,8 +497,8 @@ def restart_revision( :type resource_group_name: str :param container_app_name: Name of the Container App. :type container_app_name: str - :param name: Name of the Container App Revision. - :type name: str + :param revision_name: Name of the Container App Revision. + :type revision_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -506,7 +515,7 @@ def restart_revision( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, container_app_name=container_app_name, - name=name, + revision_name=revision_name, template_url=self.restart_revision.metadata['url'], ) request = _convert_request(request) @@ -523,5 +532,5 @@ def restart_revision( if cls: return cls(pipeline_response, None, {}) - restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{name}/restart'} # type: ignore + restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py index 840a4c9f6839..d93bfcbbc9d0 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_container_apps_source_controls_operations.py @@ -35,7 +35,7 @@ def build_list_by_container_app_request( container_app_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols') @@ -71,7 +71,7 @@ def build_get_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}') @@ -113,7 +113,7 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}') @@ -154,7 +154,7 @@ def build_delete_request_initial( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{name}') @@ -190,7 +190,7 @@ class ContainerAppsSourceControlsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -223,7 +223,7 @@ def list_by_container_app( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.SourceControlCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] @@ -302,7 +302,7 @@ def get( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SourceControl, or the result of cls(response) - :rtype: ~container_apps_api_client.models.SourceControl + :rtype: ~azure.mgmt.app.models.SourceControl :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControl"] @@ -411,7 +411,7 @@ def begin_create_or_update( :param name: Name of the Container App SourceControl. :type name: str :param source_control_envelope: Properties used to create a Container App SourceControl. - :type source_control_envelope: ~container_apps_api_client.models.SourceControl + :type source_control_envelope: ~azure.mgmt.app.models.SourceControl :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -422,7 +422,7 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either SourceControl or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~container_apps_api_client.models.SourceControl] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.app.models.SourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py index a61679d7fa61..86aa1f4bd77d 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_dapr_components_operations.py @@ -33,7 +33,7 @@ def build_list_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents') @@ -66,18 +66,18 @@ def build_get_request( subscription_id: str, resource_group_name: str, environment_name: str, - name: str, + component_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "componentName": _SERIALIZER.url("component_name", component_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -103,7 +103,7 @@ def build_create_or_update_request( subscription_id: str, resource_group_name: str, environment_name: str, - name: str, + component_name: str, *, json: JSONType = None, content: Any = None, @@ -111,15 +111,15 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "componentName": _SERIALIZER.url("component_name", component_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -149,18 +149,18 @@ def build_delete_request( subscription_id: str, resource_group_name: str, environment_name: str, - name: str, + component_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "componentName": _SERIALIZER.url("component_name", component_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -181,6 +181,43 @@ def build_delete_request( **kwargs ) + +def build_list_secrets_request( + subscription_id: str, + resource_group_name: str, + environment_name: str, + component_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2022-03-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "componentName": _SERIALIZER.url("component_name", component_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + class DaprComponentsOperations(object): """DaprComponentsOperations operations. @@ -188,7 +225,7 @@ class DaprComponentsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -221,8 +258,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DaprComponentsCollection or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~container_apps_api_client.models.DaprComponentsCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.DaprComponentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponentsCollection"] @@ -286,7 +322,7 @@ def get( self, resource_group_name: str, environment_name: str, - name: str, + component_name: str, **kwargs: Any ) -> "_models.DaprComponent": """Get a dapr component. @@ -297,11 +333,11 @@ def get( :type resource_group_name: str :param environment_name: Name of the Managed Environment. :type environment_name: str - :param name: Name of the Dapr Component. - :type name: str + :param component_name: Name of the Dapr Component. + :type component_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DaprComponent, or the result of cls(response) - :rtype: ~container_apps_api_client.models.DaprComponent + :rtype: ~azure.mgmt.app.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] @@ -315,7 +351,7 @@ def get( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - name=name, + component_name=component_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -336,7 +372,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}'} # type: ignore @distributed_trace @@ -344,7 +380,7 @@ def create_or_update( self, resource_group_name: str, environment_name: str, - name: str, + component_name: str, dapr_component_envelope: "_models.DaprComponent", **kwargs: Any ) -> "_models.DaprComponent": @@ -356,13 +392,13 @@ def create_or_update( :type resource_group_name: str :param environment_name: Name of the Managed Environment. :type environment_name: str - :param name: Name of the Dapr Component. - :type name: str + :param component_name: Name of the Dapr Component. + :type component_name: str :param dapr_component_envelope: Configuration details of the Dapr Component. - :type dapr_component_envelope: ~container_apps_api_client.models.DaprComponent + :type dapr_component_envelope: ~azure.mgmt.app.models.DaprComponent :keyword callable cls: A custom type or function that will be passed the direct response :return: DaprComponent, or the result of cls(response) - :rtype: ~container_apps_api_client.models.DaprComponent + :rtype: ~azure.mgmt.app.models.DaprComponent :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprComponent"] @@ -379,7 +415,7 @@ def create_or_update( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - name=name, + component_name=component_name, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -402,7 +438,7 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}'} # type: ignore @distributed_trace @@ -410,7 +446,7 @@ def delete( self, resource_group_name: str, environment_name: str, - name: str, + component_name: str, **kwargs: Any ) -> None: """Delete a Dapr Component. @@ -421,8 +457,8 @@ def delete( :type resource_group_name: str :param environment_name: Name of the Managed Environment. :type environment_name: str - :param name: Name of the Dapr Component. - :type name: str + :param component_name: Name of the Dapr Component. + :type component_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -439,7 +475,7 @@ def delete( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, environment_name=environment_name, - name=name, + component_name=component_name, template_url=self.delete.metadata['url'], ) request = _convert_request(request) @@ -456,5 +492,63 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{name}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}'} # type: ignore + + + @distributed_trace + def list_secrets( + self, + resource_group_name: str, + environment_name: str, + component_name: str, + **kwargs: Any + ) -> "_models.DaprSecretsCollection": + """List secrets for a dapr component. + + List secrets for a dapr component. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param component_name: Name of the Dapr Component. + :type component_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DaprSecretsCollection, or the result of cls(response) + :rtype: ~azure.mgmt.app.models.DaprSecretsCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DaprSecretsCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_secrets_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + environment_name=environment_name, + component_name=component_name, + template_url=self.list_secrets.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **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('DaprSecretsCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py index e9846a028b32..ae4f8d02dd57 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_operations.py @@ -33,7 +33,7 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments') @@ -65,7 +65,7 @@ def build_list_by_resource_group_request( resource_group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments') @@ -96,17 +96,17 @@ def build_list_by_resource_group_request( def build_get_request( subscription_id: str, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -131,7 +131,7 @@ def build_get_request( def build_create_or_update_request_initial( subscription_id: str, resource_group_name: str, - name: str, + environment_name: str, *, json: JSONType = None, content: Any = None, @@ -139,14 +139,14 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -175,17 +175,17 @@ def build_create_or_update_request_initial( def build_delete_request_initial( subscription_id: str, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -207,10 +207,10 @@ def build_delete_request_initial( ) -def build_update_request( +def build_update_request_initial( subscription_id: str, resource_group_name: str, - name: str, + environment_name: str, *, json: JSONType = None, content: Any = None, @@ -218,14 +218,14 @@ def build_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -257,7 +257,7 @@ class ManagedEnvironmentsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -284,8 +284,7 @@ def list_by_subscription( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ManagedEnvironmentsCollection or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] @@ -355,8 +354,7 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ManagedEnvironmentsCollection or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~container_apps_api_client.models.ManagedEnvironmentsCollection] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.ManagedEnvironmentsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentsCollection"] @@ -417,7 +415,7 @@ def get_next(next_link=None): def get( self, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> "_models.ManagedEnvironment": """Get the properties of a Managed Environment. @@ -426,11 +424,11 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param name: Name of the Environment. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironment, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironment + :rtype: ~azure.mgmt.app.models.ManagedEnvironment :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] @@ -443,7 +441,7 @@ def get( request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -464,13 +462,13 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore def _create_or_update_initial( self, resource_group_name: str, - name: str, + environment_name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> "_models.ManagedEnvironment": @@ -487,7 +485,7 @@ def _create_or_update_initial( request = build_create_or_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -513,14 +511,14 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore @distributed_trace def begin_create_or_update( self, resource_group_name: str, - name: str, + environment_name: str, environment_envelope: "_models.ManagedEnvironment", **kwargs: Any ) -> LROPoller["_models.ManagedEnvironment"]: @@ -530,10 +528,10 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param name: Name of the Environment. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str :param environment_envelope: Configuration details of the Environment. - :type environment_envelope: ~container_apps_api_client.models.ManagedEnvironment + :type environment_envelope: ~azure.mgmt.app.models.ManagedEnvironment :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -544,7 +542,7 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either ManagedEnvironment or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~container_apps_api_client.models.ManagedEnvironment] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.app.models.ManagedEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] @@ -558,7 +556,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, environment_envelope=environment_envelope, content_type=content_type, cls=lambda x,y,z: x, @@ -587,12 +585,12 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore def _delete_initial( self, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -605,7 +603,7 @@ def _delete_initial( request = build_delete_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) @@ -621,14 +619,14 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore @distributed_trace def begin_delete( self, resource_group_name: str, - name: str, + environment_name: str, **kwargs: Any ) -> LROPoller[None]: """Delete a Managed Environment. @@ -637,8 +635,8 @@ def begin_delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param name: Name of the Environment. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -661,7 +659,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, cls=lambda x,y,z: x, **kwargs ) @@ -685,32 +683,16 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore - @distributed_trace - def update( + def _update_initial( self, resource_group_name: str, - name: str, - environment_envelope: "_models.ManagedEnvironmentPatch", + environment_name: str, + environment_envelope: "_models.ManagedEnvironment", **kwargs: Any - ) -> "_models.ManagedEnvironment": - """Update Managed Environment's properties. - - Patches a Managed Environment. Only patching of tags is supported currently. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param name: Name of the Environment. - :type name: str - :param environment_envelope: Configuration details of the Environment. - :type environment_envelope: ~container_apps_api_client.models.ManagedEnvironmentPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedEnvironment, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironment"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -718,15 +700,15 @@ def update( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - _json = self._serialize.body(environment_envelope, 'ManagedEnvironmentPatch') + _json = self._serialize.body(environment_envelope, 'ManagedEnvironment') - request = build_update_request( + request = build_update_request_initial( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - name=name, + environment_name=environment_name, content_type=content_type, json=_json, - template_url=self.update.metadata['url'], + template_url=self._update_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) @@ -734,17 +716,81 @@ def update( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + 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.DefaultErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ManagedEnvironment', pipeline_response) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{name}'} # type: ignore + @distributed_trace + def begin_update( + self, + resource_group_name: str, + environment_name: str, + environment_envelope: "_models.ManagedEnvironment", + **kwargs: Any + ) -> LROPoller[None]: + """Update Managed Environment's properties. + + Patches a Managed Environment using JSON Merge Patch. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param environment_envelope: Configuration details of the Environment. + :type environment_envelope: ~azure.mgmt.app.models.ManagedEnvironment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + environment_name=environment_name, + environment_envelope=environment_envelope, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py index 065193077a23..51d525f40f7b 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_managed_environments_storages_operations.py @@ -29,17 +29,17 @@ def build_list_request( subscription_id: str, resource_group_name: str, - env_name: str, + environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -64,19 +64,19 @@ def build_list_request( def build_get_request( subscription_id: str, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "storageName": _SERIALIZER.url("storage_name", storage_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -101,8 +101,8 @@ def build_get_request( def build_create_or_update_request( subscription_id: str, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, *, json: JSONType = None, content: Any = None, @@ -110,15 +110,15 @@ def build_create_or_update_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "storageName": _SERIALIZER.url("storage_name", storage_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -147,19 +147,19 @@ def build_create_or_update_request( def build_delete_request( subscription_id: str, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}') + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - "envName": _SERIALIZER.url("env_name", env_name, 'str'), - "name": _SERIALIZER.url("name", name, 'str'), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + "storageName": _SERIALIZER.url("storage_name", storage_name, 'str'), } url = _format_url_section(url, **path_format_arguments) @@ -187,7 +187,7 @@ class ManagedEnvironmentsStoragesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -206,7 +206,7 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name: str, - env_name: str, + environment_name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStoragesCollection": """Get all storages for a managedEnvironment. @@ -215,11 +215,11 @@ def list( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str + :param environment_name: Name of the Environment. + :type environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironmentStoragesCollection, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironmentStoragesCollection + :rtype: ~azure.mgmt.app.models.ManagedEnvironmentStoragesCollection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStoragesCollection"] @@ -232,7 +232,7 @@ def list( request = build_list_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, + environment_name=environment_name, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -253,15 +253,15 @@ def list( return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages'} # type: ignore @distributed_trace def get( self, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, **kwargs: Any ) -> "_models.ManagedEnvironmentStorage": """Get storage for a managedEnvironment. @@ -270,13 +270,13 @@ def get( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str - :param name: Name of the storage. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param storage_name: Name of the storage. + :type storage_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironmentStorage, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage + :rtype: ~azure.mgmt.app.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] @@ -289,8 +289,8 @@ def get( request = build_get_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, - name=name, + environment_name=environment_name, + storage_name=storage_name, template_url=self.get.metadata['url'], ) request = _convert_request(request) @@ -311,15 +311,15 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}'} # type: ignore @distributed_trace def create_or_update( self, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, storage_envelope: "_models.ManagedEnvironmentStorage", **kwargs: Any ) -> "_models.ManagedEnvironmentStorage": @@ -329,15 +329,15 @@ def create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str - :param name: Name of the storage. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param storage_name: Name of the storage. + :type storage_name: str :param storage_envelope: Configuration details of storage. - :type storage_envelope: ~container_apps_api_client.models.ManagedEnvironmentStorage + :type storage_envelope: ~azure.mgmt.app.models.ManagedEnvironmentStorage :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagedEnvironmentStorage, or the result of cls(response) - :rtype: ~container_apps_api_client.models.ManagedEnvironmentStorage + :rtype: ~azure.mgmt.app.models.ManagedEnvironmentStorage :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedEnvironmentStorage"] @@ -353,8 +353,8 @@ def create_or_update( request = build_create_or_update_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, - name=name, + environment_name=environment_name, + storage_name=storage_name, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -377,15 +377,15 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}'} # type: ignore @distributed_trace def delete( self, resource_group_name: str, - env_name: str, - name: str, + environment_name: str, + storage_name: str, **kwargs: Any ) -> None: """Delete storage for a managedEnvironment. @@ -394,10 +394,10 @@ def delete( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param env_name: Name of the Environment. - :type env_name: str - :param name: Name of the storage. - :type name: str + :param environment_name: Name of the Environment. + :type environment_name: str + :param storage_name: Name of the storage. + :type storage_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -413,8 +413,8 @@ def delete( request = build_delete_request( subscription_id=self._config.subscription_id, resource_group_name=resource_group_name, - env_name=env_name, - name=name, + environment_name=environment_name, + storage_name=storage_name, template_url=self.delete.metadata['url'], ) request = _convert_request(request) @@ -431,5 +431,5 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{envName}/storages/{name}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}'} # type: ignore diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_namespaces_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_namespaces_operations.py new file mode 100644 index 000000000000..d675fa1523dc --- /dev/null +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_namespaces_operations.py @@ -0,0 +1,154 @@ +# 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 functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, 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.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_check_name_availability_request( + subscription_id: str, + resource_group_name: str, + environment_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-03-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "environmentName": _SERIALIZER.url("environment_name", environment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + json=json, + content=content, + **kwargs + ) + +class NamespacesOperations(object): + """NamespacesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.app.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def check_name_availability( + self, + resource_group_name: str, + environment_name: str, + check_name_availability_request: "_models.CheckNameAvailabilityRequest", + **kwargs: Any + ) -> "_models.CheckNameAvailabilityResponse": + """Checks the resource name availability. + + Checks if resource name is available. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param environment_name: Name of the Managed Environment. + :type environment_name: str + :param check_name_availability_request: The check name availability request. + :type check_name_availability_request: ~azure.mgmt.app.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResponse, or the result of cls(response) + :rtype: ~azure.mgmt.app.models.CheckNameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(check_name_availability_request, 'CheckNameAvailabilityRequest') + + request = build_check_name_availability_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + environment_name=environment_name, + content_type=content_type, + json=_json, + template_url=self.check_name_availability.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **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('CheckNameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability'} # type: ignore + diff --git a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py index a998d5f98846..d83826042ead 100644 --- a/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py +++ b/sdk/app/azure-mgmt-app/azure/mgmt/app/operations/_operations.py @@ -29,7 +29,7 @@ def build_list_request( **kwargs: Any ) -> HttpRequest: - api_version = "2022-01-01-preview" + api_version = "2022-03-01" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/providers/Microsoft.App/operations') @@ -57,7 +57,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~container_apps_api_client.models + :type models: ~azure.mgmt.app.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -81,7 +81,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailableOperations or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~container_apps_api_client.models.AvailableOperations] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.app.models.AvailableOperations] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"]