Set-AzOperationalInsightsDataSource
更新數據源。
語法
Set-AzOperationalInsightsDataSource
[-DataSource] <PSDataSource>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Set-AzOperationalInsightsDataSource Cmdlet 會更新數據源。
範例
範例 1
$datasource = Get-AzOperationalInsightsDataSource -Kind CustomLog -ResourceGroupName testrg -WorkspaceName LogAnalyticsWorkspace
Set-AzOperationalInsightsDataSource -DataSource $datasource
Name : DataSource_CustomLog_Customlog_CL
ResourceGroupName : testrg
WorkspaceName : LogAnalyticsWorkspace
ResourceId : /subscriptions/xxxx-xxxx-xxxx-xxxx-xxxx/resourceGroups/testrg/providers/Microsoft.Ope
rationalInsights/workspaces/LogAnalyticsWorkspace/datasources/DataSource_CustomLog_Customlog_
CL
Kind : CustomLog
Properties : {"customLogName":"Customlog_CL","description":"","extractions":[{"extractionName":"TimeGenerated","
extractionProperties":{"dateTimeExtraction":{"joinStringRegex":null,"regex":null,"formatString":nul
l}},"extractionType":"DateTime"}],"inputs":[{"location":{"fileSystemLocations":{"linuxFileTypeLogPa
ths":null,"windowsFileTypeLogPaths":["D:\\logs.txt"]}},"recordDelimiter":{"regexDelimiter":{"matchI
ndex":0,"numberdGroup":null,"pattern":"\\n"}}}]}
更新數據源。
參數
-DataSource
指定這個 Cmdlet 更新的數據源。
類型: | PSDataSource |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
輸出
備註
- 關鍵詞:azure、azurerm、arm、resource、management、manager、operational、insights