你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzOperationalInsightsDataSource
Updates a data source.
Syntax
Set-AzOperationalInsightsDataSource
[-DataSource] <PSDataSource>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzOperationalInsightsDataSource cmdlet updates a data source.
Examples
Example 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"}}}]}
Update a data source.
Parameters
-DataSource
Specifies the data source that this cmdlet updates.
Type: | PSDataSource |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Notes
- Keywords: azure, azurerm, arm, resource, management, manager, operational, insights