Components - Purge

藉由一組使用者定義的篩選,清除 Application Insights 元件中的數據。

為管理系統資源,系統會將清除要求限制為每小時 50 個要求。 您應該藉由傳送單一命令 (其述詞包含需要清除的所有使用者身分識別) 來批次處理清除要求的執行。 使用 in 運算子來指定多個身分識別。 您應該先執行查詢,再使用 進行清除要求,以確認結果是否預期。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge?api-version=2015-05-01

URI 參數

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

string

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

resourceName
path True

string

Application Insights 元件資源的名稱。

subscriptionId
path True

string

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
filters True

ComponentPurgeBodyFilters[]

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

table True

string

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

回應

名稱 類型 Description
202 Accepted

ComponentPurgeResponse

接受清除 Application Insights 元件的要求。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

Scopes

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

範例

ComponentPurge

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/OIAutoRest5123/providers/Microsoft.Insights/components/aztest5048/purge?api-version=2015-05-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.insights/components/test/operations/purge-970318e7-b859-4edb-8903-83b1b54d0b74?api-version=2015-05-01
{
  "operationId": "7d7cf277-9113-4ab3-8359-d0364b74d01d"
}

定義

名稱 Description
ComponentPurgeBody

描述 App Insights 元件的清除要求主體

ComponentPurgeBodyFilters

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

ComponentPurgeResponse

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

ComponentPurgeBody

描述 App Insights 元件的清除要求主體

名稱 類型 Description
filters

ComponentPurgeBodyFilters[]

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

table

string

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

ComponentPurgeBodyFilters

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

名稱 類型 Description
column

string

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

key

string

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

operator

string

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

value

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

ComponentPurgeResponse

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

名稱 類型 Description
operationId

string

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