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

NameDatatypeDescription
idtextID of the packet capture operation.
nametextName of the packet capture session.
bytes_to_capture_per_packettextfield from the properties object
capture_settingstextfield from the properties object
continuous_capturetextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
filterstextfield from the properties object
networkWatcherNametextfield from the properties object
packetCaptureNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
scopetextfield from the properties object
storage_locationtextfield from the properties object
subscriptionIdtextfield from the properties object
targettextfield from the properties object
target_typetextfield from the properties object
time_limit_in_secondstextfield from the properties object
total_bytes_per_sessiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTnetworkWatcherName, packetCaptureName, resourceGroupName, subscriptionIdGets a packet capture session by name.
listSELECTnetworkWatcherName, resourceGroupName, subscriptionIdLists all packet capture sessions within the specified resource group.
createINSERTnetworkWatcherName, packetCaptureName, resourceGroupName, subscriptionId, data__propertiesCreate and start a packet capture on the specified VM.
deleteDELETEnetworkWatcherName, packetCaptureName, resourceGroupName, subscriptionIdDeletes the specified packet capture session.
stopEXECnetworkWatcherName, packetCaptureName, resourceGroupName, subscriptionIdStops a specified packet capture session.

SELECT examples

Lists all packet capture sessions within the specified resource group.

SELECT
id,
name,
bytes_to_capture_per_packet,
capture_settings,
continuous_capture,
etag,
filters,
networkWatcherName,
packetCaptureName,
provisioning_state,
resourceGroupName,
scope,
storage_location,
subscriptionId,
target,
target_type,
time_limit_in_seconds,
total_bytes_per_session
FROM azure.network.vw_packet_captures
WHERE networkWatcherName = '{{ networkWatcherName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new packet_captures resource.

/*+ create */
INSERT INTO azure.network.packet_captures (
networkWatcherName,
packetCaptureName,
resourceGroupName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ networkWatcherName }}',
'{{ packetCaptureName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

DELETE example

Deletes the specified packet_captures resource.

/*+ delete */
DELETE FROM azure.network.packet_captures
WHERE networkWatcherName = '{{ networkWatcherName }}'
AND packetCaptureName = '{{ packetCaptureName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';