com.pulumi.kubernetes.autoscaling.v2.inputs.ObjectMetricSourceArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes 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.kubernetes.autoscaling.v2.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.autoscaling.v2.inputs.CrossVersionObjectReferenceArgs;
import com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierArgs;
import com.pulumi.kubernetes.autoscaling.v2.inputs.MetricTargetArgs;
import java.util.Objects;
/**
* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
*
*/
public final class ObjectMetricSourceArgs extends com.pulumi.resources.ResourceArgs {
public static final ObjectMetricSourceArgs Empty = new ObjectMetricSourceArgs();
/**
* describedObject specifies the descriptions of a object,such as kind,name apiVersion
*
*/
@Import(name="describedObject", required=true)
private Output describedObject;
/**
* @return describedObject specifies the descriptions of a object,such as kind,name apiVersion
*
*/
public Output describedObject() {
return this.describedObject;
}
/**
* metric identifies the target metric by name and selector
*
*/
@Import(name="metric", required=true)
private Output metric;
/**
* @return metric identifies the target metric by name and selector
*
*/
public Output metric() {
return this.metric;
}
/**
* target specifies the target value for the given metric
*
*/
@Import(name="target", required=true)
private Output target;
/**
* @return target specifies the target value for the given metric
*
*/
public Output target() {
return this.target;
}
private ObjectMetricSourceArgs() {}
private ObjectMetricSourceArgs(ObjectMetricSourceArgs $) {
this.describedObject = $.describedObject;
this.metric = $.metric;
this.target = $.target;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ObjectMetricSourceArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private ObjectMetricSourceArgs $;
public Builder() {
$ = new ObjectMetricSourceArgs();
}
public Builder(ObjectMetricSourceArgs defaults) {
$ = new ObjectMetricSourceArgs(Objects.requireNonNull(defaults));
}
/**
* @param describedObject describedObject specifies the descriptions of a object,such as kind,name apiVersion
*
* @return builder
*
*/
public Builder describedObject(Output describedObject) {
$.describedObject = describedObject;
return this;
}
/**
* @param describedObject describedObject specifies the descriptions of a object,such as kind,name apiVersion
*
* @return builder
*
*/
public Builder describedObject(CrossVersionObjectReferenceArgs describedObject) {
return describedObject(Output.of(describedObject));
}
/**
* @param metric metric identifies the target metric by name and selector
*
* @return builder
*
*/
public Builder metric(Output metric) {
$.metric = metric;
return this;
}
/**
* @param metric metric identifies the target metric by name and selector
*
* @return builder
*
*/
public Builder metric(MetricIdentifierArgs metric) {
return metric(Output.of(metric));
}
/**
* @param target target specifies the target value for the given metric
*
* @return builder
*
*/
public Builder target(Output target) {
$.target = target;
return this;
}
/**
* @param target target specifies the target value for the given metric
*
* @return builder
*
*/
public Builder target(MetricTargetArgs target) {
return target(Output.of(target));
}
public ObjectMetricSourceArgs build() {
if ($.describedObject == null) {
throw new MissingRequiredPropertyException("ObjectMetricSourceArgs", "describedObject");
}
if ($.metric == null) {
throw new MissingRequiredPropertyException("ObjectMetricSourceArgs", "metric");
}
if ($.target == null) {
throw new MissingRequiredPropertyException("ObjectMetricSourceArgs", "target");
}
return $;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy