停止或删除 Azure 流分析作业Stop or delete your Azure Stream Analytics job

可以通过 Azure 门户、Azure PowerShell、Azure SDK for .Net 或 REST API 轻松地停止或删除 Azure 流分析作业。Azure Stream Analytics jobs can be easily stopped or deleted through the Azure portal, Azure PowerShell, Azure SDK for .Net, or REST API. 流分析作业在删除后无法恢复。A Stream Analytics job cannot be recovered once it has been deleted.

备注

当停止流分析作业时,数据只会保留在输入和输出存储中,例如事件中心或 Azure SQL 数据库。When you stop your Stream Analytics job, the data persists only in the input and output storage, such as Event Hubs or Azure SQL Database. 如果需要从 Azure 中删除数据,请务必遵循流分析作业的输入和输出资源删除过程进行操作。If you are required to remove data from Azure, be sure to follow the removal process for the input and output resources of your Stream Analytics job.

停止 Azure 门户中的作业Stop a job in Azure portal

停止作业时,将取消预配资源并停止处理事件。When you stop a job, the resources are deprovisionned and it stops processing events. 与此作业相关的收费也将停止。Charges related to this job are also stopped. 但是,你的所有配置都会保留,你可以稍后重启作业However all your configuration are kept and you can restart the job later

  1. 登录到 Azure 门户Sign in to the Azure portal.

  2. 找到正在运行的流分析作业并选择它。Locate your running Stream Analytics job and select it.

  3. 在流分析作业页上,选择“停止” 以停止作业。On the Stream Analytics job page, select Stop to stop the job.

    停止 Azure 流分析作业

删除 Azure 门户中的作业Delete a job in Azure portal

警告

流分析作业在删除后无法恢复。A Stream Analytics job cannot be recovered once it has been deleted.

  1. 登录到 Azure 门户。Sign in to the Azure portal.

  2. 找到现有流分析作业并选择它。Locate your existing Stream Analytics job and select it.

  3. 在流分析作业页上,选择“删除” 以删除作业。On the Stream Analytics job page, select Delete to delete the job.

    删除 Azure 流分析作业

使用 PowerShell 停止或删除作业Stop or delete a job using PowerShell

备注

本文进行了更新,以便使用新的 Azure PowerShell Az 模块。This article has been updated to use the new Azure PowerShell Az module. 你仍然可以使用 AzureRM 模块,至少在 2020 年 12 月之前,它将继续接收 bug 修补程序。You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. 若要详细了解新的 Az 模块和 AzureRM 兼容性,请参阅新 Azure Powershell Az 模块简介To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. 有关 Az 模块安装说明,请参阅安装 Azure PowerShellFor Az module installation instructions, see Install Azure PowerShell.

若要使用 PowerShell 停止作业,请使用 Stop-AzStreamAnalyticsJob cmdlet。To stop a job using PowerShell, use the Stop-AzStreamAnalyticsJob cmdlet. 若要使用 PowerShell 删除作业,请使用 Remove-AzStreamAnalyticsJob cmdlet。To delete a job using PowerShell, use the Remove-AzStreamAnalyticsJob cmdlet.

使用 Azure SDK for .NET 停止或删除作业Stop or delete a job using Azure SDK for .NET

若要使用 Azure SDK for .NET 停止作业,请使用 StreamingJobsOperationsExtensions.BeginStop 方法。To stop a job using Azure SDK for .NET, use the StreamingJobsOperationsExtensions.BeginStop method. 若要使用 Azure SDK for .NET 删除作业,请使用 StreamingJobsOperationsExtensions.BeginDelete 方法。To delete a job using Azure SDK for .NET, StreamingJobsOperationsExtensions.BeginDelete method.

使用 REST API 停止或删除作业Stop or delete a job using REST API

若要使用 REST API 停止作业,请参阅停止方法。To stop a job using REST API, refer to the Stop method. 若要使用 REST API 删除作业,请参阅删除方法。To delete a job using REST API, refer to the Delete method.