flow_logs
Creates, updates, deletes, gets or lists a flow_logs
resource.
Overview
Name | flow_logs |
Type | Resource |
Id | azure.network.flow_logs |
Fields
- vw_flow_logs
- flow_logs
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | Resource name. |
enabled | text | field from the properties object |
enabled_filtering_criteria | text | field from the properties object |
etag | text | A unique read-only string that changes whenever the resource is updated. |
flowLogName | text | field from the properties object |
flow_analytics_configuration | text | field from the properties object |
format | text | field from the properties object |
identity | text | Identity for the resource. |
location | text | Resource location. |
networkWatcherName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
retention_policy | text | field from the properties object |
storage_id | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
target_resource_guid | text | field from the properties object |
target_resource_id | text | field from the properties object |
type | text | Resource type. |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
identity | object | Identity for the resource. |
location | string | Resource location. |
properties | object | Parameters that define the configuration of flow log. |
tags | object | Resource tags. |
type | string | Resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | flowLogName, networkWatcherName, resourceGroupName, subscriptionId | Gets a flow log resource by name. |
list | SELECT | networkWatcherName, resourceGroupName, subscriptionId | Lists all flow log resources for the specified Network Watcher. |
create_or_update | INSERT | flowLogName, networkWatcherName, resourceGroupName, subscriptionId | Create or update a flow log for the specified network security group. |
delete | DELETE | flowLogName, networkWatcherName, resourceGroupName, subscriptionId | Deletes the specified flow log resource. |
update_tags | EXEC | flowLogName, networkWatcherName, resourceGroupName, subscriptionId | Update tags of the specified flow log. |
SELECT
examples
Lists all flow log resources for the specified Network Watcher.
- vw_flow_logs
- flow_logs
SELECT
id,
name,
enabled,
enabled_filtering_criteria,
etag,
flowLogName,
flow_analytics_configuration,
format,
identity,
location,
networkWatcherName,
provisioning_state,
resourceGroupName,
retention_policy,
storage_id,
subscriptionId,
tags,
target_resource_guid,
target_resource_id,
type
FROM azure.network.vw_flow_logs
WHERE networkWatcherName = '{{ networkWatcherName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
etag,
identity,
location,
properties,
tags,
type
FROM azure.network.flow_logs
WHERE networkWatcherName = '{{ networkWatcherName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new flow_logs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.network.flow_logs (
flowLogName,
networkWatcherName,
resourceGroupName,
subscriptionId,
properties,
identity,
id,
location,
tags
)
SELECT
'{{ flowLogName }}',
'{{ networkWatcherName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ identity }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: targetResourceId
value: string
- name: targetResourceGuid
value: string
- name: storageId
value: string
- name: enabledFilteringCriteria
value: string
- name: enabled
value: boolean
- name: retentionPolicy
value:
- name: days
value: integer
- name: enabled
value: boolean
- name: format
value:
- name: type
value: string
- name: version
value: integer
- name: flowAnalyticsConfiguration
value:
- name: networkWatcherFlowAnalyticsConfiguration
value:
- name: enabled
value: boolean
- name: workspaceId
value: string
- name: workspaceRegion
value: string
- name: workspaceResourceId
value: string
- name: trafficAnalyticsInterval
value: integer
- name: provisioningState
value: []
- name: etag
value: string
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: string
- name: userAssignedIdentities
value: object
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
DELETE
example
Deletes the specified flow_logs
resource.
/*+ delete */
DELETE FROM azure.network.flow_logs
WHERE flowLogName = '{{ flowLogName }}'
AND networkWatcherName = '{{ networkWatcherName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';