1. Packages
  2. Azure Classic
  3. API Docs
  4. apimanagement
  5. Diagnostic

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an API Management Service Diagnostic.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleInsights = new Azure.AppInsights.Insights("exampleInsights", new Azure.AppInsights.InsightsArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                ApplicationType = "web",
            });
            var exampleService = new Azure.ApiManagement.Service("exampleService", new Azure.ApiManagement.ServiceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                PublisherName = "My Company",
                PublisherEmail = "company@mycompany.io",
                SkuName = "Developer_1",
            });
            var exampleLogger = new Azure.ApiManagement.Logger("exampleLogger", new Azure.ApiManagement.LoggerArgs
            {
                ApiManagementName = exampleService.Name,
                ResourceGroupName = exampleResourceGroup.Name,
                ApplicationInsights = new Azure.ApiManagement.Inputs.LoggerApplicationInsightsArgs
                {
                    InstrumentationKey = exampleInsights.InstrumentationKey,
                },
            });
            var exampleDiagnostic = new Azure.ApiManagement.Diagnostic("exampleDiagnostic", new Azure.ApiManagement.DiagnosticArgs
            {
                Identifier = "applicationinsights",
                ResourceGroupName = exampleResourceGroup.Name,
                ApiManagementName = exampleService.Name,
                ApiManagementLoggerId = exampleLogger.Id,
                SamplingPercentage = 5,
                AlwaysLogErrors = true,
                LogClientIp = true,
                Verbosity = "verbose",
                HttpCorrelationProtocol = "W3C",
                FrontendRequest = new Azure.ApiManagement.Inputs.DiagnosticFrontendRequestArgs
                {
                    BodyBytes = 32,
                    HeadersToLogs = 
                    {
                        "content-type",
                        "accept",
                        "origin",
                    },
                },
                FrontendResponse = new Azure.ApiManagement.Inputs.DiagnosticFrontendResponseArgs
                {
                    BodyBytes = 32,
                    HeadersToLogs = 
                    {
                        "content-type",
                        "content-length",
                        "origin",
                    },
                },
                BackendRequest = new Azure.ApiManagement.Inputs.DiagnosticBackendRequestArgs
                {
                    BodyBytes = 32,
                    HeadersToLogs = 
                    {
                        "content-type",
                        "accept",
                        "origin",
                    },
                },
                BackendResponse = new Azure.ApiManagement.Inputs.DiagnosticBackendResponseArgs
                {
                    BodyBytes = 32,
                    HeadersToLogs = 
                    {
                        "content-type",
                        "content-length",
                        "origin",
                    },
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/apimanagement"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/appinsights"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInsights, err := appinsights.NewInsights(ctx, "exampleInsights", &appinsights.InsightsArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			ApplicationType:   pulumi.String("web"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleService, err := apimanagement.NewService(ctx, "exampleService", &apimanagement.ServiceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			PublisherName:     pulumi.String("My Company"),
    			PublisherEmail:    pulumi.String("company@mycompany.io"),
    			SkuName:           pulumi.String("Developer_1"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLogger, err := apimanagement.NewLogger(ctx, "exampleLogger", &apimanagement.LoggerArgs{
    			ApiManagementName: exampleService.Name,
    			ResourceGroupName: exampleResourceGroup.Name,
    			ApplicationInsights: &apimanagement.LoggerApplicationInsightsArgs{
    				InstrumentationKey: exampleInsights.InstrumentationKey,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apimanagement.NewDiagnostic(ctx, "exampleDiagnostic", &apimanagement.DiagnosticArgs{
    			Identifier:              pulumi.String("applicationinsights"),
    			ResourceGroupName:       exampleResourceGroup.Name,
    			ApiManagementName:       exampleService.Name,
    			ApiManagementLoggerId:   exampleLogger.ID(),
    			SamplingPercentage:      pulumi.Float64(5),
    			AlwaysLogErrors:         pulumi.Bool(true),
    			LogClientIp:             pulumi.Bool(true),
    			Verbosity:               pulumi.String("verbose"),
    			HttpCorrelationProtocol: pulumi.String("W3C"),
    			FrontendRequest: &apimanagement.DiagnosticFrontendRequestArgs{
    				BodyBytes: pulumi.Int(32),
    				HeadersToLogs: pulumi.StringArray{
    					pulumi.String("content-type"),
    					pulumi.String("accept"),
    					pulumi.String("origin"),
    				},
    			},
    			FrontendResponse: &apimanagement.DiagnosticFrontendResponseArgs{
    				BodyBytes: pulumi.Int(32),
    				HeadersToLogs: pulumi.StringArray{
    					pulumi.String("content-type"),
    					pulumi.String("content-length"),
    					pulumi.String("origin"),
    				},
    			},
    			BackendRequest: &apimanagement.DiagnosticBackendRequestArgs{
    				BodyBytes: pulumi.Int(32),
    				HeadersToLogs: pulumi.StringArray{
    					pulumi.String("content-type"),
    					pulumi.String("accept"),
    					pulumi.String("origin"),
    				},
    			},
    			BackendResponse: &apimanagement.DiagnosticBackendResponseArgs{
    				BodyBytes: pulumi.Int(32),
    				HeadersToLogs: pulumi.StringArray{
    					pulumi.String("content-type"),
    					pulumi.String("content-length"),
    					pulumi.String("origin"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleInsights = new azure.appinsights.Insights("exampleInsights", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        applicationType: "web",
    });
    const exampleService = new azure.apimanagement.Service("exampleService", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        publisherName: "My Company",
        publisherEmail: "company@mycompany.io",
        skuName: "Developer_1",
    });
    const exampleLogger = new azure.apimanagement.Logger("exampleLogger", {
        apiManagementName: exampleService.name,
        resourceGroupName: exampleResourceGroup.name,
        applicationInsights: {
            instrumentationKey: exampleInsights.instrumentationKey,
        },
    });
    const exampleDiagnostic = new azure.apimanagement.Diagnostic("exampleDiagnostic", {
        identifier: "applicationinsights",
        resourceGroupName: exampleResourceGroup.name,
        apiManagementName: exampleService.name,
        apiManagementLoggerId: exampleLogger.id,
        samplingPercentage: 5,
        alwaysLogErrors: true,
        logClientIp: true,
        verbosity: "verbose",
        httpCorrelationProtocol: "W3C",
        frontendRequest: {
            bodyBytes: 32,
            headersToLogs: [
                "content-type",
                "accept",
                "origin",
            ],
        },
        frontendResponse: {
            bodyBytes: 32,
            headersToLogs: [
                "content-type",
                "content-length",
                "origin",
            ],
        },
        backendRequest: {
            bodyBytes: 32,
            headersToLogs: [
                "content-type",
                "accept",
                "origin",
            ],
        },
        backendResponse: {
            bodyBytes: 32,
            headersToLogs: [
                "content-type",
                "content-length",
                "origin",
            ],
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_insights = azure.appinsights.Insights("exampleInsights",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        application_type="web")
    example_service = azure.apimanagement.Service("exampleService",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        publisher_name="My Company",
        publisher_email="company@mycompany.io",
        sku_name="Developer_1")
    example_logger = azure.apimanagement.Logger("exampleLogger",
        api_management_name=example_service.name,
        resource_group_name=example_resource_group.name,
        application_insights=azure.apimanagement.LoggerApplicationInsightsArgs(
            instrumentation_key=example_insights.instrumentation_key,
        ))
    example_diagnostic = azure.apimanagement.Diagnostic("exampleDiagnostic",
        identifier="applicationinsights",
        resource_group_name=example_resource_group.name,
        api_management_name=example_service.name,
        api_management_logger_id=example_logger.id,
        sampling_percentage=5,
        always_log_errors=True,
        log_client_ip=True,
        verbosity="verbose",
        http_correlation_protocol="W3C",
        frontend_request=azure.apimanagement.DiagnosticFrontendRequestArgs(
            body_bytes=32,
            headers_to_logs=[
                "content-type",
                "accept",
                "origin",
            ],
        ),
        frontend_response=azure.apimanagement.DiagnosticFrontendResponseArgs(
            body_bytes=32,
            headers_to_logs=[
                "content-type",
                "content-length",
                "origin",
            ],
        ),
        backend_request=azure.apimanagement.DiagnosticBackendRequestArgs(
            body_bytes=32,
            headers_to_logs=[
                "content-type",
                "accept",
                "origin",
            ],
        ),
        backend_response=azure.apimanagement.DiagnosticBackendResponseArgs(
            body_bytes=32,
            headers_to_logs=[
                "content-type",
                "content-length",
                "origin",
            ],
        ))
    

    Example coming soon!

    Create Diagnostic Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Diagnostic(name: string, args: DiagnosticArgs, opts?: CustomResourceOptions);
    @overload
    def Diagnostic(resource_name: str,
                   args: DiagnosticArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Diagnostic(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   identifier: Optional[str] = None,
                   api_management_logger_id: Optional[str] = None,
                   api_management_name: Optional[str] = None,
                   resource_group_name: Optional[str] = None,
                   backend_request: Optional[DiagnosticBackendRequestArgs] = None,
                   enabled: Optional[bool] = None,
                   frontend_request: Optional[DiagnosticFrontendRequestArgs] = None,
                   frontend_response: Optional[DiagnosticFrontendResponseArgs] = None,
                   http_correlation_protocol: Optional[str] = None,
                   backend_response: Optional[DiagnosticBackendResponseArgs] = None,
                   log_client_ip: Optional[bool] = None,
                   operation_name_format: Optional[str] = None,
                   always_log_errors: Optional[bool] = None,
                   sampling_percentage: Optional[float] = None,
                   verbosity: Optional[str] = None)
    func NewDiagnostic(ctx *Context, name string, args DiagnosticArgs, opts ...ResourceOption) (*Diagnostic, error)
    public Diagnostic(string name, DiagnosticArgs args, CustomResourceOptions? opts = null)
    public Diagnostic(String name, DiagnosticArgs args)
    public Diagnostic(String name, DiagnosticArgs args, CustomResourceOptions options)
    
    type: azure:apimanagement:Diagnostic
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DiagnosticArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DiagnosticArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DiagnosticArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DiagnosticArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DiagnosticArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var diagnosticResource = new Azure.ApiManagement.Diagnostic("diagnosticResource", new()
    {
        Identifier = "string",
        ApiManagementLoggerId = "string",
        ApiManagementName = "string",
        ResourceGroupName = "string",
        BackendRequest = new Azure.ApiManagement.Inputs.DiagnosticBackendRequestArgs
        {
            BodyBytes = 0,
            DataMasking = new Azure.ApiManagement.Inputs.DiagnosticBackendRequestDataMaskingArgs
            {
                Headers = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticBackendRequestDataMaskingHeaderArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
                QueryParams = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticBackendRequestDataMaskingQueryParamArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
            },
            HeadersToLogs = new[]
            {
                "string",
            },
        },
        FrontendRequest = new Azure.ApiManagement.Inputs.DiagnosticFrontendRequestArgs
        {
            BodyBytes = 0,
            DataMasking = new Azure.ApiManagement.Inputs.DiagnosticFrontendRequestDataMaskingArgs
            {
                Headers = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticFrontendRequestDataMaskingHeaderArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
                QueryParams = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticFrontendRequestDataMaskingQueryParamArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
            },
            HeadersToLogs = new[]
            {
                "string",
            },
        },
        FrontendResponse = new Azure.ApiManagement.Inputs.DiagnosticFrontendResponseArgs
        {
            BodyBytes = 0,
            DataMasking = new Azure.ApiManagement.Inputs.DiagnosticFrontendResponseDataMaskingArgs
            {
                Headers = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticFrontendResponseDataMaskingHeaderArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
                QueryParams = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticFrontendResponseDataMaskingQueryParamArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
            },
            HeadersToLogs = new[]
            {
                "string",
            },
        },
        HttpCorrelationProtocol = "string",
        BackendResponse = new Azure.ApiManagement.Inputs.DiagnosticBackendResponseArgs
        {
            BodyBytes = 0,
            DataMasking = new Azure.ApiManagement.Inputs.DiagnosticBackendResponseDataMaskingArgs
            {
                Headers = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticBackendResponseDataMaskingHeaderArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
                QueryParams = new[]
                {
                    new Azure.ApiManagement.Inputs.DiagnosticBackendResponseDataMaskingQueryParamArgs
                    {
                        Mode = "string",
                        Value = "string",
                    },
                },
            },
            HeadersToLogs = new[]
            {
                "string",
            },
        },
        LogClientIp = false,
        OperationNameFormat = "string",
        AlwaysLogErrors = false,
        SamplingPercentage = 0,
        Verbosity = "string",
    });
    
    example, err := apimanagement.NewDiagnostic(ctx, "diagnosticResource", &apimanagement.DiagnosticArgs{
    	Identifier:            pulumi.String("string"),
    	ApiManagementLoggerId: pulumi.String("string"),
    	ApiManagementName:     pulumi.String("string"),
    	ResourceGroupName:     pulumi.String("string"),
    	BackendRequest: &apimanagement.DiagnosticBackendRequestArgs{
    		BodyBytes: pulumi.Int(0),
    		DataMasking: &apimanagement.DiagnosticBackendRequestDataMaskingArgs{
    			Headers: apimanagement.DiagnosticBackendRequestDataMaskingHeaderArray{
    				&apimanagement.DiagnosticBackendRequestDataMaskingHeaderArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			QueryParams: apimanagement.DiagnosticBackendRequestDataMaskingQueryParamArray{
    				&apimanagement.DiagnosticBackendRequestDataMaskingQueryParamArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    		},
    		HeadersToLogs: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	FrontendRequest: &apimanagement.DiagnosticFrontendRequestArgs{
    		BodyBytes: pulumi.Int(0),
    		DataMasking: &apimanagement.DiagnosticFrontendRequestDataMaskingArgs{
    			Headers: apimanagement.DiagnosticFrontendRequestDataMaskingHeaderArray{
    				&apimanagement.DiagnosticFrontendRequestDataMaskingHeaderArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			QueryParams: apimanagement.DiagnosticFrontendRequestDataMaskingQueryParamArray{
    				&apimanagement.DiagnosticFrontendRequestDataMaskingQueryParamArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    		},
    		HeadersToLogs: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	FrontendResponse: &apimanagement.DiagnosticFrontendResponseArgs{
    		BodyBytes: pulumi.Int(0),
    		DataMasking: &apimanagement.DiagnosticFrontendResponseDataMaskingArgs{
    			Headers: apimanagement.DiagnosticFrontendResponseDataMaskingHeaderArray{
    				&apimanagement.DiagnosticFrontendResponseDataMaskingHeaderArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			QueryParams: apimanagement.DiagnosticFrontendResponseDataMaskingQueryParamArray{
    				&apimanagement.DiagnosticFrontendResponseDataMaskingQueryParamArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    		},
    		HeadersToLogs: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	HttpCorrelationProtocol: pulumi.String("string"),
    	BackendResponse: &apimanagement.DiagnosticBackendResponseArgs{
    		BodyBytes: pulumi.Int(0),
    		DataMasking: &apimanagement.DiagnosticBackendResponseDataMaskingArgs{
    			Headers: apimanagement.DiagnosticBackendResponseDataMaskingHeaderArray{
    				&apimanagement.DiagnosticBackendResponseDataMaskingHeaderArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			QueryParams: apimanagement.DiagnosticBackendResponseDataMaskingQueryParamArray{
    				&apimanagement.DiagnosticBackendResponseDataMaskingQueryParamArgs{
    					Mode:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    		},
    		HeadersToLogs: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	LogClientIp:         pulumi.Bool(false),
    	OperationNameFormat: pulumi.String("string"),
    	AlwaysLogErrors:     pulumi.Bool(false),
    	SamplingPercentage:  pulumi.Float64(0),
    	Verbosity:           pulumi.String("string"),
    })
    
    var diagnosticResource = new Diagnostic("diagnosticResource", DiagnosticArgs.builder()
        .identifier("string")
        .apiManagementLoggerId("string")
        .apiManagementName("string")
        .resourceGroupName("string")
        .backendRequest(DiagnosticBackendRequestArgs.builder()
            .bodyBytes(0)
            .dataMasking(DiagnosticBackendRequestDataMaskingArgs.builder()
                .headers(DiagnosticBackendRequestDataMaskingHeaderArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .queryParams(DiagnosticBackendRequestDataMaskingQueryParamArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .build())
            .headersToLogs("string")
            .build())
        .frontendRequest(DiagnosticFrontendRequestArgs.builder()
            .bodyBytes(0)
            .dataMasking(DiagnosticFrontendRequestDataMaskingArgs.builder()
                .headers(DiagnosticFrontendRequestDataMaskingHeaderArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .queryParams(DiagnosticFrontendRequestDataMaskingQueryParamArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .build())
            .headersToLogs("string")
            .build())
        .frontendResponse(DiagnosticFrontendResponseArgs.builder()
            .bodyBytes(0)
            .dataMasking(DiagnosticFrontendResponseDataMaskingArgs.builder()
                .headers(DiagnosticFrontendResponseDataMaskingHeaderArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .queryParams(DiagnosticFrontendResponseDataMaskingQueryParamArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .build())
            .headersToLogs("string")
            .build())
        .httpCorrelationProtocol("string")
        .backendResponse(DiagnosticBackendResponseArgs.builder()
            .bodyBytes(0)
            .dataMasking(DiagnosticBackendResponseDataMaskingArgs.builder()
                .headers(DiagnosticBackendResponseDataMaskingHeaderArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .queryParams(DiagnosticBackendResponseDataMaskingQueryParamArgs.builder()
                    .mode("string")
                    .value("string")
                    .build())
                .build())
            .headersToLogs("string")
            .build())
        .logClientIp(false)
        .operationNameFormat("string")
        .alwaysLogErrors(false)
        .samplingPercentage(0.0)
        .verbosity("string")
        .build());
    
    diagnostic_resource = azure.apimanagement.Diagnostic("diagnosticResource",
        identifier="string",
        api_management_logger_id="string",
        api_management_name="string",
        resource_group_name="string",
        backend_request={
            "body_bytes": 0,
            "data_masking": {
                "headers": [{
                    "mode": "string",
                    "value": "string",
                }],
                "query_params": [{
                    "mode": "string",
                    "value": "string",
                }],
            },
            "headers_to_logs": ["string"],
        },
        frontend_request={
            "body_bytes": 0,
            "data_masking": {
                "headers": [{
                    "mode": "string",
                    "value": "string",
                }],
                "query_params": [{
                    "mode": "string",
                    "value": "string",
                }],
            },
            "headers_to_logs": ["string"],
        },
        frontend_response={
            "body_bytes": 0,
            "data_masking": {
                "headers": [{
                    "mode": "string",
                    "value": "string",
                }],
                "query_params": [{
                    "mode": "string",
                    "value": "string",
                }],
            },
            "headers_to_logs": ["string"],
        },
        http_correlation_protocol="string",
        backend_response={
            "body_bytes": 0,
            "data_masking": {
                "headers": [{
                    "mode": "string",
                    "value": "string",
                }],
                "query_params": [{
                    "mode": "string",
                    "value": "string",
                }],
            },
            "headers_to_logs": ["string"],
        },
        log_client_ip=False,
        operation_name_format="string",
        always_log_errors=False,
        sampling_percentage=0,
        verbosity="string")
    
    const diagnosticResource = new azure.apimanagement.Diagnostic("diagnosticResource", {
        identifier: "string",
        apiManagementLoggerId: "string",
        apiManagementName: "string",
        resourceGroupName: "string",
        backendRequest: {
            bodyBytes: 0,
            dataMasking: {
                headers: [{
                    mode: "string",
                    value: "string",
                }],
                queryParams: [{
                    mode: "string",
                    value: "string",
                }],
            },
            headersToLogs: ["string"],
        },
        frontendRequest: {
            bodyBytes: 0,
            dataMasking: {
                headers: [{
                    mode: "string",
                    value: "string",
                }],
                queryParams: [{
                    mode: "string",
                    value: "string",
                }],
            },
            headersToLogs: ["string"],
        },
        frontendResponse: {
            bodyBytes: 0,
            dataMasking: {
                headers: [{
                    mode: "string",
                    value: "string",
                }],
                queryParams: [{
                    mode: "string",
                    value: "string",
                }],
            },
            headersToLogs: ["string"],
        },
        httpCorrelationProtocol: "string",
        backendResponse: {
            bodyBytes: 0,
            dataMasking: {
                headers: [{
                    mode: "string",
                    value: "string",
                }],
                queryParams: [{
                    mode: "string",
                    value: "string",
                }],
            },
            headersToLogs: ["string"],
        },
        logClientIp: false,
        operationNameFormat: "string",
        alwaysLogErrors: false,
        samplingPercentage: 0,
        verbosity: "string",
    });
    
    type: azure:apimanagement:Diagnostic
    properties:
        alwaysLogErrors: false
        apiManagementLoggerId: string
        apiManagementName: string
        backendRequest:
            bodyBytes: 0
            dataMasking:
                headers:
                    - mode: string
                      value: string
                queryParams:
                    - mode: string
                      value: string
            headersToLogs:
                - string
        backendResponse:
            bodyBytes: 0
            dataMasking:
                headers:
                    - mode: string
                      value: string
                queryParams:
                    - mode: string
                      value: string
            headersToLogs:
                - string
        frontendRequest:
            bodyBytes: 0
            dataMasking:
                headers:
                    - mode: string
                      value: string
                queryParams:
                    - mode: string
                      value: string
            headersToLogs:
                - string
        frontendResponse:
            bodyBytes: 0
            dataMasking:
                headers:
                    - mode: string
                      value: string
                queryParams:
                    - mode: string
                      value: string
            headersToLogs:
                - string
        httpCorrelationProtocol: string
        identifier: string
        logClientIp: false
        operationNameFormat: string
        resourceGroupName: string
        samplingPercentage: 0
        verbosity: string
    

    Diagnostic Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Diagnostic resource accepts the following input properties:

    ApiManagementLoggerId string
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    ApiManagementName string
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    Identifier string
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    AlwaysLogErrors bool
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    BackendRequest DiagnosticBackendRequest
    A backend_request block as defined below.
    BackendResponse DiagnosticBackendResponse
    A backend_response block as defined below.
    Enabled bool

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    FrontendRequest DiagnosticFrontendRequest
    A frontend_request block as defined below.
    FrontendResponse DiagnosticFrontendResponse
    A frontend_response block as defined below.
    HttpCorrelationProtocol string
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    LogClientIp bool
    Log client IP address.
    OperationNameFormat string
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    SamplingPercentage double
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    Verbosity string
    Logging verbosity. Possible values are verbose, information or error.
    ApiManagementLoggerId string
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    ApiManagementName string
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    Identifier string
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    AlwaysLogErrors bool
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    BackendRequest DiagnosticBackendRequestArgs
    A backend_request block as defined below.
    BackendResponse DiagnosticBackendResponseArgs
    A backend_response block as defined below.
    Enabled bool

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    FrontendRequest DiagnosticFrontendRequestArgs
    A frontend_request block as defined below.
    FrontendResponse DiagnosticFrontendResponseArgs
    A frontend_response block as defined below.
    HttpCorrelationProtocol string
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    LogClientIp bool
    Log client IP address.
    OperationNameFormat string
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    SamplingPercentage float64
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    Verbosity string
    Logging verbosity. Possible values are verbose, information or error.
    apiManagementLoggerId String
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    apiManagementName String
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    identifier String
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    alwaysLogErrors Boolean
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    backendRequest DiagnosticBackendRequest
    A backend_request block as defined below.
    backendResponse DiagnosticBackendResponse
    A backend_response block as defined below.
    enabled Boolean

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontendRequest DiagnosticFrontendRequest
    A frontend_request block as defined below.
    frontendResponse DiagnosticFrontendResponse
    A frontend_response block as defined below.
    httpCorrelationProtocol String
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    logClientIp Boolean
    Log client IP address.
    operationNameFormat String
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    samplingPercentage Double
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity String
    Logging verbosity. Possible values are verbose, information or error.
    apiManagementLoggerId string
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    apiManagementName string
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    identifier string
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    resourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    alwaysLogErrors boolean
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    backendRequest DiagnosticBackendRequest
    A backend_request block as defined below.
    backendResponse DiagnosticBackendResponse
    A backend_response block as defined below.
    enabled boolean

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontendRequest DiagnosticFrontendRequest
    A frontend_request block as defined below.
    frontendResponse DiagnosticFrontendResponse
    A frontend_response block as defined below.
    httpCorrelationProtocol string
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    logClientIp boolean
    Log client IP address.
    operationNameFormat string
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    samplingPercentage number
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity string
    Logging verbosity. Possible values are verbose, information or error.
    api_management_logger_id str
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    api_management_name str
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    identifier str
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    resource_group_name str
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    always_log_errors bool
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    backend_request DiagnosticBackendRequestArgs
    A backend_request block as defined below.
    backend_response DiagnosticBackendResponseArgs
    A backend_response block as defined below.
    enabled bool

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontend_request DiagnosticFrontendRequestArgs
    A frontend_request block as defined below.
    frontend_response DiagnosticFrontendResponseArgs
    A frontend_response block as defined below.
    http_correlation_protocol str
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    log_client_ip bool
    Log client IP address.
    operation_name_format str
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    sampling_percentage float
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity str
    Logging verbosity. Possible values are verbose, information or error.
    apiManagementLoggerId String
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    apiManagementName String
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    identifier String
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    alwaysLogErrors Boolean
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    backendRequest Property Map
    A backend_request block as defined below.
    backendResponse Property Map
    A backend_response block as defined below.
    enabled Boolean

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontendRequest Property Map
    A frontend_request block as defined below.
    frontendResponse Property Map
    A frontend_response block as defined below.
    httpCorrelationProtocol String
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    logClientIp Boolean
    Log client IP address.
    operationNameFormat String
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    samplingPercentage Number
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity String
    Logging verbosity. Possible values are verbose, information or error.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Diagnostic resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Diagnostic Resource

    Get an existing Diagnostic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DiagnosticState, opts?: CustomResourceOptions): Diagnostic
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            always_log_errors: Optional[bool] = None,
            api_management_logger_id: Optional[str] = None,
            api_management_name: Optional[str] = None,
            backend_request: Optional[DiagnosticBackendRequestArgs] = None,
            backend_response: Optional[DiagnosticBackendResponseArgs] = None,
            enabled: Optional[bool] = None,
            frontend_request: Optional[DiagnosticFrontendRequestArgs] = None,
            frontend_response: Optional[DiagnosticFrontendResponseArgs] = None,
            http_correlation_protocol: Optional[str] = None,
            identifier: Optional[str] = None,
            log_client_ip: Optional[bool] = None,
            operation_name_format: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            sampling_percentage: Optional[float] = None,
            verbosity: Optional[str] = None) -> Diagnostic
    func GetDiagnostic(ctx *Context, name string, id IDInput, state *DiagnosticState, opts ...ResourceOption) (*Diagnostic, error)
    public static Diagnostic Get(string name, Input<string> id, DiagnosticState? state, CustomResourceOptions? opts = null)
    public static Diagnostic get(String name, Output<String> id, DiagnosticState state, CustomResourceOptions options)
    resources:  _:    type: azure:apimanagement:Diagnostic    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AlwaysLogErrors bool
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    ApiManagementLoggerId string
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    ApiManagementName string
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    BackendRequest DiagnosticBackendRequest
    A backend_request block as defined below.
    BackendResponse DiagnosticBackendResponse
    A backend_response block as defined below.
    Enabled bool

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    FrontendRequest DiagnosticFrontendRequest
    A frontend_request block as defined below.
    FrontendResponse DiagnosticFrontendResponse
    A frontend_response block as defined below.
    HttpCorrelationProtocol string
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    Identifier string
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    LogClientIp bool
    Log client IP address.
    OperationNameFormat string
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    SamplingPercentage double
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    Verbosity string
    Logging verbosity. Possible values are verbose, information or error.
    AlwaysLogErrors bool
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    ApiManagementLoggerId string
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    ApiManagementName string
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    BackendRequest DiagnosticBackendRequestArgs
    A backend_request block as defined below.
    BackendResponse DiagnosticBackendResponseArgs
    A backend_response block as defined below.
    Enabled bool

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    FrontendRequest DiagnosticFrontendRequestArgs
    A frontend_request block as defined below.
    FrontendResponse DiagnosticFrontendResponseArgs
    A frontend_response block as defined below.
    HttpCorrelationProtocol string
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    Identifier string
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    LogClientIp bool
    Log client IP address.
    OperationNameFormat string
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    SamplingPercentage float64
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    Verbosity string
    Logging verbosity. Possible values are verbose, information or error.
    alwaysLogErrors Boolean
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    apiManagementLoggerId String
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    apiManagementName String
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    backendRequest DiagnosticBackendRequest
    A backend_request block as defined below.
    backendResponse DiagnosticBackendResponse
    A backend_response block as defined below.
    enabled Boolean

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontendRequest DiagnosticFrontendRequest
    A frontend_request block as defined below.
    frontendResponse DiagnosticFrontendResponse
    A frontend_response block as defined below.
    httpCorrelationProtocol String
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    identifier String
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    logClientIp Boolean
    Log client IP address.
    operationNameFormat String
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    samplingPercentage Double
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity String
    Logging verbosity. Possible values are verbose, information or error.
    alwaysLogErrors boolean
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    apiManagementLoggerId string
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    apiManagementName string
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    backendRequest DiagnosticBackendRequest
    A backend_request block as defined below.
    backendResponse DiagnosticBackendResponse
    A backend_response block as defined below.
    enabled boolean

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontendRequest DiagnosticFrontendRequest
    A frontend_request block as defined below.
    frontendResponse DiagnosticFrontendResponse
    A frontend_response block as defined below.
    httpCorrelationProtocol string
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    identifier string
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    logClientIp boolean
    Log client IP address.
    operationNameFormat string
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    resourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    samplingPercentage number
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity string
    Logging verbosity. Possible values are verbose, information or error.
    always_log_errors bool
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    api_management_logger_id str
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    api_management_name str
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    backend_request DiagnosticBackendRequestArgs
    A backend_request block as defined below.
    backend_response DiagnosticBackendResponseArgs
    A backend_response block as defined below.
    enabled bool

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontend_request DiagnosticFrontendRequestArgs
    A frontend_request block as defined below.
    frontend_response DiagnosticFrontendResponseArgs
    A frontend_response block as defined below.
    http_correlation_protocol str
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    identifier str
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    log_client_ip bool
    Log client IP address.
    operation_name_format str
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    resource_group_name str
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    sampling_percentage float
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity str
    Logging verbosity. Possible values are verbose, information or error.
    alwaysLogErrors Boolean
    Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
    apiManagementLoggerId String
    The id of the target API Management Logger where the API Management Diagnostic should be saved.
    apiManagementName String
    The Name of the API Management Service where this Diagnostic should be created. Changing this forces a new resource to be created.
    backendRequest Property Map
    A backend_request block as defined below.
    backendResponse Property Map
    A backend_response block as defined below.
    enabled Boolean

    Deprecated: this property has been removed from the API and will be removed in version 3.0 of the provider

    frontendRequest Property Map
    A frontend_request block as defined below.
    frontendResponse Property Map
    A frontend_response block as defined below.
    httpCorrelationProtocol String
    The HTTP Correlation Protocol to use. Possible values are None, Legacy or W3C.
    identifier String
    The diagnostic identifier for the API Management Service. At this time the only supported value is applicationinsights. Changing this forces a new resource to be created.
    logClientIp Boolean
    Log client IP address.
    operationNameFormat String
    The format of the Operation Name for Application Insights telemetries. Possible values are Name, and Url. Defaults to Name.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    samplingPercentage Number
    Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between 0.0 and 100.0.
    verbosity String
    Logging verbosity. Possible values are verbose, information or error.

    Supporting Types

    DiagnosticBackendRequest, DiagnosticBackendRequestArgs

    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticBackendRequestDataMasking
    HeadersToLogs List<string>
    Specifies a list of headers to log.
    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticBackendRequestDataMasking
    HeadersToLogs []string
    Specifies a list of headers to log.
    bodyBytes Integer
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticBackendRequestDataMasking
    headersToLogs List<String>
    Specifies a list of headers to log.
    bodyBytes number
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticBackendRequestDataMasking
    headersToLogs string[]
    Specifies a list of headers to log.
    body_bytes int
    Number of payload bytes to log (up to 8192).
    data_masking DiagnosticBackendRequestDataMasking
    headers_to_logs Sequence[str]
    Specifies a list of headers to log.
    bodyBytes Number
    Number of payload bytes to log (up to 8192).
    dataMasking Property Map
    headersToLogs List<String>
    Specifies a list of headers to log.

    DiagnosticBackendRequestDataMasking, DiagnosticBackendRequestDataMaskingArgs

    DiagnosticBackendRequestDataMaskingHeader, DiagnosticBackendRequestDataMaskingHeaderArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticBackendRequestDataMaskingQueryParam, DiagnosticBackendRequestDataMaskingQueryParamArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticBackendResponse, DiagnosticBackendResponseArgs

    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticBackendResponseDataMasking
    HeadersToLogs List<string>
    Specifies a list of headers to log.
    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticBackendResponseDataMasking
    HeadersToLogs []string
    Specifies a list of headers to log.
    bodyBytes Integer
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticBackendResponseDataMasking
    headersToLogs List<String>
    Specifies a list of headers to log.
    bodyBytes number
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticBackendResponseDataMasking
    headersToLogs string[]
    Specifies a list of headers to log.
    body_bytes int
    Number of payload bytes to log (up to 8192).
    data_masking DiagnosticBackendResponseDataMasking
    headers_to_logs Sequence[str]
    Specifies a list of headers to log.
    bodyBytes Number
    Number of payload bytes to log (up to 8192).
    dataMasking Property Map
    headersToLogs List<String>
    Specifies a list of headers to log.

    DiagnosticBackendResponseDataMasking, DiagnosticBackendResponseDataMaskingArgs

    DiagnosticBackendResponseDataMaskingHeader, DiagnosticBackendResponseDataMaskingHeaderArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticBackendResponseDataMaskingQueryParam, DiagnosticBackendResponseDataMaskingQueryParamArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticFrontendRequest, DiagnosticFrontendRequestArgs

    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticFrontendRequestDataMasking
    HeadersToLogs List<string>
    Specifies a list of headers to log.
    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticFrontendRequestDataMasking
    HeadersToLogs []string
    Specifies a list of headers to log.
    bodyBytes Integer
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticFrontendRequestDataMasking
    headersToLogs List<String>
    Specifies a list of headers to log.
    bodyBytes number
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticFrontendRequestDataMasking
    headersToLogs string[]
    Specifies a list of headers to log.
    body_bytes int
    Number of payload bytes to log (up to 8192).
    data_masking DiagnosticFrontendRequestDataMasking
    headers_to_logs Sequence[str]
    Specifies a list of headers to log.
    bodyBytes Number
    Number of payload bytes to log (up to 8192).
    dataMasking Property Map
    headersToLogs List<String>
    Specifies a list of headers to log.

    DiagnosticFrontendRequestDataMasking, DiagnosticFrontendRequestDataMaskingArgs

    DiagnosticFrontendRequestDataMaskingHeader, DiagnosticFrontendRequestDataMaskingHeaderArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticFrontendRequestDataMaskingQueryParam, DiagnosticFrontendRequestDataMaskingQueryParamArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticFrontendResponse, DiagnosticFrontendResponseArgs

    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticFrontendResponseDataMasking
    HeadersToLogs List<string>
    Specifies a list of headers to log.
    BodyBytes int
    Number of payload bytes to log (up to 8192).
    DataMasking DiagnosticFrontendResponseDataMasking
    HeadersToLogs []string
    Specifies a list of headers to log.
    bodyBytes Integer
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticFrontendResponseDataMasking
    headersToLogs List<String>
    Specifies a list of headers to log.
    bodyBytes number
    Number of payload bytes to log (up to 8192).
    dataMasking DiagnosticFrontendResponseDataMasking
    headersToLogs string[]
    Specifies a list of headers to log.
    body_bytes int
    Number of payload bytes to log (up to 8192).
    data_masking DiagnosticFrontendResponseDataMasking
    headers_to_logs Sequence[str]
    Specifies a list of headers to log.
    bodyBytes Number
    Number of payload bytes to log (up to 8192).
    dataMasking Property Map
    headersToLogs List<String>
    Specifies a list of headers to log.

    DiagnosticFrontendResponseDataMasking, DiagnosticFrontendResponseDataMaskingArgs

    DiagnosticFrontendResponseDataMaskingHeader, DiagnosticFrontendResponseDataMaskingHeaderArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    DiagnosticFrontendResponseDataMaskingQueryParam, DiagnosticFrontendResponseDataMaskingQueryParamArgs

    Mode string
    Value string
    Mode string
    Value string
    mode String
    value String
    mode string
    value string
    mode str
    value str
    mode String
    value String

    Import

    API Management Diagnostics can be imported using the resource id, e.g.

     $ pulumi import azure:apimanagement/diagnostic:Diagnostic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/diagnostics/applicationinsights
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.