你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzOperationalInsightsSavedSearch
使用指定的参数创建新的已保存搜索。
语法
New-AzOperationalInsightsSavedSearch
[-ResourceGroupName] <String>
[-WorkspaceName] <String>
[-SavedSearchId] <String>
[-DisplayName] <String>
[-Category] <String>
[-Query] <String>
[[-Tag] <Hashtable>]
[[-Version] <Int64>]
[[-FunctionAlias] <String>]
[[-FunctionParameter] <String>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
New-AzOperationalInsightsSavedSearch cmdlet 使用工作区的指定参数创建新的已保存搜索。
示例
示例 1:创建新的已保存搜索
New-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "*" -Version 1 -Force
此命令创建新的已保存的搜索。
参数
-Category
保存的搜索类别。
类型: | String |
Position: | 4 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DisplayName
保存的搜索显示名称。
类型: | String |
Position: | 3 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Force
不要要求确认。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-FunctionAlias
如果查询用作函数,则函数别名。
类型: | String |
Position: | 8 |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-FunctionParameter
如果查询用作函数,则为可选函数参数。 值应采用以下格式:“param-name1:type1 = default_value1,param-name2:type2 = default_value2”。 有关更多示例和正确的语法,请参阅 https://learn.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions。
类型: | String |
别名: | FunctionParameters |
Position: | 9 |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Query
保存的搜索查询。
类型: | String |
Position: | 5 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
资源组名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-SavedSearchId
保存的搜索 ID。
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Tag
保存的搜索标记。
类型: | Hashtable |
Position: | 6 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Version
保存的搜索版本。
类型: | Int64 |
Position: | 7 |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WorkspaceName
工作区名称。
类型: | String |
别名: | Name |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |