Workspace Purge - Purge

藉由一組使用者定義的篩選,清除Log Analytics工作區中的數據。

為管理系統資源,系統會將清除要求限制為每小時 50 個要求。 您應該藉由傳送單一命令 (其述詞包含需要清除的所有使用者身分識別) 來批次處理清除要求的執行。 使用 in 運算子來指定多個身分識別。 您應該先執行查詢,再使用 進行清除要求,以確認結果是否預期。 Log Analytics 僅支援符合 GDPR 所需的清除作業。 Log Analytics 產品小組會保留拒絕未用於 GDPR 合規性之清除作業要求的權利。 如果發生爭議,請建立支援票證

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge?api-version=2020-08-01

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string

目標訂用帳戶的標識碼。

workspaceName
path True

string

工作區的名稱。

Regex pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
filters True

WorkspacePurgeBodyFilters[]

數據行和篩選集 (查詢) 執行,以清除產生的數據。

table True

string

要從中清除數據的數據表。

回應

名稱 類型 Description
202 Accepted

WorkspacePurgeResponse

接受清除Log Analytics工作區的要求。

Headers

x-ms-status-location: string

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

WorkspacePurge
WorkspacePurgeResourceId

WorkspacePurge

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/OIAutoRest5123/providers/Microsoft.OperationalInsights/workspaces/aztest5048/purge?api-version=2020-08-01

{
  "table": "Heartbeat",
  "filters": [
    {
      "column": "TimeGenerated",
      "operator": ">",
      "value": "2017-09-01T00:00:00"
    }
  ]
}

Sample Response

x-ms-status-location: https://management.azure.com/subscriptions/b96161de-b34a-480f-7343-59b099299283/resourceGroups/example/providers/microsoft.operationalinsights/workspaces/test/operations/purge-970318e7-b859-4edb-8903-83b1b54d0b74?api-version=2020-08-01
{
  "operationId": "7d7cf277-9113-4ab3-8359-d0364b74d01d"
}

WorkspacePurgeResourceId

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/OIAutoRest5123/providers/Microsoft.OperationalInsights/workspaces/aztest5048/purge?api-version=2020-08-01

{
  "table": "Heartbeat",
  "filters": [
    {
      "column": "_ResourceId",
      "operator": "==",
      "value": "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/SomeResourceGroup/providers/microsoft.insights/components/AppInsightResource"
    }
  ]
}

Sample Response

x-ms-status-location: https://management.azure.com/subscriptions/b96161de-b34a-480f-7343-59b099299283/resourceGroups/example/providers/microsoft.operationalinsights/workspaces/test/operations/purge-970318e7-b859-4edb-8903-83b1b54d0b74?api-version=2020-08-01
{
  "operationId": "7d7cf277-9113-4ab3-8359-d0364b74d01d"
}

定義

名稱 Description
WorkspacePurgeBody

描述 App Insights 工作區清除要求的本文

WorkspacePurgeBodyFilters

使用者定義的篩選條件,傳回將會從數據表中清除的數據。

WorkspacePurgeResponse

包含特定清除動作之 operationId 的回應。

WorkspacePurgeBody

描述 App Insights 工作區清除要求的本文

名稱 類型 Description
filters

WorkspacePurgeBodyFilters[]

數據行和篩選集 (查詢) 執行,以清除產生的數據。

table

string

要從中清除數據的數據表。

WorkspacePurgeBodyFilters

使用者定義的篩選條件,傳回將會從數據表中清除的數據。

名稱 類型 Description
column

string

指定查詢應該在其中執行的數據表數據行

key

string

篩選自定義維度時,此索引鍵將作為自定義維度的名稱。

operator

string

查詢運算符,可評估所提供數據行和值 () 。 支持的運算符是 ==、=~、in、in~ >、、= >、 <、=、 <between 和 在 KQL 查詢中的行為相同。

value

要用於函式的運算子值。 這可以是數位 (例如 > 100) 、字串 (timestamp >= '2017-09-01') 或值的陣列。

WorkspacePurgeResponse

包含特定清除動作之 operationId 的回應。

名稱 類型 Description
operationId

string

查詢特定清除作業狀態時要使用的識別碼。