We recommend using Azure Native.
azure.apimanagement.ApiDiagnostic
Explore with Pulumi AI
Manages a API Management Service API Diagnostics Logs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "example-appinsights",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
const exampleService = new azure.apimanagement.Service("example", {
name: "example-apim",
location: example.location,
resourceGroupName: example.name,
publisherName: "My Company",
publisherEmail: "company@mycompany.io",
skuName: "Developer_1",
});
const exampleApi = new azure.apimanagement.Api("example", {
name: "example-api",
resourceGroupName: example.name,
apiManagementName: exampleService.name,
revision: "1",
displayName: "Example API",
path: "example",
protocols: ["https"],
"import": {
contentFormat: "swagger-link-json",
contentValue: "http://conferenceapi.azurewebsites.net/?format=json",
},
});
const exampleLogger = new azure.apimanagement.Logger("example", {
name: "example-apimlogger",
apiManagementName: exampleService.name,
resourceGroupName: example.name,
applicationInsights: {
instrumentationKey: exampleInsights.instrumentationKey,
},
});
const exampleApiDiagnostic = new azure.apimanagement.ApiDiagnostic("example", {
identifier: "applicationinsights",
resourceGroupName: example.name,
apiManagementName: exampleService.name,
apiName: exampleApi.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 = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="example-appinsights",
location=example.location,
resource_group_name=example.name,
application_type="web")
example_service = azure.apimanagement.Service("example",
name="example-apim",
location=example.location,
resource_group_name=example.name,
publisher_name="My Company",
publisher_email="company@mycompany.io",
sku_name="Developer_1")
example_api = azure.apimanagement.Api("example",
name="example-api",
resource_group_name=example.name,
api_management_name=example_service.name,
revision="1",
display_name="Example API",
path="example",
protocols=["https"],
import_=azure.apimanagement.ApiImportArgs(
content_format="swagger-link-json",
content_value="http://conferenceapi.azurewebsites.net/?format=json",
))
example_logger = azure.apimanagement.Logger("example",
name="example-apimlogger",
api_management_name=example_service.name,
resource_group_name=example.name,
application_insights=azure.apimanagement.LoggerApplicationInsightsArgs(
instrumentation_key=example_insights.instrumentation_key,
))
example_api_diagnostic = azure.apimanagement.ApiDiagnostic("example",
identifier="applicationinsights",
resource_group_name=example.name,
api_management_name=example_service.name,
api_name=example_api.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.ApiDiagnosticFrontendRequestArgs(
body_bytes=32,
headers_to_logs=[
"content-type",
"accept",
"origin",
],
),
frontend_response=azure.apimanagement.ApiDiagnosticFrontendResponseArgs(
body_bytes=32,
headers_to_logs=[
"content-type",
"content-length",
"origin",
],
),
backend_request=azure.apimanagement.ApiDiagnosticBackendRequestArgs(
body_bytes=32,
headers_to_logs=[
"content-type",
"accept",
"origin",
],
),
backend_response=azure.apimanagement.ApiDiagnosticBackendResponseArgs(
body_bytes=32,
headers_to_logs=[
"content-type",
"content-length",
"origin",
],
))
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("example-appinsights"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
Name: pulumi.String("example-apim"),
Location: example.Location,
ResourceGroupName: example.Name,
PublisherName: pulumi.String("My Company"),
PublisherEmail: pulumi.String("company@mycompany.io"),
SkuName: pulumi.String("Developer_1"),
})
if err != nil {
return err
}
exampleApi, err := apimanagement.NewApi(ctx, "example", &apimanagement.ApiArgs{
Name: pulumi.String("example-api"),
ResourceGroupName: example.Name,
ApiManagementName: exampleService.Name,
Revision: pulumi.String("1"),
DisplayName: pulumi.String("Example API"),
Path: pulumi.String("example"),
Protocols: pulumi.StringArray{
pulumi.String("https"),
},
Import: &apimanagement.ApiImportArgs{
ContentFormat: pulumi.String("swagger-link-json"),
ContentValue: pulumi.String("http://conferenceapi.azurewebsites.net/?format=json"),
},
})
if err != nil {
return err
}
exampleLogger, err := apimanagement.NewLogger(ctx, "example", &apimanagement.LoggerArgs{
Name: pulumi.String("example-apimlogger"),
ApiManagementName: exampleService.Name,
ResourceGroupName: example.Name,
ApplicationInsights: &apimanagement.LoggerApplicationInsightsArgs{
InstrumentationKey: exampleInsights.InstrumentationKey,
},
})
if err != nil {
return err
}
_, err = apimanagement.NewApiDiagnostic(ctx, "example", &apimanagement.ApiDiagnosticArgs{
Identifier: pulumi.String("applicationinsights"),
ResourceGroupName: example.Name,
ApiManagementName: exampleService.Name,
ApiName: exampleApi.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.ApiDiagnosticFrontendRequestArgs{
BodyBytes: pulumi.Int(32),
HeadersToLogs: pulumi.StringArray{
pulumi.String("content-type"),
pulumi.String("accept"),
pulumi.String("origin"),
},
},
FrontendResponse: &apimanagement.ApiDiagnosticFrontendResponseArgs{
BodyBytes: pulumi.Int(32),
HeadersToLogs: pulumi.StringArray{
pulumi.String("content-type"),
pulumi.String("content-length"),
pulumi.String("origin"),
},
},
BackendRequest: &apimanagement.ApiDiagnosticBackendRequestArgs{
BodyBytes: pulumi.Int(32),
HeadersToLogs: pulumi.StringArray{
pulumi.String("content-type"),
pulumi.String("accept"),
pulumi.String("origin"),
},
},
BackendResponse: &apimanagement.ApiDiagnosticBackendResponseArgs{
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "example-appinsights",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
var exampleService = new Azure.ApiManagement.Service("example", new()
{
Name = "example-apim",
Location = example.Location,
ResourceGroupName = example.Name,
PublisherName = "My Company",
PublisherEmail = "company@mycompany.io",
SkuName = "Developer_1",
});
var exampleApi = new Azure.ApiManagement.Api("example", new()
{
Name = "example-api",
ResourceGroupName = example.Name,
ApiManagementName = exampleService.Name,
Revision = "1",
DisplayName = "Example API",
Path = "example",
Protocols = new[]
{
"https",
},
Import = new Azure.ApiManagement.Inputs.ApiImportArgs
{
ContentFormat = "swagger-link-json",
ContentValue = "http://conferenceapi.azurewebsites.net/?format=json",
},
});
var exampleLogger = new Azure.ApiManagement.Logger("example", new()
{
Name = "example-apimlogger",
ApiManagementName = exampleService.Name,
ResourceGroupName = example.Name,
ApplicationInsights = new Azure.ApiManagement.Inputs.LoggerApplicationInsightsArgs
{
InstrumentationKey = exampleInsights.InstrumentationKey,
},
});
var exampleApiDiagnostic = new Azure.ApiManagement.ApiDiagnostic("example", new()
{
Identifier = "applicationinsights",
ResourceGroupName = example.Name,
ApiManagementName = exampleService.Name,
ApiName = exampleApi.Name,
ApiManagementLoggerId = exampleLogger.Id,
SamplingPercentage = 5,
AlwaysLogErrors = true,
LogClientIp = true,
Verbosity = "verbose",
HttpCorrelationProtocol = "W3C",
FrontendRequest = new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendRequestArgs
{
BodyBytes = 32,
HeadersToLogs = new[]
{
"content-type",
"accept",
"origin",
},
},
FrontendResponse = new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendResponseArgs
{
BodyBytes = 32,
HeadersToLogs = new[]
{
"content-type",
"content-length",
"origin",
},
},
BackendRequest = new Azure.ApiManagement.Inputs.ApiDiagnosticBackendRequestArgs
{
BodyBytes = 32,
HeadersToLogs = new[]
{
"content-type",
"accept",
"origin",
},
},
BackendResponse = new Azure.ApiManagement.Inputs.ApiDiagnosticBackendResponseArgs
{
BodyBytes = 32,
HeadersToLogs = new[]
{
"content-type",
"content-length",
"origin",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.apimanagement.Service;
import com.pulumi.azure.apimanagement.ServiceArgs;
import com.pulumi.azure.apimanagement.Api;
import com.pulumi.azure.apimanagement.ApiArgs;
import com.pulumi.azure.apimanagement.inputs.ApiImportArgs;
import com.pulumi.azure.apimanagement.Logger;
import com.pulumi.azure.apimanagement.LoggerArgs;
import com.pulumi.azure.apimanagement.inputs.LoggerApplicationInsightsArgs;
import com.pulumi.azure.apimanagement.ApiDiagnostic;
import com.pulumi.azure.apimanagement.ApiDiagnosticArgs;
import com.pulumi.azure.apimanagement.inputs.ApiDiagnosticFrontendRequestArgs;
import com.pulumi.azure.apimanagement.inputs.ApiDiagnosticFrontendResponseArgs;
import com.pulumi.azure.apimanagement.inputs.ApiDiagnosticBackendRequestArgs;
import com.pulumi.azure.apimanagement.inputs.ApiDiagnosticBackendResponseArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("example-appinsights")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("example-apim")
.location(example.location())
.resourceGroupName(example.name())
.publisherName("My Company")
.publisherEmail("company@mycompany.io")
.skuName("Developer_1")
.build());
var exampleApi = new Api("exampleApi", ApiArgs.builder()
.name("example-api")
.resourceGroupName(example.name())
.apiManagementName(exampleService.name())
.revision("1")
.displayName("Example API")
.path("example")
.protocols("https")
.import_(ApiImportArgs.builder()
.contentFormat("swagger-link-json")
.contentValue("http://conferenceapi.azurewebsites.net/?format=json")
.build())
.build());
var exampleLogger = new Logger("exampleLogger", LoggerArgs.builder()
.name("example-apimlogger")
.apiManagementName(exampleService.name())
.resourceGroupName(example.name())
.applicationInsights(LoggerApplicationInsightsArgs.builder()
.instrumentationKey(exampleInsights.instrumentationKey())
.build())
.build());
var exampleApiDiagnostic = new ApiDiagnostic("exampleApiDiagnostic", ApiDiagnosticArgs.builder()
.identifier("applicationinsights")
.resourceGroupName(example.name())
.apiManagementName(exampleService.name())
.apiName(exampleApi.name())
.apiManagementLoggerId(exampleLogger.id())
.samplingPercentage(5)
.alwaysLogErrors(true)
.logClientIp(true)
.verbosity("verbose")
.httpCorrelationProtocol("W3C")
.frontendRequest(ApiDiagnosticFrontendRequestArgs.builder()
.bodyBytes(32)
.headersToLogs(
"content-type",
"accept",
"origin")
.build())
.frontendResponse(ApiDiagnosticFrontendResponseArgs.builder()
.bodyBytes(32)
.headersToLogs(
"content-type",
"content-length",
"origin")
.build())
.backendRequest(ApiDiagnosticBackendRequestArgs.builder()
.bodyBytes(32)
.headersToLogs(
"content-type",
"accept",
"origin")
.build())
.backendResponse(ApiDiagnosticBackendResponseArgs.builder()
.bodyBytes(32)
.headersToLogs(
"content-type",
"content-length",
"origin")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: example-appinsights
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
exampleService:
type: azure:apimanagement:Service
name: example
properties:
name: example-apim
location: ${example.location}
resourceGroupName: ${example.name}
publisherName: My Company
publisherEmail: company@mycompany.io
skuName: Developer_1
exampleApi:
type: azure:apimanagement:Api
name: example
properties:
name: example-api
resourceGroupName: ${example.name}
apiManagementName: ${exampleService.name}
revision: '1'
displayName: Example API
path: example
protocols:
- https
import:
contentFormat: swagger-link-json
contentValue: http://conferenceapi.azurewebsites.net/?format=json
exampleLogger:
type: azure:apimanagement:Logger
name: example
properties:
name: example-apimlogger
apiManagementName: ${exampleService.name}
resourceGroupName: ${example.name}
applicationInsights:
instrumentationKey: ${exampleInsights.instrumentationKey}
exampleApiDiagnostic:
type: azure:apimanagement:ApiDiagnostic
name: example
properties:
identifier: applicationinsights
resourceGroupName: ${example.name}
apiManagementName: ${exampleService.name}
apiName: ${exampleApi.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
Create ApiDiagnostic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiDiagnostic(name: string, args: ApiDiagnosticArgs, opts?: CustomResourceOptions);
@overload
def ApiDiagnostic(resource_name: str,
args: ApiDiagnosticArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiDiagnostic(resource_name: str,
opts: Optional[ResourceOptions] = None,
identifier: Optional[str] = None,
api_management_logger_id: Optional[str] = None,
api_management_name: Optional[str] = None,
api_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
http_correlation_protocol: Optional[str] = None,
backend_response: Optional[ApiDiagnosticBackendResponseArgs] = None,
frontend_response: Optional[ApiDiagnosticFrontendResponseArgs] = None,
frontend_request: Optional[ApiDiagnosticFrontendRequestArgs] = None,
always_log_errors: Optional[bool] = None,
log_client_ip: Optional[bool] = None,
operation_name_format: Optional[str] = None,
backend_request: Optional[ApiDiagnosticBackendRequestArgs] = None,
sampling_percentage: Optional[float] = None,
verbosity: Optional[str] = None)
func NewApiDiagnostic(ctx *Context, name string, args ApiDiagnosticArgs, opts ...ResourceOption) (*ApiDiagnostic, error)
public ApiDiagnostic(string name, ApiDiagnosticArgs args, CustomResourceOptions? opts = null)
public ApiDiagnostic(String name, ApiDiagnosticArgs args)
public ApiDiagnostic(String name, ApiDiagnosticArgs args, CustomResourceOptions options)
type: azure:apimanagement:ApiDiagnostic
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 ApiDiagnosticArgs
- 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 ApiDiagnosticArgs
- 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 ApiDiagnosticArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiDiagnosticArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiDiagnosticArgs
- 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 apiDiagnosticResource = new Azure.ApiManagement.ApiDiagnostic("apiDiagnosticResource", new()
{
Identifier = "string",
ApiManagementLoggerId = "string",
ApiManagementName = "string",
ApiName = "string",
ResourceGroupName = "string",
HttpCorrelationProtocol = "string",
BackendResponse = new Azure.ApiManagement.Inputs.ApiDiagnosticBackendResponseArgs
{
BodyBytes = 0,
DataMasking = new Azure.ApiManagement.Inputs.ApiDiagnosticBackendResponseDataMaskingArgs
{
Headers = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticBackendResponseDataMaskingHeaderArgs
{
Mode = "string",
Value = "string",
},
},
QueryParams = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticBackendResponseDataMaskingQueryParamArgs
{
Mode = "string",
Value = "string",
},
},
},
HeadersToLogs = new[]
{
"string",
},
},
FrontendResponse = new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendResponseArgs
{
BodyBytes = 0,
DataMasking = new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendResponseDataMaskingArgs
{
Headers = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendResponseDataMaskingHeaderArgs
{
Mode = "string",
Value = "string",
},
},
QueryParams = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs
{
Mode = "string",
Value = "string",
},
},
},
HeadersToLogs = new[]
{
"string",
},
},
FrontendRequest = new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendRequestArgs
{
BodyBytes = 0,
DataMasking = new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendRequestDataMaskingArgs
{
Headers = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendRequestDataMaskingHeaderArgs
{
Mode = "string",
Value = "string",
},
},
QueryParams = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs
{
Mode = "string",
Value = "string",
},
},
},
HeadersToLogs = new[]
{
"string",
},
},
AlwaysLogErrors = false,
LogClientIp = false,
OperationNameFormat = "string",
BackendRequest = new Azure.ApiManagement.Inputs.ApiDiagnosticBackendRequestArgs
{
BodyBytes = 0,
DataMasking = new Azure.ApiManagement.Inputs.ApiDiagnosticBackendRequestDataMaskingArgs
{
Headers = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticBackendRequestDataMaskingHeaderArgs
{
Mode = "string",
Value = "string",
},
},
QueryParams = new[]
{
new Azure.ApiManagement.Inputs.ApiDiagnosticBackendRequestDataMaskingQueryParamArgs
{
Mode = "string",
Value = "string",
},
},
},
HeadersToLogs = new[]
{
"string",
},
},
SamplingPercentage = 0,
Verbosity = "string",
});
example, err := apimanagement.NewApiDiagnostic(ctx, "apiDiagnosticResource", &apimanagement.ApiDiagnosticArgs{
Identifier: pulumi.String("string"),
ApiManagementLoggerId: pulumi.String("string"),
ApiManagementName: pulumi.String("string"),
ApiName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
HttpCorrelationProtocol: pulumi.String("string"),
BackendResponse: &apimanagement.ApiDiagnosticBackendResponseArgs{
BodyBytes: pulumi.Int(0),
DataMasking: &apimanagement.ApiDiagnosticBackendResponseDataMaskingArgs{
Headers: apimanagement.ApiDiagnosticBackendResponseDataMaskingHeaderArray{
&apimanagement.ApiDiagnosticBackendResponseDataMaskingHeaderArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
QueryParams: apimanagement.ApiDiagnosticBackendResponseDataMaskingQueryParamArray{
&apimanagement.ApiDiagnosticBackendResponseDataMaskingQueryParamArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
HeadersToLogs: pulumi.StringArray{
pulumi.String("string"),
},
},
FrontendResponse: &apimanagement.ApiDiagnosticFrontendResponseArgs{
BodyBytes: pulumi.Int(0),
DataMasking: &apimanagement.ApiDiagnosticFrontendResponseDataMaskingArgs{
Headers: apimanagement.ApiDiagnosticFrontendResponseDataMaskingHeaderArray{
&apimanagement.ApiDiagnosticFrontendResponseDataMaskingHeaderArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
QueryParams: apimanagement.ApiDiagnosticFrontendResponseDataMaskingQueryParamArray{
&apimanagement.ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
HeadersToLogs: pulumi.StringArray{
pulumi.String("string"),
},
},
FrontendRequest: &apimanagement.ApiDiagnosticFrontendRequestArgs{
BodyBytes: pulumi.Int(0),
DataMasking: &apimanagement.ApiDiagnosticFrontendRequestDataMaskingArgs{
Headers: apimanagement.ApiDiagnosticFrontendRequestDataMaskingHeaderArray{
&apimanagement.ApiDiagnosticFrontendRequestDataMaskingHeaderArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
QueryParams: apimanagement.ApiDiagnosticFrontendRequestDataMaskingQueryParamArray{
&apimanagement.ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
HeadersToLogs: pulumi.StringArray{
pulumi.String("string"),
},
},
AlwaysLogErrors: pulumi.Bool(false),
LogClientIp: pulumi.Bool(false),
OperationNameFormat: pulumi.String("string"),
BackendRequest: &apimanagement.ApiDiagnosticBackendRequestArgs{
BodyBytes: pulumi.Int(0),
DataMasking: &apimanagement.ApiDiagnosticBackendRequestDataMaskingArgs{
Headers: apimanagement.ApiDiagnosticBackendRequestDataMaskingHeaderArray{
&apimanagement.ApiDiagnosticBackendRequestDataMaskingHeaderArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
QueryParams: apimanagement.ApiDiagnosticBackendRequestDataMaskingQueryParamArray{
&apimanagement.ApiDiagnosticBackendRequestDataMaskingQueryParamArgs{
Mode: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
HeadersToLogs: pulumi.StringArray{
pulumi.String("string"),
},
},
SamplingPercentage: pulumi.Float64(0),
Verbosity: pulumi.String("string"),
})
var apiDiagnosticResource = new ApiDiagnostic("apiDiagnosticResource", ApiDiagnosticArgs.builder()
.identifier("string")
.apiManagementLoggerId("string")
.apiManagementName("string")
.apiName("string")
.resourceGroupName("string")
.httpCorrelationProtocol("string")
.backendResponse(ApiDiagnosticBackendResponseArgs.builder()
.bodyBytes(0)
.dataMasking(ApiDiagnosticBackendResponseDataMaskingArgs.builder()
.headers(ApiDiagnosticBackendResponseDataMaskingHeaderArgs.builder()
.mode("string")
.value("string")
.build())
.queryParams(ApiDiagnosticBackendResponseDataMaskingQueryParamArgs.builder()
.mode("string")
.value("string")
.build())
.build())
.headersToLogs("string")
.build())
.frontendResponse(ApiDiagnosticFrontendResponseArgs.builder()
.bodyBytes(0)
.dataMasking(ApiDiagnosticFrontendResponseDataMaskingArgs.builder()
.headers(ApiDiagnosticFrontendResponseDataMaskingHeaderArgs.builder()
.mode("string")
.value("string")
.build())
.queryParams(ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs.builder()
.mode("string")
.value("string")
.build())
.build())
.headersToLogs("string")
.build())
.frontendRequest(ApiDiagnosticFrontendRequestArgs.builder()
.bodyBytes(0)
.dataMasking(ApiDiagnosticFrontendRequestDataMaskingArgs.builder()
.headers(ApiDiagnosticFrontendRequestDataMaskingHeaderArgs.builder()
.mode("string")
.value("string")
.build())
.queryParams(ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs.builder()
.mode("string")
.value("string")
.build())
.build())
.headersToLogs("string")
.build())
.alwaysLogErrors(false)
.logClientIp(false)
.operationNameFormat("string")
.backendRequest(ApiDiagnosticBackendRequestArgs.builder()
.bodyBytes(0)
.dataMasking(ApiDiagnosticBackendRequestDataMaskingArgs.builder()
.headers(ApiDiagnosticBackendRequestDataMaskingHeaderArgs.builder()
.mode("string")
.value("string")
.build())
.queryParams(ApiDiagnosticBackendRequestDataMaskingQueryParamArgs.builder()
.mode("string")
.value("string")
.build())
.build())
.headersToLogs("string")
.build())
.samplingPercentage(0)
.verbosity("string")
.build());
api_diagnostic_resource = azure.apimanagement.ApiDiagnostic("apiDiagnosticResource",
identifier="string",
api_management_logger_id="string",
api_management_name="string",
api_name="string",
resource_group_name="string",
http_correlation_protocol="string",
backend_response=azure.apimanagement.ApiDiagnosticBackendResponseArgs(
body_bytes=0,
data_masking=azure.apimanagement.ApiDiagnosticBackendResponseDataMaskingArgs(
headers=[azure.apimanagement.ApiDiagnosticBackendResponseDataMaskingHeaderArgs(
mode="string",
value="string",
)],
query_params=[azure.apimanagement.ApiDiagnosticBackendResponseDataMaskingQueryParamArgs(
mode="string",
value="string",
)],
),
headers_to_logs=["string"],
),
frontend_response=azure.apimanagement.ApiDiagnosticFrontendResponseArgs(
body_bytes=0,
data_masking=azure.apimanagement.ApiDiagnosticFrontendResponseDataMaskingArgs(
headers=[azure.apimanagement.ApiDiagnosticFrontendResponseDataMaskingHeaderArgs(
mode="string",
value="string",
)],
query_params=[azure.apimanagement.ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs(
mode="string",
value="string",
)],
),
headers_to_logs=["string"],
),
frontend_request=azure.apimanagement.ApiDiagnosticFrontendRequestArgs(
body_bytes=0,
data_masking=azure.apimanagement.ApiDiagnosticFrontendRequestDataMaskingArgs(
headers=[azure.apimanagement.ApiDiagnosticFrontendRequestDataMaskingHeaderArgs(
mode="string",
value="string",
)],
query_params=[azure.apimanagement.ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs(
mode="string",
value="string",
)],
),
headers_to_logs=["string"],
),
always_log_errors=False,
log_client_ip=False,
operation_name_format="string",
backend_request=azure.apimanagement.ApiDiagnosticBackendRequestArgs(
body_bytes=0,
data_masking=azure.apimanagement.ApiDiagnosticBackendRequestDataMaskingArgs(
headers=[azure.apimanagement.ApiDiagnosticBackendRequestDataMaskingHeaderArgs(
mode="string",
value="string",
)],
query_params=[azure.apimanagement.ApiDiagnosticBackendRequestDataMaskingQueryParamArgs(
mode="string",
value="string",
)],
),
headers_to_logs=["string"],
),
sampling_percentage=0,
verbosity="string")
const apiDiagnosticResource = new azure.apimanagement.ApiDiagnostic("apiDiagnosticResource", {
identifier: "string",
apiManagementLoggerId: "string",
apiManagementName: "string",
apiName: "string",
resourceGroupName: "string",
httpCorrelationProtocol: "string",
backendResponse: {
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"],
},
frontendRequest: {
bodyBytes: 0,
dataMasking: {
headers: [{
mode: "string",
value: "string",
}],
queryParams: [{
mode: "string",
value: "string",
}],
},
headersToLogs: ["string"],
},
alwaysLogErrors: false,
logClientIp: false,
operationNameFormat: "string",
backendRequest: {
bodyBytes: 0,
dataMasking: {
headers: [{
mode: "string",
value: "string",
}],
queryParams: [{
mode: "string",
value: "string",
}],
},
headersToLogs: ["string"],
},
samplingPercentage: 0,
verbosity: "string",
});
type: azure:apimanagement:ApiDiagnostic
properties:
alwaysLogErrors: false
apiManagementLoggerId: string
apiManagementName: string
apiName: 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
ApiDiagnostic Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApiDiagnostic resource accepts the following input properties:
- Api
Management stringLogger Id - The ID (name) of the Diagnostics Logger.
- Api
Management stringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Api
Name string - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Identifier string
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - Resource
Group stringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Always
Log boolErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- Backend
Request ApiDiagnostic Backend Request - A
backend_request
block as defined below. - Backend
Response ApiDiagnostic Backend Response - A
backend_response
block as defined below. - Frontend
Request ApiDiagnostic Frontend Request - A
frontend_request
block as defined below. - Frontend
Response ApiDiagnostic Frontend Response - A
frontend_response
block as defined below. - Http
Correlation stringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - Log
Client boolIp - Log client IP address.
- Operation
Name stringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - Sampling
Percentage double - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - Verbosity string
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- Api
Management stringLogger Id - The ID (name) of the Diagnostics Logger.
- Api
Management stringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Api
Name string - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Identifier string
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - Resource
Group stringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Always
Log boolErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- Backend
Request ApiDiagnostic Backend Request Args - A
backend_request
block as defined below. - Backend
Response ApiDiagnostic Backend Response Args - A
backend_response
block as defined below. - Frontend
Request ApiDiagnostic Frontend Request Args - A
frontend_request
block as defined below. - Frontend
Response ApiDiagnostic Frontend Response Args - A
frontend_response
block as defined below. - Http
Correlation stringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - Log
Client boolIp - Log client IP address.
- Operation
Name stringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - Sampling
Percentage float64 - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - Verbosity string
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- api
Management StringLogger Id - The ID (name) of the Diagnostics Logger.
- api
Management StringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api
Name String - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- identifier String
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - resource
Group StringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- always
Log BooleanErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- backend
Request ApiDiagnostic Backend Request - A
backend_request
block as defined below. - backend
Response ApiDiagnostic Backend Response - A
backend_response
block as defined below. - frontend
Request ApiDiagnostic Frontend Request - A
frontend_request
block as defined below. - frontend
Response ApiDiagnostic Frontend Response - A
frontend_response
block as defined below. - http
Correlation StringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - log
Client BooleanIp - Log client IP address.
- operation
Name StringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - sampling
Percentage Double - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - verbosity String
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- api
Management stringLogger Id - The ID (name) of the Diagnostics Logger.
- api
Management stringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api
Name string - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- identifier string
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - resource
Group stringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- always
Log booleanErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- backend
Request ApiDiagnostic Backend Request - A
backend_request
block as defined below. - backend
Response ApiDiagnostic Backend Response - A
backend_response
block as defined below. - frontend
Request ApiDiagnostic Frontend Request - A
frontend_request
block as defined below. - frontend
Response ApiDiagnostic Frontend Response - A
frontend_response
block as defined below. - http
Correlation stringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - log
Client booleanIp - Log client IP address.
- operation
Name stringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - sampling
Percentage number - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - verbosity string
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- api_
management_ strlogger_ id - The ID (name) of the Diagnostics Logger.
- api_
management_ strname - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api_
name str - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- identifier str
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - resource_
group_ strname - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- always_
log_ boolerrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- backend_
request ApiDiagnostic Backend Request Args - A
backend_request
block as defined below. - backend_
response ApiDiagnostic Backend Response Args - A
backend_response
block as defined below. - frontend_
request ApiDiagnostic Frontend Request Args - A
frontend_request
block as defined below. - frontend_
response ApiDiagnostic Frontend Response Args - A
frontend_response
block as defined below. - http_
correlation_ strprotocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - log_
client_ boolip - Log client IP address.
- operation_
name_ strformat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - 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
and100.0
. - verbosity str
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- api
Management StringLogger Id - The ID (name) of the Diagnostics Logger.
- api
Management StringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api
Name String - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- identifier String
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - resource
Group StringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- always
Log BooleanErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- backend
Request Property Map - A
backend_request
block as defined below. - backend
Response Property Map - A
backend_response
block as defined below. - frontend
Request Property Map - A
frontend_request
block as defined below. - frontend
Response Property Map - A
frontend_response
block as defined below. - http
Correlation StringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - log
Client BooleanIp - Log client IP address.
- operation
Name StringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - sampling
Percentage Number - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - verbosity String
- Logging verbosity. Possible values are
verbose
,information
orerror
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiDiagnostic 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 ApiDiagnostic Resource
Get an existing ApiDiagnostic 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?: ApiDiagnosticState, opts?: CustomResourceOptions): ApiDiagnostic
@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,
api_name: Optional[str] = None,
backend_request: Optional[ApiDiagnosticBackendRequestArgs] = None,
backend_response: Optional[ApiDiagnosticBackendResponseArgs] = None,
frontend_request: Optional[ApiDiagnosticFrontendRequestArgs] = None,
frontend_response: Optional[ApiDiagnosticFrontendResponseArgs] = 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) -> ApiDiagnostic
func GetApiDiagnostic(ctx *Context, name string, id IDInput, state *ApiDiagnosticState, opts ...ResourceOption) (*ApiDiagnostic, error)
public static ApiDiagnostic Get(string name, Input<string> id, ApiDiagnosticState? state, CustomResourceOptions? opts = null)
public static ApiDiagnostic get(String name, Output<String> id, ApiDiagnosticState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Always
Log boolErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- Api
Management stringLogger Id - The ID (name) of the Diagnostics Logger.
- Api
Management stringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Api
Name string - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Backend
Request ApiDiagnostic Backend Request - A
backend_request
block as defined below. - Backend
Response ApiDiagnostic Backend Response - A
backend_response
block as defined below. - Frontend
Request ApiDiagnostic Frontend Request - A
frontend_request
block as defined below. - Frontend
Response ApiDiagnostic Frontend Response - A
frontend_response
block as defined below. - Http
Correlation stringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - Identifier string
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - Log
Client boolIp - Log client IP address.
- Operation
Name stringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - Resource
Group stringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Sampling
Percentage double - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - Verbosity string
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- Always
Log boolErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- Api
Management stringLogger Id - The ID (name) of the Diagnostics Logger.
- Api
Management stringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Api
Name string - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Backend
Request ApiDiagnostic Backend Request Args - A
backend_request
block as defined below. - Backend
Response ApiDiagnostic Backend Response Args - A
backend_response
block as defined below. - Frontend
Request ApiDiagnostic Frontend Request Args - A
frontend_request
block as defined below. - Frontend
Response ApiDiagnostic Frontend Response Args - A
frontend_response
block as defined below. - Http
Correlation stringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - Identifier string
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - Log
Client boolIp - Log client IP address.
- Operation
Name stringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - Resource
Group stringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- Sampling
Percentage float64 - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - Verbosity string
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- always
Log BooleanErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- api
Management StringLogger Id - The ID (name) of the Diagnostics Logger.
- api
Management StringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api
Name String - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- backend
Request ApiDiagnostic Backend Request - A
backend_request
block as defined below. - backend
Response ApiDiagnostic Backend Response - A
backend_response
block as defined below. - frontend
Request ApiDiagnostic Frontend Request - A
frontend_request
block as defined below. - frontend
Response ApiDiagnostic Frontend Response - A
frontend_response
block as defined below. - http
Correlation StringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - identifier String
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - log
Client BooleanIp - Log client IP address.
- operation
Name StringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - resource
Group StringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- sampling
Percentage Double - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - verbosity String
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- always
Log booleanErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- api
Management stringLogger Id - The ID (name) of the Diagnostics Logger.
- api
Management stringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api
Name string - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- backend
Request ApiDiagnostic Backend Request - A
backend_request
block as defined below. - backend
Response ApiDiagnostic Backend Response - A
backend_response
block as defined below. - frontend
Request ApiDiagnostic Frontend Request - A
frontend_request
block as defined below. - frontend
Response ApiDiagnostic Frontend Response - A
frontend_response
block as defined below. - http
Correlation stringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - identifier string
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - log
Client booleanIp - Log client IP address.
- operation
Name stringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - resource
Group stringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- sampling
Percentage number - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - verbosity string
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- always_
log_ boolerrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- api_
management_ strlogger_ id - The ID (name) of the Diagnostics Logger.
- api_
management_ strname - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api_
name str - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- backend_
request ApiDiagnostic Backend Request Args - A
backend_request
block as defined below. - backend_
response ApiDiagnostic Backend Response Args - A
backend_response
block as defined below. - frontend_
request ApiDiagnostic Frontend Request Args - A
frontend_request
block as defined below. - frontend_
response ApiDiagnostic Frontend Response Args - A
frontend_response
block as defined below. - http_
correlation_ strprotocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - identifier str
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - log_
client_ boolip - Log client IP address.
- operation_
name_ strformat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - resource_
group_ strname - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs 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
and100.0
. - verbosity str
- Logging verbosity. Possible values are
verbose
,information
orerror
.
- always
Log BooleanErrors - Always log errors. Send telemetry if there is an erroneous condition, regardless of sampling settings.
- api
Management StringLogger Id - The ID (name) of the Diagnostics Logger.
- api
Management StringName - The name of the API Management Service instance. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- api
Name String - The name of the API on which to configure the Diagnostics Logs. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- backend
Request Property Map - A
backend_request
block as defined below. - backend
Response Property Map - A
backend_response
block as defined below. - frontend
Request Property Map - A
frontend_request
block as defined below. - frontend
Response Property Map - A
frontend_response
block as defined below. - http
Correlation StringProtocol - The HTTP Correlation Protocol to use. Possible values are
None
,Legacy
orW3C
. - identifier String
- Identifier of the Diagnostics Logs. Possible values are
applicationinsights
andazuremonitor
. Changing this forces a new API Management Service API Diagnostics Logs to be created. - log
Client BooleanIp - Log client IP address.
- operation
Name StringFormat - The format of the Operation Name for Application Insights telemetries. Possible values are
Name
, andUrl
. Defaults toName
. - resource
Group StringName - The name of the Resource Group where the API Management Service API Diagnostics Logs should exist. Changing this forces a new API Management Service API Diagnostics Logs to be created.
- sampling
Percentage Number - Sampling (%). For high traffic APIs, please read this documentation to understand performance implications and log sampling. Valid values are between
0.0
and100.0
. - verbosity String
- Logging verbosity. Possible values are
verbose
,information
orerror
.
Supporting Types
ApiDiagnosticBackendRequest, ApiDiagnosticBackendRequestArgs
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Backend Request Data Masking - A
data_masking
block as defined below. - Headers
To List<string>Logs - Specifies a list of headers to log.
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Backend Request Data Masking - A
data_masking
block as defined below. - Headers
To []stringLogs - Specifies a list of headers to log.
- body
Bytes Integer - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Backend Request Data Masking - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
- body
Bytes number - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Backend Request Data Masking - A
data_masking
block as defined below. - headers
To string[]Logs - Specifies a list of headers to log.
- body_
bytes int - Number of payload bytes to log (up to 8192).
- data_
masking ApiDiagnostic Backend Request Data Masking - A
data_masking
block as defined below. - headers_
to_ Sequence[str]logs - Specifies a list of headers to log.
- body
Bytes Number - Number of payload bytes to log (up to 8192).
- data
Masking Property Map - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
ApiDiagnosticBackendRequestDataMasking, ApiDiagnosticBackendRequestDataMaskingArgs
- Headers
List<Api
Diagnostic Backend Request Data Masking Header> - A
headers
block as defined below. - Query
Params List<ApiDiagnostic Backend Request Data Masking Query Param> - A
query_params
block as defined below.
- Headers
[]Api
Diagnostic Backend Request Data Masking Header - A
headers
block as defined below. - Query
Params []ApiDiagnostic Backend Request Data Masking Query Param - A
query_params
block as defined below.
- headers
List<Api
Diagnostic Backend Request Data Masking Header> - A
headers
block as defined below. - query
Params List<ApiDiagnostic Backend Request Data Masking Query Param> - A
query_params
block as defined below.
- headers
Api
Diagnostic Backend Request Data Masking Header[] - A
headers
block as defined below. - query
Params ApiDiagnostic Backend Request Data Masking Query Param[] - A
query_params
block as defined below.
- headers
Sequence[Api
Diagnostic Backend Request Data Masking Header] - A
headers
block as defined below. - query_
params Sequence[ApiDiagnostic Backend Request Data Masking Query Param] - A
query_params
block as defined below.
- headers List<Property Map>
- A
headers
block as defined below. - query
Params List<Property Map> - A
query_params
block as defined below.
ApiDiagnosticBackendRequestDataMaskingHeader, ApiDiagnosticBackendRequestDataMaskingHeaderArgs
ApiDiagnosticBackendRequestDataMaskingQueryParam, ApiDiagnosticBackendRequestDataMaskingQueryParamArgs
ApiDiagnosticBackendResponse, ApiDiagnosticBackendResponseArgs
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Backend Response Data Masking - A
data_masking
block as defined below. - Headers
To List<string>Logs - Specifies a list of headers to log.
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Backend Response Data Masking - A
data_masking
block as defined below. - Headers
To []stringLogs - Specifies a list of headers to log.
- body
Bytes Integer - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Backend Response Data Masking - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
- body
Bytes number - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Backend Response Data Masking - A
data_masking
block as defined below. - headers
To string[]Logs - Specifies a list of headers to log.
- body_
bytes int - Number of payload bytes to log (up to 8192).
- data_
masking ApiDiagnostic Backend Response Data Masking - A
data_masking
block as defined below. - headers_
to_ Sequence[str]logs - Specifies a list of headers to log.
- body
Bytes Number - Number of payload bytes to log (up to 8192).
- data
Masking Property Map - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
ApiDiagnosticBackendResponseDataMasking, ApiDiagnosticBackendResponseDataMaskingArgs
- Headers
List<Api
Diagnostic Backend Response Data Masking Header> - A
headers
block as defined below. - Query
Params List<ApiDiagnostic Backend Response Data Masking Query Param> - A
query_params
block as defined below.
- Headers
[]Api
Diagnostic Backend Response Data Masking Header - A
headers
block as defined below. - Query
Params []ApiDiagnostic Backend Response Data Masking Query Param - A
query_params
block as defined below.
- headers
List<Api
Diagnostic Backend Response Data Masking Header> - A
headers
block as defined below. - query
Params List<ApiDiagnostic Backend Response Data Masking Query Param> - A
query_params
block as defined below.
- headers
Api
Diagnostic Backend Response Data Masking Header[] - A
headers
block as defined below. - query
Params ApiDiagnostic Backend Response Data Masking Query Param[] - A
query_params
block as defined below.
- headers
Sequence[Api
Diagnostic Backend Response Data Masking Header] - A
headers
block as defined below. - query_
params Sequence[ApiDiagnostic Backend Response Data Masking Query Param] - A
query_params
block as defined below.
- headers List<Property Map>
- A
headers
block as defined below. - query
Params List<Property Map> - A
query_params
block as defined below.
ApiDiagnosticBackendResponseDataMaskingHeader, ApiDiagnosticBackendResponseDataMaskingHeaderArgs
ApiDiagnosticBackendResponseDataMaskingQueryParam, ApiDiagnosticBackendResponseDataMaskingQueryParamArgs
ApiDiagnosticFrontendRequest, ApiDiagnosticFrontendRequestArgs
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Frontend Request Data Masking - A
data_masking
block as defined below. - Headers
To List<string>Logs - Specifies a list of headers to log.
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Frontend Request Data Masking - A
data_masking
block as defined below. - Headers
To []stringLogs - Specifies a list of headers to log.
- body
Bytes Integer - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Frontend Request Data Masking - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
- body
Bytes number - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Frontend Request Data Masking - A
data_masking
block as defined below. - headers
To string[]Logs - Specifies a list of headers to log.
- body_
bytes int - Number of payload bytes to log (up to 8192).
- data_
masking ApiDiagnostic Frontend Request Data Masking - A
data_masking
block as defined below. - headers_
to_ Sequence[str]logs - Specifies a list of headers to log.
- body
Bytes Number - Number of payload bytes to log (up to 8192).
- data
Masking Property Map - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
ApiDiagnosticFrontendRequestDataMasking, ApiDiagnosticFrontendRequestDataMaskingArgs
- Headers
List<Api
Diagnostic Frontend Request Data Masking Header> - A
headers
block as defined below. - Query
Params List<ApiDiagnostic Frontend Request Data Masking Query Param> - A
query_params
block as defined below.
- Headers
[]Api
Diagnostic Frontend Request Data Masking Header - A
headers
block as defined below. - Query
Params []ApiDiagnostic Frontend Request Data Masking Query Param - A
query_params
block as defined below.
- headers
List<Api
Diagnostic Frontend Request Data Masking Header> - A
headers
block as defined below. - query
Params List<ApiDiagnostic Frontend Request Data Masking Query Param> - A
query_params
block as defined below.
- headers
Api
Diagnostic Frontend Request Data Masking Header[] - A
headers
block as defined below. - query
Params ApiDiagnostic Frontend Request Data Masking Query Param[] - A
query_params
block as defined below.
- headers
Sequence[Api
Diagnostic Frontend Request Data Masking Header] - A
headers
block as defined below. - query_
params Sequence[ApiDiagnostic Frontend Request Data Masking Query Param] - A
query_params
block as defined below.
- headers List<Property Map>
- A
headers
block as defined below. - query
Params List<Property Map> - A
query_params
block as defined below.
ApiDiagnosticFrontendRequestDataMaskingHeader, ApiDiagnosticFrontendRequestDataMaskingHeaderArgs
ApiDiagnosticFrontendRequestDataMaskingQueryParam, ApiDiagnosticFrontendRequestDataMaskingQueryParamArgs
ApiDiagnosticFrontendResponse, ApiDiagnosticFrontendResponseArgs
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Frontend Response Data Masking - A
data_masking
block as defined below. - Headers
To List<string>Logs - Specifies a list of headers to log.
- Body
Bytes int - Number of payload bytes to log (up to 8192).
- Data
Masking ApiDiagnostic Frontend Response Data Masking - A
data_masking
block as defined below. - Headers
To []stringLogs - Specifies a list of headers to log.
- body
Bytes Integer - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Frontend Response Data Masking - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
- body
Bytes number - Number of payload bytes to log (up to 8192).
- data
Masking ApiDiagnostic Frontend Response Data Masking - A
data_masking
block as defined below. - headers
To string[]Logs - Specifies a list of headers to log.
- body_
bytes int - Number of payload bytes to log (up to 8192).
- data_
masking ApiDiagnostic Frontend Response Data Masking - A
data_masking
block as defined below. - headers_
to_ Sequence[str]logs - Specifies a list of headers to log.
- body
Bytes Number - Number of payload bytes to log (up to 8192).
- data
Masking Property Map - A
data_masking
block as defined below. - headers
To List<String>Logs - Specifies a list of headers to log.
ApiDiagnosticFrontendResponseDataMasking, ApiDiagnosticFrontendResponseDataMaskingArgs
- Headers
List<Api
Diagnostic Frontend Response Data Masking Header> - A
headers
block as defined below. - Query
Params List<ApiDiagnostic Frontend Response Data Masking Query Param> - A
query_params
block as defined below.
- Headers
[]Api
Diagnostic Frontend Response Data Masking Header - A
headers
block as defined below. - Query
Params []ApiDiagnostic Frontend Response Data Masking Query Param - A
query_params
block as defined below.
- headers
List<Api
Diagnostic Frontend Response Data Masking Header> - A
headers
block as defined below. - query
Params List<ApiDiagnostic Frontend Response Data Masking Query Param> - A
query_params
block as defined below.
- headers
Api
Diagnostic Frontend Response Data Masking Header[] - A
headers
block as defined below. - query
Params ApiDiagnostic Frontend Response Data Masking Query Param[] - A
query_params
block as defined below.
- headers
Sequence[Api
Diagnostic Frontend Response Data Masking Header] - A
headers
block as defined below. - query_
params Sequence[ApiDiagnostic Frontend Response Data Masking Query Param] - A
query_params
block as defined below.
- headers List<Property Map>
- A
headers
block as defined below. - query
Params List<Property Map> - A
query_params
block as defined below.
ApiDiagnosticFrontendResponseDataMaskingHeader, ApiDiagnosticFrontendResponseDataMaskingHeaderArgs
ApiDiagnosticFrontendResponseDataMaskingQueryParam, ApiDiagnosticFrontendResponseDataMaskingQueryParamArgs
Import
API Management Service API Diagnostics Logs can be imported using the resource id
, e.g.
$ pulumi import azure:apimanagement/apiDiagnostic:ApiDiagnostic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/diagnostics/diagnostic1
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.