Diagnostic Args
data class DiagnosticArgs(val alwaysLog: Output<Either<String, AlwaysLog>>? = null, val backend: Output<PipelineDiagnosticSettingsArgs>? = null, val diagnosticId: Output<String>? = null, val frontend: Output<PipelineDiagnosticSettingsArgs>? = null, val httpCorrelationProtocol: Output<Either<String, HttpCorrelationProtocol>>? = null, val logClientIp: Output<Boolean>? = null, val loggerId: Output<String>? = null, val metrics: Output<Boolean>? = null, val operationNameFormat: Output<Either<String, OperationNameFormat>>? = null, val resourceGroupName: Output<String>? = null, val sampling: Output<SamplingSettingsArgs>? = null, val serviceName: Output<String>? = null, val verbosity: Output<Either<String, Verbosity>>? = null) : ConvertibleToJava<DiagnosticArgs>
Diagnostic details. API Version: 2020-12-01.
Example Usage
ApiManagementCreateDiagnostic
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var diagnostic = new AzureNative.ApiManagement.Diagnostic("diagnostic", new()
{
AlwaysLog = "allErrors",
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/azuremonitor",
ResourceGroupName = "rg1",
Sampling = new AzureNative.ApiManagement.Inputs.SamplingSettingsArgs
{
Percentage = 50,
SamplingType = "fixed",
},
ServiceName = "apimService1",
});
});
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.Diagnostic;
import com.pulumi.azurenative.apimanagement.DiagnosticArgs;
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 diagnostic = new Diagnostic("diagnostic", DiagnosticArgs.builder()
.alwaysLog("allErrors")
.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/azuremonitor")
.resourceGroupName("rg1")
.sampling(Map.ofEntries(
Map.entry("percentage", 50),
Map.entry("samplingType", "fixed")
))
.serviceName("apimService1")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:Diagnostic applicationinsights /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/diagnostics/applicationinsights
Content copied to clipboard
Constructors
Link copied to clipboard
fun DiagnosticArgs(alwaysLog: Output<Either<String, AlwaysLog>>? = null, backend: Output<PipelineDiagnosticSettingsArgs>? = null, diagnosticId: Output<String>? = null, frontend: Output<PipelineDiagnosticSettingsArgs>? = null, httpCorrelationProtocol: Output<Either<String, HttpCorrelationProtocol>>? = null, logClientIp: Output<Boolean>? = null, loggerId: Output<String>? = null, metrics: Output<Boolean>? = null, operationNameFormat: Output<Either<String, OperationNameFormat>>? = null, resourceGroupName: Output<String>? = null, sampling: Output<SamplingSettingsArgs>? = null, serviceName: Output<String>? = null, verbosity: Output<Either<String, Verbosity>>? = null)