Udostępnij za pośrednictwem


Start or Stop Gateway Diagnostics Capture

 

The Start or Stop Gateway Diagnostics Capture operation starts or stops the capture of diagnostics data for the VPN gateway. When you use this operation to start the capture of diagnostics data, the netsh wfp capture command is run, which collects the Internet Key Exchange logs in the specified storage account. The collected data is accessible from a compressed file through a URL to a storage account.

Request

The Start or Stop Gateway Diagnostics Capture request may be specified as follows. Replace <subscription-id> with the subscription ID and <virtual-network-name> with the name of the virtual network associated with the virtual network gateway.

Method

Request URI

PUT

https://management.core.windows.net/<subscription-id>/services/networking/<virtual-network-name>/gateway/publicdiagnostics

URI Parameters

None.

Request Headers

The following table describes the request headers.

Request Header

Description

x-ms-version

Required. Specifies the version of the operation to use for this request. The value for this header should be set to 2012-03-01 or higher.

Request Body

The format of the request body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<UpdateGatewayPublicDiagnostics>
  <Operation>capture-diagnostics-indicator</Operation>
  <CustomerStorageName>name-of-storage-account</CustomerStorageName>
  <CustomerStorageKey>storage-account-key</CustomerStorageKey>
  <ContainerName>name-of-container</ContainerName>
  <CaptureDurationInSeconds>duration-of-capture</CaptureDurationInSeconds>
</UpdateGatewayPublicDiagnostics>

The following table describes the elements in the request body.

Request Element

Description

Operation

Required. Indicates whether to start or stop the capture of diagnostics data.

Possible values are:

  • StartDiagnostics

  • StopDiagnostics

When you specify the StopDiagnostics value, you must provide values for the required elements in the request, but those values are ignored.

CustomerStorageName

Required. Specifies the name of the storage account where the captured diagnostics data is to be stored.

CustomerStorageKey

Required. Specifies the key of the storage account that is specified in the CustomerStorageName element.

ContainerName

Optional. Specifies the name of the container in the storage account where the captured diagnostics data is stored. If this element is not provided, a default container named gatewaypublicdiagnostics is used.

CaptureDurationInSeconds

Required. Specifies the duration in seconds to perform the diagnostics capture. Possible values are between 1 and 300. The default value is 300.

Response

The response includes an HTTP status code, a response body, and a set of response headers.

Status Code

A successful operation returns status code 200 (OK).

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers.

Response Header

Description

x-ms-request-id

A value that uniquely identifies a request made against the management service.

Response Body

The format of the response body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<GatewayOperationAsyncResponse>
  <ID>operation-id</ID>
</GatewayOperationAsyncResponse>

The following table describes the elements in the response body.

Response Element

Description

ID

Specifies the request identifier that can be used to obtain the status of the operation. You can use this identifier with the Get Virtual Network Gateway Operation Status operation to get the status information.