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

com.pulumi.aws.ecs.outputs.ServiceOrderedPlacementStrategy 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.ecs.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 ServiceOrderedPlacementStrategy {
    /**
     * @return For the `spread` placement strategy, valid values are `instanceId` (or `host`,
     * which has the same effect), or any platform or custom attribute that is applied to a container instance.
     * For the `binpack` type, valid values are `memory` and `cpu`. For the `random` type, this attribute is not
     * needed. For more information, see [Placement Strategy](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PlacementStrategy.html).
     * 
     * > **Note:** for `spread`, `host` and `instanceId` will be normalized, by AWS, to be `instanceId`. This means the statefile will show `instanceId` but your config will differ if you use `host`.
     * 
     */
    private @Nullable String field;
    /**
     * @return Type of placement strategy. Must be one of: `binpack`, `random`, or `spread`
     * 
     */
    private String type;

    private ServiceOrderedPlacementStrategy() {}
    /**
     * @return For the `spread` placement strategy, valid values are `instanceId` (or `host`,
     * which has the same effect), or any platform or custom attribute that is applied to a container instance.
     * For the `binpack` type, valid values are `memory` and `cpu`. For the `random` type, this attribute is not
     * needed. For more information, see [Placement Strategy](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PlacementStrategy.html).
     * 
     * > **Note:** for `spread`, `host` and `instanceId` will be normalized, by AWS, to be `instanceId`. This means the statefile will show `instanceId` but your config will differ if you use `host`.
     * 
     */
    public Optional field() {
        return Optional.ofNullable(this.field);
    }
    /**
     * @return Type of placement strategy. Must be one of: `binpack`, `random`, or `spread`
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(ServiceOrderedPlacementStrategy defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String field;
        private String type;
        public Builder() {}
        public Builder(ServiceOrderedPlacementStrategy defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.field = defaults.field;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder field(@Nullable String field) {

            this.field = field;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ServiceOrderedPlacementStrategy", "type");
            }
            this.type = type;
            return this;
        }
        public ServiceOrderedPlacementStrategy build() {
            final var _resultValue = new ServiceOrderedPlacementStrategy();
            _resultValue.field = field;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy