WorkspaceApiDiagnosticArgs

data class WorkspaceApiDiagnosticArgs(val alwaysLog: Output<Either<String, AlwaysLog>>? = null, val apiId: Output<String>? = null, val backend: Output<PipelineDiagnosticSettingsArgs>? = null, val diagnosticId: Output<String>? = null, val frontend: Output<PipelineDiagnosticSettingsArgs>? = null, val httpCorrelationProtocol: Output<Either<String, HttpCorrelationProtocol>>? = null, val largeLanguageModel: Output<LLMDiagnosticSettingsArgs>? = 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, val workspaceId: Output<String>? = null) : ConvertibleToJava<WorkspaceApiDiagnosticArgs>

Diagnostic details. Uses Azure REST API version 2024-06-01-preview. In version 2.x of the Azure Native provider, it used API version 2023-09-01-preview. Other available API versions: 2023-09-01-preview, 2024-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apimanagement [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

ApiManagementCreateWorkspaceApiDiagnostic

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceApiDiagnostic = new AzureNative.ApiManagement.WorkspaceApiDiagnostic("workspaceApiDiagnostic", new()
{
AlwaysLog = AzureNative.ApiManagement.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 = "/workspaces/wks1/loggers/applicationinsights",
ResourceGroupName = "rg1",
Sampling = new AzureNative.ApiManagement.Inputs.SamplingSettingsArgs
{
Percentage = 50,
SamplingType = AzureNative.ApiManagement.SamplingType.@Fixed,
},
ServiceName = "apimService1",
WorkspaceId = "wks1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewWorkspaceApiDiagnostic(ctx, "workspaceApiDiagnostic", &apimanagement.WorkspaceApiDiagnosticArgs{
AlwaysLog: pulumi.String(apimanagement.AlwaysLogAllErrors),
ApiId: pulumi.String("57d1f7558aa04f15146d9d8a"),
Backend: &apimanagement.PipelineDiagnosticSettingsArgs{
Request: &apimanagement.HttpMessageDiagnosticArgs{
Body: &apimanagement.BodyDiagnosticSettingsArgs{
Bytes: pulumi.Int(512),
},
Headers: pulumi.StringArray{
pulumi.String("Content-type"),
},
},
Response: &apimanagement.HttpMessageDiagnosticArgs{
Body: &apimanagement.BodyDiagnosticSettingsArgs{
Bytes: pulumi.Int(512),
},
Headers: pulumi.StringArray{
pulumi.String("Content-type"),
},
},
},
DiagnosticId: pulumi.String("applicationinsights"),
Frontend: &apimanagement.PipelineDiagnosticSettingsArgs{
Request: &apimanagement.HttpMessageDiagnosticArgs{
Body: &apimanagement.BodyDiagnosticSettingsArgs{
Bytes: pulumi.Int(512),
},
Headers: pulumi.StringArray{
pulumi.String("Content-type"),
},
},
Response: &apimanagement.HttpMessageDiagnosticArgs{
Body: &apimanagement.BodyDiagnosticSettingsArgs{
Bytes: pulumi.Int(512),
},
Headers: pulumi.StringArray{
pulumi.String("Content-type"),
},
},
},
LoggerId: pulumi.String("/workspaces/wks1/loggers/applicationinsights"),
ResourceGroupName: pulumi.String("rg1"),
Sampling: &apimanagement.SamplingSettingsArgs{
Percentage: pulumi.Float64(50),
SamplingType: pulumi.String(apimanagement.SamplingTypeFixed),
},
ServiceName: pulumi.String("apimService1"),
WorkspaceId: pulumi.String("wks1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.WorkspaceApiDiagnostic;
import com.pulumi.azurenative.apimanagement.WorkspaceApiDiagnosticArgs;
import com.pulumi.azurenative.apimanagement.inputs.PipelineDiagnosticSettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.HttpMessageDiagnosticArgs;
import com.pulumi.azurenative.apimanagement.inputs.BodyDiagnosticSettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.SamplingSettingsArgs;
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 workspaceApiDiagnostic = new WorkspaceApiDiagnostic("workspaceApiDiagnostic", WorkspaceApiDiagnosticArgs.builder()
.alwaysLog("allErrors")
.apiId("57d1f7558aa04f15146d9d8a")
.backend(PipelineDiagnosticSettingsArgs.builder()
.request(HttpMessageDiagnosticArgs.builder()
.body(BodyDiagnosticSettingsArgs.builder()
.bytes(512)
.build())
.headers("Content-type")
.build())
.response(HttpMessageDiagnosticArgs.builder()
.body(BodyDiagnosticSettingsArgs.builder()
.bytes(512)
.build())
.headers("Content-type")
.build())
.build())
.diagnosticId("applicationinsights")
.frontend(PipelineDiagnosticSettingsArgs.builder()
.request(HttpMessageDiagnosticArgs.builder()
.body(BodyDiagnosticSettingsArgs.builder()
.bytes(512)
.build())
.headers("Content-type")
.build())
.response(HttpMessageDiagnosticArgs.builder()
.body(BodyDiagnosticSettingsArgs.builder()
.bytes(512)
.build())
.headers("Content-type")
.build())
.build())
.loggerId("/workspaces/wks1/loggers/applicationinsights")
.resourceGroupName("rg1")
.sampling(SamplingSettingsArgs.builder()
.percentage(50)
.samplingType("fixed")
.build())
.serviceName("apimService1")
.workspaceId("wks1")
.build());
}
}

Import

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

$ pulumi import azure-native:apimanagement:WorkspaceApiDiagnostic applicationinsights /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}

Constructors

Link copied to clipboard
constructor(alwaysLog: Output<Either<String, AlwaysLog>>? = null, apiId: Output<String>? = null, backend: Output<PipelineDiagnosticSettingsArgs>? = null, diagnosticId: Output<String>? = null, frontend: Output<PipelineDiagnosticSettingsArgs>? = null, httpCorrelationProtocol: Output<Either<String, HttpCorrelationProtocol>>? = null, largeLanguageModel: Output<LLMDiagnosticSettingsArgs>? = 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, workspaceId: Output<String>? = null)

Properties

Link copied to clipboard
val alwaysLog: Output<Either<String, AlwaysLog>>? = null

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

Link copied to clipboard
val apiId: Output<String>? = null

API identifier. Must be unique in the current API Management service instance.

Link copied to clipboard

Diagnostic settings for incoming/outgoing HTTP messages to the Backend

Link copied to clipboard
val diagnosticId: Output<String>? = null

Diagnostic identifier. Must be unique in the current API Management service instance.

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

Large Language Models diagnostic settings

Link copied to clipboard
val logClientIp: Output<Boolean>? = null

Log the ClientIP. Default is false.

Link copied to clipboard
val loggerId: Output<String>? = null

Resource Id of a target logger.

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

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

Link copied to clipboard
val operationNameFormat: Output<Either<String, OperationNameFormat>>? = null

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

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val sampling: Output<SamplingSettingsArgs>? = null

Sampling settings for Diagnostic.

Link copied to clipboard
val serviceName: Output<String>? = null

The name of the API Management service.

Link copied to clipboard
val verbosity: Output<Either<String, Verbosity>>? = null

The verbosity level applied to traces emitted by trace policies.

Link copied to clipboard
val workspaceId: Output<String>? = null

Workspace identifier. Must be unique in the current API Management service instance.

Functions

Link copied to clipboard
open override fun toJava(): WorkspaceApiDiagnosticArgs