Set-AzNetworkWatcherFlowLog
更新 流量記錄資源。
Syntax
Set-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-ResourceId <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-ResourceId <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-InputObject <PSFlowLogResource>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
更新 流量記錄資源。
範例
範例 1
$flowLog = Get-AzNetworkWatcherFlowLog -Location eastus -Name pstest
$flowLog.Enabled = $true
$flowLog.Format.Version = 2
$flowLog | Set-AzNetworkWatcherFlowLog -Force
Name : pstest
Id : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/NetworkWatcherRG/provid
ers/Microsoft.Network/networkWatchers/NetworkWatcher_eastus/FlowLogs/pstest
Etag : W/"e939e1e6-1509-4d7a-9e89-1ea532f6f222"
ProvisioningState : Succeeded
Location : eastus
TargetResourceId : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/MyFlowLog/provide
rs/Microsoft.Network/networkSecurityGroups/MyNSG
StorageId : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/FlowLogsV2Demo/provider
s/Microsoft.Storage/storageAccounts/MyStorage
Enabled : True
RetentionPolicy : {
"Days": 0,
"Enabled": false
}
Format : {
"Type": "JSON",
"Version": 2
}
FlowAnalyticsConfiguration : {}
範例 2
更新 流量記錄資源。 ( 自動產生 )
Set-AzNetworkWatcherFlowLog -Enabled $true -Name 'cert01' -NetworkWatcherName nw1 -ResourceGroupName myresourcegroup -StorageId /subscriptions/00000000-0000-0000-0000-00000000000000000/resourceGroups/FlowLogsV2Demo/providers/Microsoft.Storage/storageAccounts/MyStorage -TargetResourceId <String>
參數
-Confirm
執行 Cmdlet 之前先提示您確認。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Enabled
啟用/停用流量記錄的旗標。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableRetention
啟用/停用保留的旗標。
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableTrafficAnalytics
啟用/停用 TrafficAnalytics 的旗標
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
如果您想要覆寫資源,請勿要求確認
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FormatType
流量記錄檔的文件類型。 目前唯一支援的值是 『JSON』。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FormatVersion
流程記錄的版本(修訂)。
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Flow lof 物件。
Type: | PSFlowLogResource |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
網路監看員的位置。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
流程記錄檔名稱。
Type: | String |
Aliases: | FlowLogName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkWatcher
網路監看員資源。
Type: | PSNetworkWatcher |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NetworkWatcherName
網路監看員的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
網路監看員資源群組的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
FlowLog 資源標識碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RetentionPolicyDays
保留流量記錄檔記錄的天數。
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageId
用來儲存流量記錄的記憶體帳戶標識碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
表示資源標記的哈希表。
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetResourceId
將套用流量記錄的網路安全組標識碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrafficAnalyticsInterval
以分鐘為單位的間隔,決定TA服務應該執行流程分析的頻率。
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrafficAnalyticsWorkspaceId
附加工作區的資源標識碼。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸入
輸出
相關連結
- New-AzNetworkWatcher
- Get-AzNetworkWatcher
- Remove-AzNetworkWatcher
- Get-AzNetworkWatcherNextHop
- Get-AzNetworkWatcherSecurityGroupView
- Get-AzNetworkWatcherTopology
- Start-AzNetworkWatcherResourceTroubleshooting
- New-AzNetworkWatcherPacketCapture
- New-AzPacketCaptureFilterConfig
- Get-AzNetworkWatcherPacketCapture
- Remove-AzNetworkWatcherPacketCapture
- Stop-AzNetworkWatcherPacketCapture
- New-AzNetworkWatcherProtocolConfiguration
- Test-AzNetworkWatcherIPFlow
- Test-AzNetworkWatcher 連線 ivity
- Stop-AzNetworkWatcher 連線 ionMonitor
- Start-AzNetworkWatcher 連線 ionMonitor
- Set-AzNetworkWatcher 連線 ionMonitor
- Set-AzNetworkWatcherConfigFlowLog
- Remove-AzNetworkWatcher 連線 ionMonitor
- New-AzNetworkWatcher 連線 ionMonitor
- Get-AzNetworkWatcherTroubleshootingResult
- Get-AzNetworkWatcherReachabilityReport
- Get-AzNetworkWatcherReachabilityProvidersList
- Get-AzNetworkWatcherFlowLogStatus
- Get-AzNetworkWatcher 連線 ionMonitorReport
- Get-AzNetworkWatcher 連線 ionMonitor
- New-AzNetworkWatcherFlowLog
- Get-AzNetworkWatcherFlowLog
- Remove-AzNetworkWatcherFlowLog
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應