Skip to main content

flow_logs

Creates, updates, deletes, gets or lists a flow_logs resource.

Overview

Nameflow_logs
TypeResource
Idazure.network.flow_logs

Fields

The following fields are returned by SELECT queries:

Request successful. The operation returns a flow log resource.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringA unique read-only string that changes whenever the resource is updated.
identityobjectFlowLog resource Managed Identity
propertiesobjectProperties of the flow log.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, networkWatcherName, flowLogName, subscriptionIdGets a flow log resource by name.
listselectresourceGroupName, networkWatcherName, subscriptionIdLists all flow log resources for the specified Network Watcher.
create_or_updateinsertresourceGroupName, networkWatcherName, flowLogName, subscriptionIdCreate or update a flow log for the specified network security group.
deletedeleteresourceGroupName, networkWatcherName, flowLogName, subscriptionIdDeletes the specified flow log resource.
update_tagsexecresourceGroupName, networkWatcherName, flowLogName, subscriptionIdUpdate tags of the specified flow log.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
flowLogNamestringThe name of the flow log.
networkWatcherNamestringThe name of the network watcher.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets a flow log resource by name.

SELECT
id,
name,
etag,
identity,
properties,
systemData,
type
FROM azure.network.flow_logs
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND networkWatcherName = '{{ networkWatcherName }}' -- required
AND flowLogName = '{{ flowLogName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create or update a flow log for the specified network security group.

INSERT INTO azure.network.flow_logs (
data__properties,
data__identity,
resourceGroupName,
networkWatcherName,
flowLogName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ resourceGroupName }}',
'{{ networkWatcherName }}',
'{{ flowLogName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
identity,
properties,
systemData,
type
;

DELETE examples

Deletes the specified flow log resource.

DELETE FROM azure.network.flow_logs
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND networkWatcherName = '{{ networkWatcherName }}' --required
AND flowLogName = '{{ flowLogName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Update tags of the specified flow log.

EXEC azure.network.flow_logs.update_tags 
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@flowLogName='{{ flowLogName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;