com.pulumi.aws.scheduler.outputs.ScheduleTargetEcsParametersPlacementConstraint 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.scheduler.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ScheduleTargetEcsParametersPlacementConstraint {
/**
* @return A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is `distinctInstance`. For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the Amazon ECS Developer Guide.
*
*/
private @Nullable String expression;
/**
* @return The type of constraint. One of: `distinctInstance`, `memberOf`.
*
*/
private String type;
private ScheduleTargetEcsParametersPlacementConstraint() {}
/**
* @return A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is `distinctInstance`. For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the Amazon ECS Developer Guide.
*
*/
public Optional expression() {
return Optional.ofNullable(this.expression);
}
/**
* @return The type of constraint. One of: `distinctInstance`, `memberOf`.
*
*/
public String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ScheduleTargetEcsParametersPlacementConstraint defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String expression;
private String type;
public Builder() {}
public Builder(ScheduleTargetEcsParametersPlacementConstraint 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(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("ScheduleTargetEcsParametersPlacementConstraint", "type");
}
this.type = type;
return this;
}
public ScheduleTargetEcsParametersPlacementConstraint build() {
final var _resultValue = new ScheduleTargetEcsParametersPlacementConstraint();
_resultValue.expression = expression;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy