Set-AzNetworkWatcherFlowLog
更新流程記錄資源。
語法
Set-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <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>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <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>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-ResourceId <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-ResourceId <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-InputObject <PSFlowLogResource>
[-UserAssignedIdentityId <String>]
[-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 之前先提示您確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Enabled
啟用/停用流量記錄的旗標。
類型: | Boolean |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-EnabledFilteringCriteria
篩選網路流量記錄的選擇性欄位。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EnableRetention
啟用/停用保留的旗標。
類型: | Nullable<T>[Boolean] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-EnableTrafficAnalytics
啟用/停用 TrafficAnalytics 的旗標
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Force
如果您想要覆寫資源,請勿要求確認
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-FormatType
流量記錄檔的文件類型。 目前唯一支援的值是 『JSON』。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-FormatVersion
流程記錄的版本(修訂)。
類型: | Nullable<T>[Int32] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Flow lof 物件。
類型: | PSFlowLogResource |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Location
網路監看員的位置。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
流程記錄檔名稱。
類型: | String |
別名: | FlowLogName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NetworkWatcher
網路監看員資源。
類型: | PSNetworkWatcher |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-NetworkWatcherName
網路監看員的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
網路監看員資源群組的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceId
FlowLog 資源標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-RetentionPolicyDays
保留流量記錄檔記錄的天數。
類型: | Nullable<T>[Int32] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-StorageId
用來儲存流量記錄的記憶體帳戶標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Tag
表示資源標記的哈希表。
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-TargetResourceId
將套用流量記錄的網路安全組標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-TrafficAnalyticsInterval
以分鐘為單位的間隔,決定TA服務應該執行流程分析的頻率。
類型: | Nullable<T>[Int32] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-TrafficAnalyticsWorkspaceId
附加工作區的資源標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-UserAssignedIdentityId
要指派給 Flowlog 之使用者指派身分識別的 ResourceId。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | 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-AzNetworkWatcherConnectivity
- Stop-AzNetworkWatcherConnectionMonitor
- Start-AzNetworkWatcherConnectionMonitor
- Set-AzNetworkWatcherConnectionMonitor
- Set-AzNetworkWatcherConfigFlowLog
- Remove-AzNetworkWatcherConnectionMonitor
- New-AzNetworkWatcherConnectionMonitor
- Get-AzNetworkWatcherTroubleshootingResult
- Get-AzNetworkWatcherReachabilityReport
- Get-AzNetworkWatcherReachabilityProvidersList
- Get-AzNetworkWatcherFlowLogStatus
- Get-AzNetworkWatcherConnectionMonitorReport
- Get-AzNetworkWatcherConnectionMonitor
- New-AzNetworkWatcherFlowLog
- Get-AzNetworkWatcherFlowLog
- Remove-AzNetworkWatcherFlowLog