diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/_app_platform_management_client.py index 56650ef8a36..81c5e3d2400 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/_app_platform_management_client.py @@ -23,7 +23,6 @@ from .operations import ConfigServersOperations from .operations import ConfigurationServicesOperations from .operations import ServiceRegistriesOperations -from .operations import ServiceOperations from .operations import BuildServiceOperations from .operations import BuildpacksBindingOperations from .operations import MonitoringSettingsOperations @@ -49,8 +48,6 @@ class AppPlatformManagementClient(object): :vartype configuration_services: azure.mgmt.appplatform.v2022_05_01_preview.operations.ConfigurationServicesOperations :ivar service_registries: ServiceRegistriesOperations operations :vartype service_registries: azure.mgmt.appplatform.v2022_05_01_preview.operations.ServiceRegistriesOperations - :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.appplatform.v2022_05_01_preview.operations.ServiceOperations :ivar build_service: BuildServiceOperations operations :vartype build_service: azure.mgmt.appplatform.v2022_05_01_preview.operations.BuildServiceOperations :ivar buildpacks_binding: BuildpacksBindingOperations operations @@ -107,8 +104,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.service_registries = ServiceRegistriesOperations( self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) self.build_service = BuildServiceOperations( self._client, self._config, self._serialize, self._deserialize) self.buildpacks_binding = BuildpacksBindingOperations( diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/_app_platform_management_client.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/_app_platform_management_client.py index 3e1e3034473..372eb15ad69 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/_app_platform_management_client.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/_app_platform_management_client.py @@ -21,7 +21,6 @@ from .operations import ConfigServersOperations from .operations import ConfigurationServicesOperations from .operations import ServiceRegistriesOperations -from .operations import ServiceOperations from .operations import BuildServiceOperations from .operations import BuildpacksBindingOperations from .operations import MonitoringSettingsOperations @@ -47,8 +46,6 @@ class AppPlatformManagementClient(object): :vartype configuration_services: azure.mgmt.appplatform.v2022_05_01_preview.aio.operations.ConfigurationServicesOperations :ivar service_registries: ServiceRegistriesOperations operations :vartype service_registries: azure.mgmt.appplatform.v2022_05_01_preview.aio.operations.ServiceRegistriesOperations - :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.appplatform.v2022_05_01_preview.aio.operations.ServiceOperations :ivar build_service: BuildServiceOperations operations :vartype build_service: azure.mgmt.appplatform.v2022_05_01_preview.aio.operations.BuildServiceOperations :ivar buildpacks_binding: BuildpacksBindingOperations operations @@ -104,8 +101,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.service_registries = ServiceRegistriesOperations( self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) self.build_service = BuildServiceOperations( self._client, self._config, self._serialize, self._deserialize) self.buildpacks_binding = BuildpacksBindingOperations( diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/__init__.py index 8858c1d09e8..e303e49bf81 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/__init__.py @@ -10,7 +10,6 @@ from ._config_servers_operations import ConfigServersOperations from ._configuration_services_operations import ConfigurationServicesOperations from ._service_registries_operations import ServiceRegistriesOperations -from ._service_operations import ServiceOperations from ._build_service_operations import BuildServiceOperations from ._buildpacks_binding_operations import BuildpacksBindingOperations from ._monitoring_settings_operations import MonitoringSettingsOperations @@ -28,7 +27,6 @@ 'ConfigServersOperations', 'ConfigurationServicesOperations', 'ServiceRegistriesOperations', - 'ServiceOperations', 'BuildServiceOperations', 'BuildpacksBindingOperations', 'MonitoringSettingsOperations', diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_registries_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_registries_operations.py index 72013ca2b60..660793dc75b 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_registries_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/aio/operations/_service_registries_operations.py @@ -222,3 +222,112 @@ 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.AppPlatform/Spring/{serviceName}/serviceRegistries/default'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/default'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Disable the default Service Registry. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, 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._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **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_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/default'} # type: ignore diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/__init__.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/__init__.py index 8858c1d09e8..e303e49bf81 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/__init__.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/__init__.py @@ -10,7 +10,6 @@ from ._config_servers_operations import ConfigServersOperations from ._configuration_services_operations import ConfigurationServicesOperations from ._service_registries_operations import ServiceRegistriesOperations -from ._service_operations import ServiceOperations from ._build_service_operations import BuildServiceOperations from ._buildpacks_binding_operations import BuildpacksBindingOperations from ._monitoring_settings_operations import MonitoringSettingsOperations @@ -28,7 +27,6 @@ 'ConfigServersOperations', 'ConfigurationServicesOperations', 'ServiceRegistriesOperations', - 'ServiceOperations', 'BuildServiceOperations', 'BuildpacksBindingOperations', 'MonitoringSettingsOperations', diff --git a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/_service_registries_operations.py b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/_service_registries_operations.py index 91878c6cbe2..4b2180a5ef3 100644 --- a/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/_service_registries_operations.py +++ b/src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/v2022_05_01_preview/operations/_service_registries_operations.py @@ -229,3 +229,114 @@ 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.AppPlatform/Spring/{serviceName}/serviceRegistries/default'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2022-05-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/default'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Disable the default Service Registry. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param service_name: The name of the Service resource. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, 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._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **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_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/serviceRegistries/default'} # type: ignore