@distributed_trace_async
async def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> AsyncLROPoller[None]:
    'Deletes a deployment from the deployment history.\n\n        A template deployment that is currently running cannot be deleted. Deleting a template\n        deployment removes the associated deployment operations. Deleting a template deployment does\n        not affect the state of the resource group. This is an asynchronous operation that returns a\n        status of 202 until the template deployment is successfully deleted. The Location response\n        header contains the URI that is used to obtain the status of the process. While the process is\n        running, a call to the URI in the Location header returns a status of 202. When the process\n        finishes, the URI in the Location header returns a status of 204 on success. If the\n        asynchronous request failed, the URI in the Location header returns an error-level status code.\n\n        :param resource_group_name: The name of the resource group with the deployment to delete. The\n         name is case insensitive.\n        :type resource_group_name: str\n        :param deployment_name: The name of the deployment.\n        :type deployment_name: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :keyword str continuation_token: A continuation token to restart a poller from a saved state.\n        :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n         this operation to not poll, or pass in your own initialized polling object for a personal\n         polling strategy.\n        :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n        :keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n         Retry-After header is present.\n        :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n        :rtype: ~azure.core.polling.AsyncLROPoller[None]\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    api_version = kwargs.pop('api_version', '2019-08-01')
    polling = kwargs.pop('polling', True)
    cls = kwargs.pop('cls', None)
    lro_delay = kwargs.pop('polling_interval', self._config.polling_interval)
    cont_token = kwargs.pop('continuation_token', None)
    if (cont_token is None):
        raw_result = (await self._delete_initial(resource_group_name=resource_group_name, deployment_name=deployment_name, api_version=api_version, 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)
    return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
Deletes a deployment from the deployment history.

A template deployment that is currently running cannot be deleted. Deleting a template
deployment removes the associated deployment operations. Deleting a template deployment does
not affect the state of the resource group. This is an asynchronous operation that returns a
status of 202 until the template deployment is successfully deleted. The Location response
header contains the URI that is used to obtain the status of the process. While the process is
running, a call to the URI in the Location header returns a status of 202. When the process
finishes, the URI in the Location header returns a status of 204 on success. If the
asynchronous request failed, the URI in the Location header returns an error-level status code.

:param resource_group_name: The name of the resource group with the deployment to delete. The
 name is case insensitive.
:type resource_group_name: str
:param deployment_name: The name of the deployment.
:type deployment_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
@distributed_trace_async
async def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> AsyncLROPoller[None]:
    'Deletes a deployment from the deployment history.\n\n        A template deployment that is currently running cannot be deleted. Deleting a template\n        deployment removes the associated deployment operations. Deleting a template deployment does\n        not affect the state of the resource group. This is an asynchronous operation that returns a\n        status of 202 until the template deployment is successfully deleted. The Location response\n        header contains the URI that is used to obtain the status of the process. While the process is\n        running, a call to the URI in the Location header returns a status of 202. When the process\n        finishes, the URI in the Location header returns a status of 204 on success. If the\n        asynchronous request failed, the URI in the Location header returns an error-level status code.\n\n        :param resource_group_name: The name of the resource group with the deployment to delete. The\n         name is case insensitive.\n        :type resource_group_name: str\n        :param deployment_name: The name of the deployment.\n        :type deployment_name: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :keyword str continuation_token: A continuation token to restart a poller from a saved state.\n        :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n         this operation to not poll, or pass in your own initialized polling object for a personal\n         polling strategy.\n        :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n        :keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n         Retry-After header is present.\n        :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n        :rtype: ~azure.core.polling.AsyncLROPoller[None]\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    api_version = kwargs.pop('api_version', '2019-08-01')
    polling = kwargs.pop('polling', True)
    cls = kwargs.pop('cls', None)
    lro_delay = kwargs.pop('polling_interval', self._config.polling_interval)
    cont_token = kwargs.pop('continuation_token', None)
    if (cont_token is None):
        raw_result = (await self._delete_initial(resource_group_name=resource_group_name, deployment_name=deployment_name, api_version=api_version, 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)
    return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)