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

com.pulumi.azurenative.network.inputs.MonitorConfigArgs 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.network.inputs;

import com.pulumi.azurenative.network.enums.MonitorProtocol;
import com.pulumi.azurenative.network.enums.ProfileMonitorStatus;
import com.pulumi.azurenative.network.inputs.MonitorConfigCustomHeadersArgs;
import com.pulumi.azurenative.network.inputs.MonitorConfigExpectedStatusCodeRangesArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Double;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Class containing endpoint monitoring settings in a Traffic Manager profile.
 * 
 */
public final class MonitorConfigArgs extends com.pulumi.resources.ResourceArgs {

    public static final MonitorConfigArgs Empty = new MonitorConfigArgs();

    /**
     * List of custom headers.
     * 
     */
    @Import(name="customHeaders")
    private @Nullable Output> customHeaders;

    /**
     * @return List of custom headers.
     * 
     */
    public Optional>> customHeaders() {
        return Optional.ofNullable(this.customHeaders);
    }

    /**
     * List of expected status code ranges.
     * 
     */
    @Import(name="expectedStatusCodeRanges")
    private @Nullable Output> expectedStatusCodeRanges;

    /**
     * @return List of expected status code ranges.
     * 
     */
    public Optional>> expectedStatusCodeRanges() {
        return Optional.ofNullable(this.expectedStatusCodeRanges);
    }

    /**
     * The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.
     * 
     */
    @Import(name="intervalInSeconds")
    private @Nullable Output intervalInSeconds;

    /**
     * @return The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.
     * 
     */
    public Optional> intervalInSeconds() {
        return Optional.ofNullable(this.intervalInSeconds);
    }

    /**
     * The path relative to the endpoint domain name used to probe for endpoint health.
     * 
     */
    @Import(name="path")
    private @Nullable Output path;

    /**
     * @return The path relative to the endpoint domain name used to probe for endpoint health.
     * 
     */
    public Optional> path() {
        return Optional.ofNullable(this.path);
    }

    /**
     * The TCP port used to probe for endpoint health.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @return The TCP port used to probe for endpoint health.
     * 
     */
    public Optional> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * The profile-level monitoring status of the Traffic Manager profile.
     * 
     */
    @Import(name="profileMonitorStatus")
    private @Nullable Output> profileMonitorStatus;

    /**
     * @return The profile-level monitoring status of the Traffic Manager profile.
     * 
     */
    public Optional>> profileMonitorStatus() {
        return Optional.ofNullable(this.profileMonitorStatus);
    }

    /**
     * The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
     * 
     */
    @Import(name="protocol")
    private @Nullable Output> protocol;

    /**
     * @return The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
     * 
     */
    public Optional>> protocol() {
        return Optional.ofNullable(this.protocol);
    }

    /**
     * The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.
     * 
     */
    @Import(name="timeoutInSeconds")
    private @Nullable Output timeoutInSeconds;

    /**
     * @return The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.
     * 
     */
    public Optional> timeoutInSeconds() {
        return Optional.ofNullable(this.timeoutInSeconds);
    }

    /**
     * The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.
     * 
     */
    @Import(name="toleratedNumberOfFailures")
    private @Nullable Output toleratedNumberOfFailures;

    /**
     * @return The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.
     * 
     */
    public Optional> toleratedNumberOfFailures() {
        return Optional.ofNullable(this.toleratedNumberOfFailures);
    }

    private MonitorConfigArgs() {}

    private MonitorConfigArgs(MonitorConfigArgs $) {
        this.customHeaders = $.customHeaders;
        this.expectedStatusCodeRanges = $.expectedStatusCodeRanges;
        this.intervalInSeconds = $.intervalInSeconds;
        this.path = $.path;
        this.port = $.port;
        this.profileMonitorStatus = $.profileMonitorStatus;
        this.protocol = $.protocol;
        this.timeoutInSeconds = $.timeoutInSeconds;
        this.toleratedNumberOfFailures = $.toleratedNumberOfFailures;
    }

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

    public static final class Builder {
        private MonitorConfigArgs $;

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

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

        /**
         * @param customHeaders List of custom headers.
         * 
         * @return builder
         * 
         */
        public Builder customHeaders(@Nullable Output> customHeaders) {
            $.customHeaders = customHeaders;
            return this;
        }

        /**
         * @param customHeaders List of custom headers.
         * 
         * @return builder
         * 
         */
        public Builder customHeaders(List customHeaders) {
            return customHeaders(Output.of(customHeaders));
        }

        /**
         * @param customHeaders List of custom headers.
         * 
         * @return builder
         * 
         */
        public Builder customHeaders(MonitorConfigCustomHeadersArgs... customHeaders) {
            return customHeaders(List.of(customHeaders));
        }

        /**
         * @param expectedStatusCodeRanges List of expected status code ranges.
         * 
         * @return builder
         * 
         */
        public Builder expectedStatusCodeRanges(@Nullable Output> expectedStatusCodeRanges) {
            $.expectedStatusCodeRanges = expectedStatusCodeRanges;
            return this;
        }

        /**
         * @param expectedStatusCodeRanges List of expected status code ranges.
         * 
         * @return builder
         * 
         */
        public Builder expectedStatusCodeRanges(List expectedStatusCodeRanges) {
            return expectedStatusCodeRanges(Output.of(expectedStatusCodeRanges));
        }

        /**
         * @param expectedStatusCodeRanges List of expected status code ranges.
         * 
         * @return builder
         * 
         */
        public Builder expectedStatusCodeRanges(MonitorConfigExpectedStatusCodeRangesArgs... expectedStatusCodeRanges) {
            return expectedStatusCodeRanges(List.of(expectedStatusCodeRanges));
        }

        /**
         * @param intervalInSeconds The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.
         * 
         * @return builder
         * 
         */
        public Builder intervalInSeconds(@Nullable Output intervalInSeconds) {
            $.intervalInSeconds = intervalInSeconds;
            return this;
        }

        /**
         * @param intervalInSeconds The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile.
         * 
         * @return builder
         * 
         */
        public Builder intervalInSeconds(Double intervalInSeconds) {
            return intervalInSeconds(Output.of(intervalInSeconds));
        }

        /**
         * @param path The path relative to the endpoint domain name used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder path(@Nullable Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path The path relative to the endpoint domain name used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param port The TCP port used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The TCP port used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder port(Double port) {
            return port(Output.of(port));
        }

        /**
         * @param profileMonitorStatus The profile-level monitoring status of the Traffic Manager profile.
         * 
         * @return builder
         * 
         */
        public Builder profileMonitorStatus(@Nullable Output> profileMonitorStatus) {
            $.profileMonitorStatus = profileMonitorStatus;
            return this;
        }

        /**
         * @param profileMonitorStatus The profile-level monitoring status of the Traffic Manager profile.
         * 
         * @return builder
         * 
         */
        public Builder profileMonitorStatus(Either profileMonitorStatus) {
            return profileMonitorStatus(Output.of(profileMonitorStatus));
        }

        /**
         * @param profileMonitorStatus The profile-level monitoring status of the Traffic Manager profile.
         * 
         * @return builder
         * 
         */
        public Builder profileMonitorStatus(String profileMonitorStatus) {
            return profileMonitorStatus(Either.ofLeft(profileMonitorStatus));
        }

        /**
         * @param profileMonitorStatus The profile-level monitoring status of the Traffic Manager profile.
         * 
         * @return builder
         * 
         */
        public Builder profileMonitorStatus(ProfileMonitorStatus profileMonitorStatus) {
            return profileMonitorStatus(Either.ofRight(profileMonitorStatus));
        }

        /**
         * @param protocol The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder protocol(@Nullable Output> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder protocol(Either protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param protocol The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Either.ofLeft(protocol));
        }

        /**
         * @param protocol The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health.
         * 
         * @return builder
         * 
         */
        public Builder protocol(MonitorProtocol protocol) {
            return protocol(Either.ofRight(protocol));
        }

        /**
         * @param timeoutInSeconds The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.
         * 
         * @return builder
         * 
         */
        public Builder timeoutInSeconds(@Nullable Output timeoutInSeconds) {
            $.timeoutInSeconds = timeoutInSeconds;
            return this;
        }

        /**
         * @param timeoutInSeconds The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check.
         * 
         * @return builder
         * 
         */
        public Builder timeoutInSeconds(Double timeoutInSeconds) {
            return timeoutInSeconds(Output.of(timeoutInSeconds));
        }

        /**
         * @param toleratedNumberOfFailures The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.
         * 
         * @return builder
         * 
         */
        public Builder toleratedNumberOfFailures(@Nullable Output toleratedNumberOfFailures) {
            $.toleratedNumberOfFailures = toleratedNumberOfFailures;
            return this;
        }

        /**
         * @param toleratedNumberOfFailures The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check.
         * 
         * @return builder
         * 
         */
        public Builder toleratedNumberOfFailures(Double toleratedNumberOfFailures) {
            return toleratedNumberOfFailures(Output.of(toleratedNumberOfFailures));
        }

        public MonitorConfigArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy