New-AzApiManagementPipelineDiagnosticSetting
Create Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
Syntax
Default (Default)
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.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Request
Diagnostic setting for Request. This parameter is optional.
Parameter properties
Type: | PsApiManagementHttpMessageDiagnostic |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Response
Diagnostic setting for Response. This parameter is optional.
Parameter properties
Type: | PsApiManagementHttpMessageDiagnostic |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.