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

PS c:\> $httpMessageDiagnostic = New-AzApiManagementHttpMessageDiagnostic -Headers 'Content-Type', 'UserAgent' -BodyBytes 100
PS c:\> 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:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Request

Diagnostic setting for Request. This parameter is optional.

Type:Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Response

Diagnostic setting for Response. This parameter is optional.

Type:Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementHttpMessageDiagnostic
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementPipelineDiagnosticSetting