All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.apimanagement.WorkspaceDiagnostic Maven / Gradle / Ivy

There is a newer version: 2.72.0
Show newest version
// *** 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.WorkspaceDiagnosticArgs;
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: 2023-09-01-preview.
 * 
 * Other available API versions: 2024-05-01.
 * 
 * ## Example Usage
 * ### ApiManagementCreateWorkspaceDiagnostic
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.apimanagement.WorkspaceDiagnostic;
 * import com.pulumi.azurenative.apimanagement.WorkspaceDiagnosticArgs;
 * 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 workspaceDiagnostic = new WorkspaceDiagnostic("workspaceDiagnostic", WorkspaceDiagnosticArgs.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("/workspaces/wks1/loggers/azuremonitor")
 *             .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. * * ```sh * $ pulumi import azure-native:apimanagement:WorkspaceDiagnostic applicationinsights /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} * ``` * */ @ResourceType(type="azure-native:apimanagement:WorkspaceDiagnostic") public class WorkspaceDiagnostic 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 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 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 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 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 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 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 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 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 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 WorkspaceDiagnostic(java.lang.String name) { this(name, WorkspaceDiagnosticArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public WorkspaceDiagnostic(java.lang.String name, WorkspaceDiagnosticArgs 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 WorkspaceDiagnostic(java.lang.String name, WorkspaceDiagnosticArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:apimanagement:WorkspaceDiagnostic", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private WorkspaceDiagnostic(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:apimanagement:WorkspaceDiagnostic", name, null, makeResourceOptions(options, id), false); } private static WorkspaceDiagnosticArgs makeArgs(WorkspaceDiagnosticArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WorkspaceDiagnosticArgs.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/v20230901preview:WorkspaceDiagnostic").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20240501:WorkspaceDiagnostic").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 WorkspaceDiagnostic get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new WorkspaceDiagnostic(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy