Network Watchers - Get Flow Log Status
Queries status of flow log and traffic analytics (optional) on a specified resource.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus?api-version=2023-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
network
|
path | True |
string |
The name of the network watcher resource. |
resource
|
path | True |
string |
The name of the network watcher resource group. |
subscription
|
path | True |
string |
The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client API version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
targetResourceId | True |
string |
The target resource where getting the flow log and traffic analytics (optional) status. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successful request for query flow log and traffic analytics (optional) status. |
|
202 Accepted |
Accepted and the operation will complete asynchronously. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Get flow log status
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/queryFlowLogStatus?api-version=2023-09-01
{
"targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1"
}
Sample Response
{
"targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1",
"properties": {
"storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1",
"enabled": true
}
}
Location: https:/management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/queryFlowLogStatus?api-version=2023-09-01
{
"targetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1",
"properties": {
"storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1",
"enabled": true
}
}
Definitions
Name | Description |
---|---|
Error |
Common error details representation. |
Error |
The error object. |
Flow |
Parameters that define the flow log format. |
Flow |
The file type of flow log. |
Flow |
Information on the configuration of flow log and traffic analytics (optional) . |
Flow |
Parameters that define a resource to query flow log and traffic analytics (optional) status. |
Retention |
Parameters that define the retention policy for flow log. |
Traffic |
Parameters that define the configuration of traffic analytics. |
Traffic |
Parameters that define the configuration of traffic analytics. |
ErrorDetails
Common error details representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message. |
target |
string |
Error target. |
ErrorResponse
The error object.
Name | Type | Description |
---|---|---|
error |
Error |
FlowLogFormatParameters
Parameters that define the flow log format.
Name | Type | Default Value | Description |
---|---|---|---|
type |
The file type of flow log. |
||
version |
integer |
0 |
The version (revision) of the flow log. |
FlowLogFormatType
The file type of flow log.
Name | Type | Description |
---|---|---|
JSON |
string |
FlowLogInformation
Information on the configuration of flow log and traffic analytics (optional) .
Name | Type | Description |
---|---|---|
flowAnalyticsConfiguration |
Parameters that define the configuration of traffic analytics. |
|
properties.enabled |
boolean |
Flag to enable/disable flow logging. |
properties.format |
Parameters that define the flow log format. |
|
properties.retentionPolicy |
Parameters that define the retention policy for flow log. |
|
properties.storageId |
string |
ID of the storage account which is used to store the flow log. |
targetResourceId |
string |
The ID of the resource to configure for flow log and traffic analytics (optional) . |
FlowLogStatusParameters
Parameters that define a resource to query flow log and traffic analytics (optional) status.
Name | Type | Description |
---|---|---|
targetResourceId |
string |
The target resource where getting the flow log and traffic analytics (optional) status. |
RetentionPolicyParameters
Parameters that define the retention policy for flow log.
Name | Type | Default Value | Description |
---|---|---|---|
days |
integer |
0 |
Number of days to retain flow log records. |
enabled |
boolean |
False |
Flag to enable/disable retention. |
TrafficAnalyticsConfigurationProperties
Parameters that define the configuration of traffic analytics.
Name | Type | Description |
---|---|---|
enabled |
boolean |
Flag to enable/disable traffic analytics. |
trafficAnalyticsInterval |
integer |
The interval in minutes which would decide how frequently TA service should do flow analytics. |
workspaceId |
string |
The resource guid of the attached workspace. |
workspaceRegion |
string |
The location of the attached workspace. |
workspaceResourceId |
string |
Resource Id of the attached workspace. |
TrafficAnalyticsProperties
Parameters that define the configuration of traffic analytics.
Name | Type | Description |
---|---|---|
networkWatcherFlowAnalyticsConfiguration |
Parameters that define the configuration of traffic analytics. |