ApiDiagnostic

Diagnostic details. API Version: 2020-12-01.

Example Usage

ApiManagementCreateApiDiagnostic

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var apiDiagnostic = new AzureNative.ApiManagement.ApiDiagnostic("apiDiagnostic", new()
{
AlwaysLog = "allErrors",
ApiId = "57d1f7558aa04f15146d9d8a",
Backend = new AzureNative.ApiManagement.Inputs.PipelineDiagnosticSettingsArgs
{
Request = new AzureNative.ApiManagement.Inputs.HttpMessageDiagnosticArgs
{
Body = new AzureNative.ApiManagement.Inputs.BodyDiagnosticSettingsArgs
{
Bytes = 512,
},
Headers = new[]
{
"Content-type",
},
},
Response = new AzureNative.ApiManagement.Inputs.HttpMessageDiagnosticArgs
{
Body = new AzureNative.ApiManagement.Inputs.BodyDiagnosticSettingsArgs
{
Bytes = 512,
},
Headers = new[]
{
"Content-type",
},
},
},
DiagnosticId = "applicationinsights",
Frontend = new AzureNative.ApiManagement.Inputs.PipelineDiagnosticSettingsArgs
{
Request = new AzureNative.ApiManagement.Inputs.HttpMessageDiagnosticArgs
{
Body = new AzureNative.ApiManagement.Inputs.BodyDiagnosticSettingsArgs
{
Bytes = 512,
},
Headers = new[]
{
"Content-type",
},
},
Response = new AzureNative.ApiManagement.Inputs.HttpMessageDiagnosticArgs
{
Body = new AzureNative.ApiManagement.Inputs.BodyDiagnosticSettingsArgs
{
Bytes = 512,
},
Headers = new[]
{
"Content-type",
},
},
},
LoggerId = "/loggers/applicationinsights",
ResourceGroupName = "rg1",
Sampling = new AzureNative.ApiManagement.Inputs.SamplingSettingsArgs
{
Percentage = 50,
SamplingType = "fixed",
},
ServiceName = "apimService1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.ApiDiagnostic;
import com.pulumi.azurenative.apimanagement.ApiDiagnosticArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var apiDiagnostic = new ApiDiagnostic("apiDiagnostic", ApiDiagnosticArgs.builder()
.alwaysLog("allErrors")
.apiId("57d1f7558aa04f15146d9d8a")
.backend(Map.ofEntries(
Map.entry("request", Map.ofEntries(
Map.entry("body", Map.of("bytes", 512)),
Map.entry("headers", "Content-type")
)),
Map.entry("response", Map.ofEntries(
Map.entry("body", Map.of("bytes", 512)),
Map.entry("headers", "Content-type")
))
))
.diagnosticId("applicationinsights")
.frontend(Map.ofEntries(
Map.entry("request", Map.ofEntries(
Map.entry("body", Map.of("bytes", 512)),
Map.entry("headers", "Content-type")
)),
Map.entry("response", Map.ofEntries(
Map.entry("body", Map.of("bytes", 512)),
Map.entry("headers", "Content-type")
))
))
.loggerId("/loggers/applicationinsights")
.resourceGroupName("rg1")
.sampling(Map.ofEntries(
Map.entry("percentage", 50),
Map.entry("samplingType", "fixed")
))
.serviceName("apimService1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:apimanagement:ApiDiagnostic applicationinsights /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/diagnostics/applicationinsights

Properties

Link copied to clipboard
val alwaysLog: Output<String>?

Specifies for what type of messages sampling settings should not apply.

Link copied to clipboard

Diagnostic settings for incoming/outgoing HTTP messages to the Backend

Link copied to clipboard

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

Link copied to clipboard

Sets correlation protocol to use for Application Insights diagnostics.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val logClientIp: Output<Boolean>?

Log the ClientIP. Default is false.

Link copied to clipboard
val loggerId: Output<String>

Resource Id of a target logger.

Link copied to clipboard
val metrics: Output<Boolean>?

Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.

Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard

The format of the Operation Name for Application Insights telemetries. Default is Name.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sampling settings for Diagnostic.

Link copied to clipboard
val type: Output<String>

Resource type for API Management resource.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val verbosity: Output<String>?

The verbosity level applied to traces emitted by trace policies.