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

com.pulumi.aws.ecs.inputs.ServicePlacementConstraintArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
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.aws.ecs.inputs;

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


public final class ServicePlacementConstraintArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServicePlacementConstraintArgs Empty = new ServicePlacementConstraintArgs();

    /**
     * Cluster Query Language expression to apply to the constraint. Does not need to be specified for the `distinctInstance` type. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
     * 
     */
    @Import(name="expression")
    private @Nullable Output expression;

    /**
     * @return Cluster Query Language expression to apply to the constraint. Does not need to be specified for the `distinctInstance` type. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
     * 
     */
    public Optional> expression() {
        return Optional.ofNullable(this.expression);
    }

    /**
     * Type of constraint. The only valid values at this time are `memberOf` and `distinctInstance`.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Type of constraint. The only valid values at this time are `memberOf` and `distinctInstance`.
     * 
     */
    public Output type() {
        return this.type;
    }

    private ServicePlacementConstraintArgs() {}

    private ServicePlacementConstraintArgs(ServicePlacementConstraintArgs $) {
        this.expression = $.expression;
        this.type = $.type;
    }

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

    public static final class Builder {
        private ServicePlacementConstraintArgs $;

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

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

        /**
         * @param expression Cluster Query Language expression to apply to the constraint. Does not need to be specified for the `distinctInstance` type. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
         * 
         * @return builder
         * 
         */
        public Builder expression(@Nullable Output expression) {
            $.expression = expression;
            return this;
        }

        /**
         * @param expression Cluster Query Language expression to apply to the constraint. Does not need to be specified for the `distinctInstance` type. For more information, see [Cluster Query Language in the Amazon EC2 Container Service Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).
         * 
         * @return builder
         * 
         */
        public Builder expression(String expression) {
            return expression(Output.of(expression));
        }

        /**
         * @param type Type of constraint. The only valid values at this time are `memberOf` and `distinctInstance`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Type of constraint. The only valid values at this time are `memberOf` and `distinctInstance`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy