com.pulumi.aws.pipes.outputs.PipeTargetParametersEcsTaskParametersPlacementConstraint Maven / Gradle / Ivy
// *** 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.aws.pipes.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class PipeTargetParametersEcsTaskParametersPlacementConstraint {
/**
* @return A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. Maximum length of 2,000.
*
*/
private @Nullable String expression;
/**
* @return The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task). Valid Values: random, spread, binpack.
*
*/
private @Nullable String type;
private PipeTargetParametersEcsTaskParametersPlacementConstraint() {}
/**
* @return A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance. Maximum length of 2,000.
*
*/
public Optional expression() {
return Optional.ofNullable(this.expression);
}
/**
* @return The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task). Valid Values: random, spread, binpack.
*
*/
public Optional type() {
return Optional.ofNullable(this.type);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(PipeTargetParametersEcsTaskParametersPlacementConstraint defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String expression;
private @Nullable String type;
public Builder() {}
public Builder(PipeTargetParametersEcsTaskParametersPlacementConstraint defaults) {
Objects.requireNonNull(defaults);
this.expression = defaults.expression;
this.type = defaults.type;
}
@CustomType.Setter
public Builder expression(@Nullable String expression) {
this.expression = expression;
return this;
}
@CustomType.Setter
public Builder type(@Nullable String type) {
this.type = type;
return this;
}
public PipeTargetParametersEcsTaskParametersPlacementConstraint build() {
final var _resultValue = new PipeTargetParametersEcsTaskParametersPlacementConstraint();
_resultValue.expression = expression;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy