共用方式為


Set-AzOperationalInsightsSavedSearch

更新 已經存在的已儲存搜尋。

語法

Set-AzOperationalInsightsSavedSearch
   [-ResourceGroupName] <String>
   [-WorkspaceName] <String>
   [-SavedSearchId] <String>
   [-DisplayName] <String>
   [-Category] <String>
   [-Query] <String>
   [[-Tag] <Hashtable>]
   [[-Version] <Int64>]
   [[-ETag] <String>]
   [[-FunctionAlias] <String>]
   [[-FunctionParameter] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Set-AzOperationalInsightsSavedSearch Cmdlet 會更新已經存在的已儲存搜尋。

範例

範例 1:使用更新的屬性設定已儲存的搜尋

Set-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "Type=Event" -Version 1 -ETag "ContosoSavedSearchEtag"

此命令會使用更新的屬性來設定已儲存的搜尋。

參數

-Category

指定類別名稱。

類型:String
Position:4
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DisplayName

指定顯示名稱。

類型:String
Position:3
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ETag

指定ETag名稱。

類型:String
Position:8
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-FunctionAlias

如果查詢做為函式,則為函式別名。

類型:String
Position:9
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-FunctionParameter

如果查詢做為函式,則為選擇性函式參數。 值的格式應如下:'param-name1:type1 = default_value1,param-name2:type2 = default_value2'。 如需更多範例和適當的語法,請參閱 https://learn.microsoft.com/azure/kusto/query/functions/user-defined-functions

類型:String
別名:FunctionParameters
Position:10
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Query

指定查詢名稱。

類型:String
Position:5
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

指定資源組名。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-SavedSearchId

指定儲存的搜尋標識碼。

類型:String
Position:2
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Tag

已儲存的搜尋標籤。

類型:Hashtable
Position:6
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False

-Version

類型:Int64
Position:7
預設值:1
必要:False
接受管線輸入:True
接受萬用字元:False

-WorkspaceName

指定工作區名稱。

類型:String
別名:Name
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

String

Hashtable

Int64

輸出

PSSavedSearchValue