Skip to main content

packet_captures

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

Overview

Namepacket_captures
TypeResource
Idazure.network.packet_captures

Fields

The following fields are returned by SELECT queries:

Request successful. The operation returns a packet capture session.

NameDatatypeDescription
idstringID of the packet capture operation.
namestringName of the packet capture session.
etagstringA unique read-only string that changes whenever the resource is updated.
propertiesobjectProperties of the packet capture result.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, networkWatcherName, packetCaptureName, subscriptionIdGets a packet capture session by name.
listselectresourceGroupName, networkWatcherName, subscriptionIdLists all packet capture sessions within the specified resource group.
createinsertresourceGroupName, networkWatcherName, packetCaptureName, subscriptionId, data__propertiesCreate and start a packet capture on the specified VM.
deletedeleteresourceGroupName, networkWatcherName, packetCaptureName, subscriptionIdDeletes the specified packet capture session.
stopexecresourceGroupName, networkWatcherName, packetCaptureName, subscriptionIdStops a specified packet capture session.

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
networkWatcherNamestringThe name of the network watcher.
packetCaptureNamestringThe name of the packet capture session.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets a packet capture session by name.

SELECT
id,
name,
etag,
properties
FROM azure.network.packet_captures
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND networkWatcherName = '{{ networkWatcherName }}' -- required
AND packetCaptureName = '{{ packetCaptureName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create and start a packet capture on the specified VM.

INSERT INTO azure.network.packet_captures (
data__properties,
resourceGroupName,
networkWatcherName,
packetCaptureName,
subscriptionId
)
SELECT
'{{ properties }}' /* required */,
'{{ resourceGroupName }}',
'{{ networkWatcherName }}',
'{{ packetCaptureName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
properties
;

DELETE examples

Deletes the specified packet capture session.

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

Lifecycle Methods

Stops a specified packet capture session.

EXEC azure.network.packet_captures.stop 
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@packetCaptureName='{{ packetCaptureName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;