Virtual Network Gateways - Start Packet Capture
Starts packet capture on virtual network gateway in the specified resource group.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture?api-version=2023-09-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the 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. |
virtual
|
path | True |
string |
The name of the virtual network gateway. |
api-version
|
query | True |
string |
Client API version. |
Request Body
Name | Type | Description |
---|---|---|
filterData |
string |
Start Packet capture parameters. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
string |
Request successful. The operation packet capture started on virtual network gateway. |
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
Start packet capture on virtual network gateway with filter |
Start packet capture on virtual network gateway without filter |
Start packet capture on virtual network gateway with filter
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/startPacketCapture?api-version=2023-09-01
{
"filterData": "{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}"
}
Sample Response
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2023-09-01
"\"{\"Status\":\"Successful\",\"Data\":null}\""
Start packet capture on virtual network gateway without filter
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/startPacketCapture?api-version=2023-09-01
Sample Response
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2023-09-01
"\"{\"Status\":\"Successful\",\"Data\":null}\""
Definitions
Name | Description |
---|---|
Error |
Common error representation. |
Error |
Common error details representation. |
Vpn |
Start packet capture parameters on virtual network gateway. |
Error
Common error representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
Error details. |
|
innerError |
string |
Inner error message. |
message |
string |
Error message. |
target |
string |
Error target. |
ErrorDetails
Common error details representation.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message. |
target |
string |
Error target. |
VpnPacketCaptureStartParameters
Start packet capture parameters on virtual network gateway.
Name | Type | Description |
---|---|---|
filterData |
string |
Start Packet capture parameters. |