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

com.pulumi.alicloud.ess.ServerGroupAttachmentArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.ess;

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


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

    public static final ServerGroupAttachmentArgs Empty = new ServerGroupAttachmentArgs();

    /**
     * If instances of scaling group are attached/removed from backend server when
     * server group from scaling group. Default to false.
     * 
     */
    @Import(name="forceAttach")
    private @Nullable Output forceAttach;

    /**
     * @return If instances of scaling group are attached/removed from backend server when
     * server group from scaling group. Default to false.
     * 
     */
    public Optional> forceAttach() {
        return Optional.ofNullable(this.forceAttach);
    }

    /**
     * The port will be used for Server Group backend server.
     * 
     */
    @Import(name="port", required=true)
    private Output port;

    /**
     * @return The port will be used for Server Group backend server.
     * 
     */
    public Output port() {
        return this.port;
    }

    /**
     * ID of the scaling group.
     * 
     */
    @Import(name="scalingGroupId", required=true)
    private Output scalingGroupId;

    /**
     * @return ID of the scaling group.
     * 
     */
    public Output scalingGroupId() {
        return this.scalingGroupId;
    }

    /**
     * ID of Server Group.
     * 
     */
    @Import(name="serverGroupId", required=true)
    private Output serverGroupId;

    /**
     * @return ID of Server Group.
     * 
     */
    public Output serverGroupId() {
        return this.serverGroupId;
    }

    /**
     * The type of server group N. Valid values: ALB, NLB.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of server group N. Valid values: ALB, NLB.
     * 
     */
    public Output type() {
        return this.type;
    }

    /**
     * The weight of an ECS instance attached to the Server Group.
     * 
     */
    @Import(name="weight", required=true)
    private Output weight;

    /**
     * @return The weight of an ECS instance attached to the Server Group.
     * 
     */
    public Output weight() {
        return this.weight;
    }

    private ServerGroupAttachmentArgs() {}

    private ServerGroupAttachmentArgs(ServerGroupAttachmentArgs $) {
        this.forceAttach = $.forceAttach;
        this.port = $.port;
        this.scalingGroupId = $.scalingGroupId;
        this.serverGroupId = $.serverGroupId;
        this.type = $.type;
        this.weight = $.weight;
    }

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

    public static final class Builder {
        private ServerGroupAttachmentArgs $;

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

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

        /**
         * @param forceAttach If instances of scaling group are attached/removed from backend server when
         * server group from scaling group. Default to false.
         * 
         * @return builder
         * 
         */
        public Builder forceAttach(@Nullable Output forceAttach) {
            $.forceAttach = forceAttach;
            return this;
        }

        /**
         * @param forceAttach If instances of scaling group are attached/removed from backend server when
         * server group from scaling group. Default to false.
         * 
         * @return builder
         * 
         */
        public Builder forceAttach(Boolean forceAttach) {
            return forceAttach(Output.of(forceAttach));
        }

        /**
         * @param port The port will be used for Server Group backend server.
         * 
         * @return builder
         * 
         */
        public Builder port(Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port The port will be used for Server Group backend server.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param scalingGroupId ID of the scaling group.
         * 
         * @return builder
         * 
         */
        public Builder scalingGroupId(Output scalingGroupId) {
            $.scalingGroupId = scalingGroupId;
            return this;
        }

        /**
         * @param scalingGroupId ID of the scaling group.
         * 
         * @return builder
         * 
         */
        public Builder scalingGroupId(String scalingGroupId) {
            return scalingGroupId(Output.of(scalingGroupId));
        }

        /**
         * @param serverGroupId ID of Server Group.
         * 
         * @return builder
         * 
         */
        public Builder serverGroupId(Output serverGroupId) {
            $.serverGroupId = serverGroupId;
            return this;
        }

        /**
         * @param serverGroupId ID of Server Group.
         * 
         * @return builder
         * 
         */
        public Builder serverGroupId(String serverGroupId) {
            return serverGroupId(Output.of(serverGroupId));
        }

        /**
         * @param type The type of server group N. Valid values: ALB, NLB.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of server group N. Valid values: ALB, NLB.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param weight The weight of an ECS instance attached to the Server Group.
         * 
         * @return builder
         * 
         */
        public Builder weight(Output weight) {
            $.weight = weight;
            return this;
        }

        /**
         * @param weight The weight of an ECS instance attached to the Server Group.
         * 
         * @return builder
         * 
         */
        public Builder weight(Integer weight) {
            return weight(Output.of(weight));
        }

        public ServerGroupAttachmentArgs build() {
            if ($.port == null) {
                throw new MissingRequiredPropertyException("ServerGroupAttachmentArgs", "port");
            }
            if ($.scalingGroupId == null) {
                throw new MissingRequiredPropertyException("ServerGroupAttachmentArgs", "scalingGroupId");
            }
            if ($.serverGroupId == null) {
                throw new MissingRequiredPropertyException("ServerGroupAttachmentArgs", "serverGroupId");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("ServerGroupAttachmentArgs", "type");
            }
            if ($.weight == null) {
                throw new MissingRequiredPropertyException("ServerGroupAttachmentArgs", "weight");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy