def delete(<EOL>self, resource_group_name, deployment_name, custom_headers=None, raw=False, polling=True, **operation_config):
raw_result = self._delete_initial(<EOL>resource_group_name=resource_group_name,<EOL>deployment_name=deployment_name,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>
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 to delete.
        :type deployment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`