Redigera

Dela via


New-AzApiManagementPipelineDiagnosticSetting

Create Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.

Syntax

New-AzApiManagementPipelineDiagnosticSetting
   [-Request <PsApiManagementHttpMessageDiagnostic>]
   [-Response <PsApiManagementHttpMessageDiagnostic>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The cmdlet New-AzApiManagementPipelineDiagnosticSetting creates the Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.

Examples

Example 1

$httpMessageDiagnostic = New-AzApiManagementHttpMessageDiagnostic -HeadersToLog 'Content-Type', 'UserAgent' -BodyBytesToLog 100
New-AzApiManagementPipelineDiagnosticSetting -Request $httpMessageDiagnostic -Response $httpMessageDiagnostic

Request                                                                                              Response
-------                                                                                              --------
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic

Create a pipeline diagnostic to be used in either FrontEnd or Backend in the Diagnostic Entity.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Request

Diagnostic setting for Request. This parameter is optional.

Type:PsApiManagementHttpMessageDiagnostic
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Response

Diagnostic setting for Response. This parameter is optional.

Type:PsApiManagementHttpMessageDiagnostic
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PsApiManagementPipelineDiagnosticSetting