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

com.pulumi.alicloud.alb.outputs.ServerGroupServer 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.alb.outputs;

import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class ServerGroupServer {
    /**
     * @return The description of the backend server.
     * 
     */
    private @Nullable String description;
    /**
     * @return The port used by the backend server. Valid values: `1` to `65535`. **Note:** This parameter is required if the `server_type` parameter is set to `Ecs`, `Eni`, `Eci`, or `Ip`. You do not need to configure this parameter if you set `server_type` to `Fc`.
     * 
     */
    private @Nullable Integer port;
    /**
     * @return Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. **Note:** If `server_type` is set to `Ip`, this parameter is available.
     * 
     */
    private @Nullable Boolean remoteIpEnabled;
    /**
     * @return The ID of the backend server.
     * - If `server_group_type` is set to `Instance`, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
     * - If `server_group_type` is set to `Ip`, set the parameter to an IP address specified in the server group.
     * - If `server_group_type` is set to `Fc`, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
     * 
     */
    private String serverId;
    /**
     * @return The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. **Note:** If `server_group_type` is set to `Fc`, you do not need to configure parameters, otherwise this attribute is required. If `server_group_type` is set to `Ip`, the value of this property is the same as the `server_id` value.
     * 
     */
    private @Nullable String serverIp;
    /**
     * @return The type of the server. The type of the server. Valid values:
     * - `Ecs`: an ECS instance.
     * - `Eni`: an ENI.
     * - `Eci`: an elastic container instance.
     * - `Ip`(Available since v1.194.0): an IP address.
     * - `Fc`(Available since v1.194.0): a function.
     * 
     */
    private String serverType;
    /**
     * @return The status of the backend server.
     * 
     */
    private @Nullable String status;
    /**
     * @return The weight of the server. Default value: `100`. Valid values: `0` to `100`. If the value is set to `0`, no requests are forwarded to the server. **Note:** You do not need to set this parameter if you set `server_type` to `Fc`.
     * 
     */
    private @Nullable Integer weight;

    private ServerGroupServer() {}
    /**
     * @return The description of the backend server.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return The port used by the backend server. Valid values: `1` to `65535`. **Note:** This parameter is required if the `server_type` parameter is set to `Ecs`, `Eni`, `Eci`, or `Ip`. You do not need to configure this parameter if you set `server_type` to `Fc`.
     * 
     */
    public Optional port() {
        return Optional.ofNullable(this.port);
    }
    /**
     * @return Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. **Note:** If `server_type` is set to `Ip`, this parameter is available.
     * 
     */
    public Optional remoteIpEnabled() {
        return Optional.ofNullable(this.remoteIpEnabled);
    }
    /**
     * @return The ID of the backend server.
     * - If `server_group_type` is set to `Instance`, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
     * - If `server_group_type` is set to `Ip`, set the parameter to an IP address specified in the server group.
     * - If `server_group_type` is set to `Fc`, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
     * 
     */
    public String serverId() {
        return this.serverId;
    }
    /**
     * @return The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. **Note:** If `server_group_type` is set to `Fc`, you do not need to configure parameters, otherwise this attribute is required. If `server_group_type` is set to `Ip`, the value of this property is the same as the `server_id` value.
     * 
     */
    public Optional serverIp() {
        return Optional.ofNullable(this.serverIp);
    }
    /**
     * @return The type of the server. The type of the server. Valid values:
     * - `Ecs`: an ECS instance.
     * - `Eni`: an ENI.
     * - `Eci`: an elastic container instance.
     * - `Ip`(Available since v1.194.0): an IP address.
     * - `Fc`(Available since v1.194.0): a function.
     * 
     */
    public String serverType() {
        return this.serverType;
    }
    /**
     * @return The status of the backend server.
     * 
     */
    public Optional status() {
        return Optional.ofNullable(this.status);
    }
    /**
     * @return The weight of the server. Default value: `100`. Valid values: `0` to `100`. If the value is set to `0`, no requests are forwarded to the server. **Note:** You do not need to set this parameter if you set `server_type` to `Fc`.
     * 
     */
    public Optional weight() {
        return Optional.ofNullable(this.weight);
    }

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

    public static Builder builder(ServerGroupServer defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String description;
        private @Nullable Integer port;
        private @Nullable Boolean remoteIpEnabled;
        private String serverId;
        private @Nullable String serverIp;
        private String serverType;
        private @Nullable String status;
        private @Nullable Integer weight;
        public Builder() {}
        public Builder(ServerGroupServer defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.description = defaults.description;
    	      this.port = defaults.port;
    	      this.remoteIpEnabled = defaults.remoteIpEnabled;
    	      this.serverId = defaults.serverId;
    	      this.serverIp = defaults.serverIp;
    	      this.serverType = defaults.serverType;
    	      this.status = defaults.status;
    	      this.weight = defaults.weight;
        }

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

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder port(@Nullable Integer port) {

            this.port = port;
            return this;
        }
        @CustomType.Setter
        public Builder remoteIpEnabled(@Nullable Boolean remoteIpEnabled) {

            this.remoteIpEnabled = remoteIpEnabled;
            return this;
        }
        @CustomType.Setter
        public Builder serverId(String serverId) {
            if (serverId == null) {
              throw new MissingRequiredPropertyException("ServerGroupServer", "serverId");
            }
            this.serverId = serverId;
            return this;
        }
        @CustomType.Setter
        public Builder serverIp(@Nullable String serverIp) {

            this.serverIp = serverIp;
            return this;
        }
        @CustomType.Setter
        public Builder serverType(String serverType) {
            if (serverType == null) {
              throw new MissingRequiredPropertyException("ServerGroupServer", "serverType");
            }
            this.serverType = serverType;
            return this;
        }
        @CustomType.Setter
        public Builder status(@Nullable String status) {

            this.status = status;
            return this;
        }
        @CustomType.Setter
        public Builder weight(@Nullable Integer weight) {

            this.weight = weight;
            return this;
        }
        public ServerGroupServer build() {
            final var _resultValue = new ServerGroupServer();
            _resultValue.description = description;
            _resultValue.port = port;
            _resultValue.remoteIpEnabled = remoteIpEnabled;
            _resultValue.serverId = serverId;
            _resultValue.serverIp = serverIp;
            _resultValue.serverType = serverType;
            _resultValue.status = status;
            _resultValue.weight = weight;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy