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

com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ExternalMetricSourceArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.kubernetes.autoscaling.v2beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one "target" type should be set.
 * 
 */
public final class ExternalMetricSourceArgs extends com.pulumi.resources.ResourceArgs {

    public static final ExternalMetricSourceArgs Empty = new ExternalMetricSourceArgs();

    /**
     * metricName is the name of the metric in question.
     * 
     */
    @Import(name="metricName", required=true)
    private Output metricName;

    /**
     * @return metricName is the name of the metric in question.
     * 
     */
    public Output metricName() {
        return this.metricName;
    }

    /**
     * metricSelector is used to identify a specific time series within a given metric.
     * 
     */
    @Import(name="metricSelector")
    private @Nullable Output metricSelector;

    /**
     * @return metricSelector is used to identify a specific time series within a given metric.
     * 
     */
    public Optional> metricSelector() {
        return Optional.ofNullable(this.metricSelector);
    }

    /**
     * targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
     * 
     */
    @Import(name="targetAverageValue")
    private @Nullable Output targetAverageValue;

    /**
     * @return targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
     * 
     */
    public Optional> targetAverageValue() {
        return Optional.ofNullable(this.targetAverageValue);
    }

    /**
     * targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
     * 
     */
    @Import(name="targetValue")
    private @Nullable Output targetValue;

    /**
     * @return targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
     * 
     */
    public Optional> targetValue() {
        return Optional.ofNullable(this.targetValue);
    }

    private ExternalMetricSourceArgs() {}

    private ExternalMetricSourceArgs(ExternalMetricSourceArgs $) {
        this.metricName = $.metricName;
        this.metricSelector = $.metricSelector;
        this.targetAverageValue = $.targetAverageValue;
        this.targetValue = $.targetValue;
    }

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

    public static final class Builder {
        private ExternalMetricSourceArgs $;

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

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

        /**
         * @param metricName metricName is the name of the metric in question.
         * 
         * @return builder
         * 
         */
        public Builder metricName(Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName metricName is the name of the metric in question.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param metricSelector metricSelector is used to identify a specific time series within a given metric.
         * 
         * @return builder
         * 
         */
        public Builder metricSelector(@Nullable Output metricSelector) {
            $.metricSelector = metricSelector;
            return this;
        }

        /**
         * @param metricSelector metricSelector is used to identify a specific time series within a given metric.
         * 
         * @return builder
         * 
         */
        public Builder metricSelector(LabelSelectorArgs metricSelector) {
            return metricSelector(Output.of(metricSelector));
        }

        /**
         * @param targetAverageValue targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
         * 
         * @return builder
         * 
         */
        public Builder targetAverageValue(@Nullable Output targetAverageValue) {
            $.targetAverageValue = targetAverageValue;
            return this;
        }

        /**
         * @param targetAverageValue targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
         * 
         * @return builder
         * 
         */
        public Builder targetAverageValue(String targetAverageValue) {
            return targetAverageValue(Output.of(targetAverageValue));
        }

        /**
         * @param targetValue targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
         * 
         * @return builder
         * 
         */
        public Builder targetValue(@Nullable Output targetValue) {
            $.targetValue = targetValue;
            return this;
        }

        /**
         * @param targetValue targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
         * 
         * @return builder
         * 
         */
        public Builder targetValue(String targetValue) {
            return targetValue(Output.of(targetValue));
        }

        public ExternalMetricSourceArgs build() {
            if ($.metricName == null) {
                throw new MissingRequiredPropertyException("ExternalMetricSourceArgs", "metricName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy