com.pulumi.azurenative.apimanagement.Diagnostic Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.apimanagement;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.apimanagement.DiagnosticArgs;
import com.pulumi.azurenative.apimanagement.outputs.PipelineDiagnosticSettingsResponse;
import com.pulumi.azurenative.apimanagement.outputs.SamplingSettingsResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Diagnostic details.
* Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
*
* Other available API versions: 2018-01-01, 2019-01-01, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
*
* ## Example Usage
* ### ApiManagementCreateDiagnostic
*
*
* {@code
* 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 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 diagnostic = new Diagnostic("diagnostic", DiagnosticArgs.builder()
* .alwaysLog("allErrors")
* .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("/loggers/azuremonitor")
* .resourceGroupName("rg1")
* .sampling(SamplingSettingsArgs.builder()
* .percentage(50)
* .samplingType("fixed")
* .build())
* .serviceName("apimService1")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:apimanagement:Diagnostic applicationinsights /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}
* ```
*
*/
@ResourceType(type="azure-native:apimanagement:Diagnostic")
public class Diagnostic extends com.pulumi.resources.CustomResource {
/**
* Specifies for what type of messages sampling settings should not apply.
*
*/
@Export(name="alwaysLog", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> alwaysLog;
/**
* @return Specifies for what type of messages sampling settings should not apply.
*
*/
public Output> alwaysLog() {
return Codegen.optional(this.alwaysLog);
}
/**
* Diagnostic settings for incoming/outgoing HTTP messages to the Backend
*
*/
@Export(name="backend", refs={PipelineDiagnosticSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ PipelineDiagnosticSettingsResponse> backend;
/**
* @return Diagnostic settings for incoming/outgoing HTTP messages to the Backend
*
*/
public Output> backend() {
return Codegen.optional(this.backend);
}
/**
* Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
*
*/
@Export(name="frontend", refs={PipelineDiagnosticSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ PipelineDiagnosticSettingsResponse> frontend;
/**
* @return Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
*
*/
public Output> frontend() {
return Codegen.optional(this.frontend);
}
/**
* Sets correlation protocol to use for Application Insights diagnostics.
*
*/
@Export(name="httpCorrelationProtocol", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> httpCorrelationProtocol;
/**
* @return Sets correlation protocol to use for Application Insights diagnostics.
*
*/
public Output> httpCorrelationProtocol() {
return Codegen.optional(this.httpCorrelationProtocol);
}
/**
* Log the ClientIP. Default is false.
*
*/
@Export(name="logClientIp", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> logClientIp;
/**
* @return Log the ClientIP. Default is false.
*
*/
public Output> logClientIp() {
return Codegen.optional(this.logClientIp);
}
/**
* Resource Id of a target logger.
*
*/
@Export(name="loggerId", refs={String.class}, tree="[0]")
private Output loggerId;
/**
* @return Resource Id of a target logger.
*
*/
public Output loggerId() {
return this.loggerId;
}
/**
* Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
*
*/
@Export(name="metrics", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> metrics;
/**
* @return Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
*
*/
public Output> metrics() {
return Codegen.optional(this.metrics);
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* The format of the Operation Name for Application Insights telemetries. Default is Name.
*
*/
@Export(name="operationNameFormat", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> operationNameFormat;
/**
* @return The format of the Operation Name for Application Insights telemetries. Default is Name.
*
*/
public Output> operationNameFormat() {
return Codegen.optional(this.operationNameFormat);
}
/**
* Sampling settings for Diagnostic.
*
*/
@Export(name="sampling", refs={SamplingSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ SamplingSettingsResponse> sampling;
/**
* @return Sampling settings for Diagnostic.
*
*/
public Output> sampling() {
return Codegen.optional(this.sampling);
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
* The verbosity level applied to traces emitted by trace policies.
*
*/
@Export(name="verbosity", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> verbosity;
/**
* @return The verbosity level applied to traces emitted by trace policies.
*
*/
public Output> verbosity() {
return Codegen.optional(this.verbosity);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Diagnostic(java.lang.String name) {
this(name, DiagnosticArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Diagnostic(java.lang.String name, DiagnosticArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Diagnostic(java.lang.String name, DiagnosticArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:apimanagement:Diagnostic", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Diagnostic(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:apimanagement:Diagnostic", name, null, makeResourceOptions(options, id), false);
}
private static DiagnosticArgs makeArgs(DiagnosticArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? DiagnosticArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:apimanagement/v20170301:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20180101:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20180601preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20190101:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20191201:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20191201preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20200601preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20201201:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20210101preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20210401preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20210801:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20211201preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20220401preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20220801:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20220901preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20230301preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20230501preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20230901preview:Diagnostic").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20240501:Diagnostic").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Diagnostic get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Diagnostic(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy