Query Packs - Create Or Update
) Log Analytics QueryPack 建立 (或更新。 注意:您無法在 Put 作業中為 InstrumentationKey 或 AppId 指定不同的值。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}?api-version=2019-09-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
query
|
path | True |
string |
Log Analytics QueryPack 資源的名稱。 |
resource
|
path | True |
string |
資源群組的名稱。 名稱不區分大小寫。 |
subscription
|
path | True |
string |
目標訂用帳戶的標識碼。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
location | True |
string |
資源位置 |
tags |
object |
資源標籤 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
建立或更新Log Analytics QueryPack時成功要求。 會傳回更新的QueryPack。 |
|
Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
Query |
Query |
QueryPackCreate
範例要求
PUT https://management.azure.com/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/queryPacks/my-querypack?api-version=2019-09-01
{
"location": "South Central US",
"properties": {}
}
範例回覆
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack",
"name": "my-querypack",
"type": "microsoft.operationalinsights/querypacks",
"location": "South Central US",
"tags": {},
"properties": {
"queryPackId": "d1c8fc00-2b68-441e-8f9b-ded8748dc635",
"timeCreated": "2019-08-04T12:37:56.8543652Z",
"timeModified": "2019-08-04T12:37:56.8543652Z",
"provisioningState": "Succeeded"
}
}
QueryPackUpdate
範例要求
PUT https://management.azure.com/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/queryPacks/my-querypack?api-version=2019-09-01
{
"location": "South Central US",
"tags": {
"Tag1": "Value1"
},
"properties": {}
}
範例回覆
{
"id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack",
"name": "my-querypack",
"type": "microsoft.operationalinsights/querypacks",
"location": "South Central US",
"tags": {
"Tag1": "Value1"
},
"properties": {
"queryPackId": "aac8fc00-2b68-441e-8f9b-ded8748dc635",
"timeCreated": "2019-06-04T12:37:56.8543652Z",
"timeModified": "2019-08-04T12:37:56.8543652Z",
"provisioningState": "Succeeded"
}
}
定義
名稱 | Description |
---|---|
Error |
資源管理錯誤其他資訊。 |
Error |
錯誤詳細數據。 |
Error |
錯誤回應 |
Log |
Log Analytics QueryPack 定義。 |
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 | 類型 | Description |
---|---|---|
info |
object |
其他資訊。 |
type |
string |
其他信息類型。 |
ErrorDetail
錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
additionalInfo |
錯誤其他資訊。 |
|
code |
string |
錯誤碼。 |
details |
錯誤詳細資料。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
ErrorResponse
錯誤回應
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
LogAnalyticsQueryPack
Log Analytics QueryPack 定義。
名稱 | 類型 | Description |
---|---|---|
id |
string |
Azure 資源標識碼 |
location |
string |
資源位置 |
name |
string |
Azure 資源名稱 |
properties.provisioningState |
string |
此 QueryPack 的目前狀態:是否已在已定義的資源群組內布建。 使用者無法變更此值,但能夠從中讀取。 值包括 [成功]、[部署]、[已取消] 和 [失敗]。 |
properties.queryPackId |
string |
應用程式的唯一標識碼。 無法變更此欄位。 |
properties.timeCreated |
string |
Log Analytics QueryPack 的建立日期,格式為 ISO 8601。 |
properties.timeModified |
string |
Log Analytics QueryPack 的上次修改日期,格式為 ISO 8601。 |
tags |
object |
資源標籤 |
type |
string |
Azure 資源類型 |