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

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

There is a newer version: 2.78.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.apimanagement.enums.AlwaysLog;
import com.pulumi.azurenative.apimanagement.enums.HttpCorrelationProtocol;
import com.pulumi.azurenative.apimanagement.enums.OperationNameFormat;
import com.pulumi.azurenative.apimanagement.enums.Verbosity;
import com.pulumi.azurenative.apimanagement.inputs.PipelineDiagnosticSettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.SamplingSettingsArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DiagnosticArgs extends com.pulumi.resources.ResourceArgs {

    public static final DiagnosticArgs Empty = new DiagnosticArgs();

    /**
     * Specifies for what type of messages sampling settings should not apply.
     * 
     */
    @Import(name="alwaysLog")
    private @Nullable Output> alwaysLog;

    /**
     * @return Specifies for what type of messages sampling settings should not apply.
     * 
     */
    public Optional>> alwaysLog() {
        return Optional.ofNullable(this.alwaysLog);
    }

    /**
     * Diagnostic settings for incoming/outgoing HTTP messages to the Backend
     * 
     */
    @Import(name="backend")
    private @Nullable Output backend;

    /**
     * @return Diagnostic settings for incoming/outgoing HTTP messages to the Backend
     * 
     */
    public Optional> backend() {
        return Optional.ofNullable(this.backend);
    }

    /**
     * Diagnostic identifier. Must be unique in the current API Management service instance.
     * 
     */
    @Import(name="diagnosticId")
    private @Nullable Output diagnosticId;

    /**
     * @return Diagnostic identifier. Must be unique in the current API Management service instance.
     * 
     */
    public Optional> diagnosticId() {
        return Optional.ofNullable(this.diagnosticId);
    }

    /**
     * Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
     * 
     */
    @Import(name="frontend")
    private @Nullable Output frontend;

    /**
     * @return Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
     * 
     */
    public Optional> frontend() {
        return Optional.ofNullable(this.frontend);
    }

    /**
     * Sets correlation protocol to use for Application Insights diagnostics.
     * 
     */
    @Import(name="httpCorrelationProtocol")
    private @Nullable Output> httpCorrelationProtocol;

    /**
     * @return Sets correlation protocol to use for Application Insights diagnostics.
     * 
     */
    public Optional>> httpCorrelationProtocol() {
        return Optional.ofNullable(this.httpCorrelationProtocol);
    }

    /**
     * Log the ClientIP. Default is false.
     * 
     */
    @Import(name="logClientIp")
    private @Nullable Output logClientIp;

    /**
     * @return Log the ClientIP. Default is false.
     * 
     */
    public Optional> logClientIp() {
        return Optional.ofNullable(this.logClientIp);
    }

    /**
     * Resource Id of a target logger.
     * 
     */
    @Import(name="loggerId", required=true)
    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.
     * 
     */
    @Import(name="metrics")
    private @Nullable Output metrics;

    /**
     * @return Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
     * 
     */
    public Optional> metrics() {
        return Optional.ofNullable(this.metrics);
    }

    /**
     * The format of the Operation Name for Application Insights telemetries. Default is Name.
     * 
     */
    @Import(name="operationNameFormat")
    private @Nullable Output> operationNameFormat;

    /**
     * @return The format of the Operation Name for Application Insights telemetries. Default is Name.
     * 
     */
    public Optional>> operationNameFormat() {
        return Optional.ofNullable(this.operationNameFormat);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Sampling settings for Diagnostic.
     * 
     */
    @Import(name="sampling")
    private @Nullable Output sampling;

    /**
     * @return Sampling settings for Diagnostic.
     * 
     */
    public Optional> sampling() {
        return Optional.ofNullable(this.sampling);
    }

    /**
     * The name of the API Management service.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The name of the API Management service.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    /**
     * The verbosity level applied to traces emitted by trace policies.
     * 
     */
    @Import(name="verbosity")
    private @Nullable Output> verbosity;

    /**
     * @return The verbosity level applied to traces emitted by trace policies.
     * 
     */
    public Optional>> verbosity() {
        return Optional.ofNullable(this.verbosity);
    }

    private DiagnosticArgs() {}

    private DiagnosticArgs(DiagnosticArgs $) {
        this.alwaysLog = $.alwaysLog;
        this.backend = $.backend;
        this.diagnosticId = $.diagnosticId;
        this.frontend = $.frontend;
        this.httpCorrelationProtocol = $.httpCorrelationProtocol;
        this.logClientIp = $.logClientIp;
        this.loggerId = $.loggerId;
        this.metrics = $.metrics;
        this.operationNameFormat = $.operationNameFormat;
        this.resourceGroupName = $.resourceGroupName;
        this.sampling = $.sampling;
        this.serviceName = $.serviceName;
        this.verbosity = $.verbosity;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(DiagnosticArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private DiagnosticArgs $;

        public Builder() {
            $ = new DiagnosticArgs();
        }

        public Builder(DiagnosticArgs defaults) {
            $ = new DiagnosticArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param alwaysLog Specifies for what type of messages sampling settings should not apply.
         * 
         * @return builder
         * 
         */
        public Builder alwaysLog(@Nullable Output> alwaysLog) {
            $.alwaysLog = alwaysLog;
            return this;
        }

        /**
         * @param alwaysLog Specifies for what type of messages sampling settings should not apply.
         * 
         * @return builder
         * 
         */
        public Builder alwaysLog(Either alwaysLog) {
            return alwaysLog(Output.of(alwaysLog));
        }

        /**
         * @param alwaysLog Specifies for what type of messages sampling settings should not apply.
         * 
         * @return builder
         * 
         */
        public Builder alwaysLog(String alwaysLog) {
            return alwaysLog(Either.ofLeft(alwaysLog));
        }

        /**
         * @param alwaysLog Specifies for what type of messages sampling settings should not apply.
         * 
         * @return builder
         * 
         */
        public Builder alwaysLog(AlwaysLog alwaysLog) {
            return alwaysLog(Either.ofRight(alwaysLog));
        }

        /**
         * @param backend Diagnostic settings for incoming/outgoing HTTP messages to the Backend
         * 
         * @return builder
         * 
         */
        public Builder backend(@Nullable Output backend) {
            $.backend = backend;
            return this;
        }

        /**
         * @param backend Diagnostic settings for incoming/outgoing HTTP messages to the Backend
         * 
         * @return builder
         * 
         */
        public Builder backend(PipelineDiagnosticSettingsArgs backend) {
            return backend(Output.of(backend));
        }

        /**
         * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder diagnosticId(@Nullable Output diagnosticId) {
            $.diagnosticId = diagnosticId;
            return this;
        }

        /**
         * @param diagnosticId Diagnostic identifier. Must be unique in the current API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder diagnosticId(String diagnosticId) {
            return diagnosticId(Output.of(diagnosticId));
        }

        /**
         * @param frontend Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
         * 
         * @return builder
         * 
         */
        public Builder frontend(@Nullable Output frontend) {
            $.frontend = frontend;
            return this;
        }

        /**
         * @param frontend Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
         * 
         * @return builder
         * 
         */
        public Builder frontend(PipelineDiagnosticSettingsArgs frontend) {
            return frontend(Output.of(frontend));
        }

        /**
         * @param httpCorrelationProtocol Sets correlation protocol to use for Application Insights diagnostics.
         * 
         * @return builder
         * 
         */
        public Builder httpCorrelationProtocol(@Nullable Output> httpCorrelationProtocol) {
            $.httpCorrelationProtocol = httpCorrelationProtocol;
            return this;
        }

        /**
         * @param httpCorrelationProtocol Sets correlation protocol to use for Application Insights diagnostics.
         * 
         * @return builder
         * 
         */
        public Builder httpCorrelationProtocol(Either httpCorrelationProtocol) {
            return httpCorrelationProtocol(Output.of(httpCorrelationProtocol));
        }

        /**
         * @param httpCorrelationProtocol Sets correlation protocol to use for Application Insights diagnostics.
         * 
         * @return builder
         * 
         */
        public Builder httpCorrelationProtocol(String httpCorrelationProtocol) {
            return httpCorrelationProtocol(Either.ofLeft(httpCorrelationProtocol));
        }

        /**
         * @param httpCorrelationProtocol Sets correlation protocol to use for Application Insights diagnostics.
         * 
         * @return builder
         * 
         */
        public Builder httpCorrelationProtocol(HttpCorrelationProtocol httpCorrelationProtocol) {
            return httpCorrelationProtocol(Either.ofRight(httpCorrelationProtocol));
        }

        /**
         * @param logClientIp Log the ClientIP. Default is false.
         * 
         * @return builder
         * 
         */
        public Builder logClientIp(@Nullable Output logClientIp) {
            $.logClientIp = logClientIp;
            return this;
        }

        /**
         * @param logClientIp Log the ClientIP. Default is false.
         * 
         * @return builder
         * 
         */
        public Builder logClientIp(Boolean logClientIp) {
            return logClientIp(Output.of(logClientIp));
        }

        /**
         * @param loggerId Resource Id of a target logger.
         * 
         * @return builder
         * 
         */
        public Builder loggerId(Output loggerId) {
            $.loggerId = loggerId;
            return this;
        }

        /**
         * @param loggerId Resource Id of a target logger.
         * 
         * @return builder
         * 
         */
        public Builder loggerId(String loggerId) {
            return loggerId(Output.of(loggerId));
        }

        /**
         * @param metrics Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
         * 
         * @return builder
         * 
         */
        public Builder metrics(@Nullable Output metrics) {
            $.metrics = metrics;
            return this;
        }

        /**
         * @param metrics Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.
         * 
         * @return builder
         * 
         */
        public Builder metrics(Boolean metrics) {
            return metrics(Output.of(metrics));
        }

        /**
         * @param operationNameFormat The format of the Operation Name for Application Insights telemetries. Default is Name.
         * 
         * @return builder
         * 
         */
        public Builder operationNameFormat(@Nullable Output> operationNameFormat) {
            $.operationNameFormat = operationNameFormat;
            return this;
        }

        /**
         * @param operationNameFormat The format of the Operation Name for Application Insights telemetries. Default is Name.
         * 
         * @return builder
         * 
         */
        public Builder operationNameFormat(Either operationNameFormat) {
            return operationNameFormat(Output.of(operationNameFormat));
        }

        /**
         * @param operationNameFormat The format of the Operation Name for Application Insights telemetries. Default is Name.
         * 
         * @return builder
         * 
         */
        public Builder operationNameFormat(String operationNameFormat) {
            return operationNameFormat(Either.ofLeft(operationNameFormat));
        }

        /**
         * @param operationNameFormat The format of the Operation Name for Application Insights telemetries. Default is Name.
         * 
         * @return builder
         * 
         */
        public Builder operationNameFormat(OperationNameFormat operationNameFormat) {
            return operationNameFormat(Either.ofRight(operationNameFormat));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param sampling Sampling settings for Diagnostic.
         * 
         * @return builder
         * 
         */
        public Builder sampling(@Nullable Output sampling) {
            $.sampling = sampling;
            return this;
        }

        /**
         * @param sampling Sampling settings for Diagnostic.
         * 
         * @return builder
         * 
         */
        public Builder sampling(SamplingSettingsArgs sampling) {
            return sampling(Output.of(sampling));
        }

        /**
         * @param serviceName The name of the API Management service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The name of the API Management service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        /**
         * @param verbosity The verbosity level applied to traces emitted by trace policies.
         * 
         * @return builder
         * 
         */
        public Builder verbosity(@Nullable Output> verbosity) {
            $.verbosity = verbosity;
            return this;
        }

        /**
         * @param verbosity The verbosity level applied to traces emitted by trace policies.
         * 
         * @return builder
         * 
         */
        public Builder verbosity(Either verbosity) {
            return verbosity(Output.of(verbosity));
        }

        /**
         * @param verbosity The verbosity level applied to traces emitted by trace policies.
         * 
         * @return builder
         * 
         */
        public Builder verbosity(String verbosity) {
            return verbosity(Either.ofLeft(verbosity));
        }

        /**
         * @param verbosity The verbosity level applied to traces emitted by trace policies.
         * 
         * @return builder
         * 
         */
        public Builder verbosity(Verbosity verbosity) {
            return verbosity(Either.ofRight(verbosity));
        }

        public DiagnosticArgs build() {
            if ($.loggerId == null) {
                throw new MissingRequiredPropertyException("DiagnosticArgs", "loggerId");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("DiagnosticArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("DiagnosticArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy