ServerGroup
- Implements: IServerGroup
This class encapsulates and extends the ROS resource type ALIYUN::GWLB::ServerGroup.
Initializers
import com.aliyun.ros.cdk.gwlb.ServerGroup;
ServerGroup.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.vpcId(java.lang.String)
.vpcId(IResolvable)
// .connectionDrainConfig(IResolvable)
// .connectionDrainConfig(ConnectionDrainConfigProperty)
// .healthCheckConfig(IResolvable)
// .healthCheckConfig(HealthCheckConfigProperty)
// .protocol(java.lang.String)
// .protocol(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .scheduler(java.lang.String)
// .scheduler(IResolvable)
// .serverGroupName(java.lang.String)
// .serverGroupName(IResolvable)
// .serverGroupType(java.lang.String)
// .serverGroupType(IResolvable)
// .servers(IResolvable)
// .servers(java.util.List<IResolvable)
// .servers(ServersProperty>)
// .tags(java.util.List<TagsProperty>)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The VPC instance ID. |
connectionDrainConfig | com.aliyun.ros.cdk.core.IResolvable OR ConnectionDrainConfigProperty | Property connectionDrainConfig: Connected graceful interrupt configuration. |
healthCheckConfig | com.aliyun.ros.cdk.core.IResolvable OR HealthCheckConfigProperty | Property healthCheckConfig: Health check configurations. |
protocol | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property protocol: Backend Protocol. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: The ID of the resource group. |
scheduler | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property scheduler: Scheduling algorithm. |
serverGroupName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property serverGroupName: The server group name. |
serverGroupType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property serverGroupType: The server group type. |
servers | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property servers: List of servers. |
tags | java.util.List<TagsProperty> | Property tags: Tags of server group. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
vpcIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The VPC instance ID.
If the value of ServerGroupType is Instance, only servers in the VPC can be added to the server group.
connectionDrainConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR ConnectionDrainConfigProperty
Property connectionDrainConfig: Connected graceful interrupt configuration.
healthCheckConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR HealthCheckConfigProperty
Property healthCheckConfig: Health check configurations.
protocolOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property protocol: Backend Protocol.
Value: GENEVE (default).
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group.
schedulerOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property scheduler: Scheduling algorithm.
Value:
- 5TCH (default): quintuple hash, which is based on the consistent hash of the quintuple (source IP, Destination IP, source port, destination port, and protocol). The same flow is scheduled to the same backend server.
- 3TCH: a three-tuple hash, which is based on the consistent hash of three tuples (source IP address, destination IP address, and protocol). The same flow is dispatched to the same backend server.
- 2TCH: Binary Group hash, which is based on the consistent hash of the binary group (source IP and destination IP). The same flow is scheduled to the same backend server.
serverGroupNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property serverGroupName: The server group name.
It must be 2 to 128 characters in length, start with an uppercase letter or a Chinese character, and can contain digits, half-width periods (.), underscores (_), and dashes (-).
serverGroupTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property serverGroupType: The server group type.
Value:
- Instance (default): The instance type. You can add Ecs, Eni, and Eci instances to the server group.
- Ip: The Ip address type. You can directly add backend servers of the Ip address type to the server group.
serversOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
ServersProperty>
Property servers: List of servers.
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags of server group.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.gwlb.ServerGroup;
ServerGroup.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrConnectionDrainConfig | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ConnectionDrainConfig: Connected graceful interrupt configuration. |
attrCreateTime | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute CreateTime: The creation time of the server group. |
attrHealthCheckConfig | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute HealthCheckConfig: Health check configurations. |
attrProtocol | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Protocol: Backend Protocol. |
attrResourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ResourceGroupId: The ID of the resource group. |
attrScheduler | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Scheduler: Scheduling algorithm. |
attrServerGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServerGroupId: The server group ID. |
attrServerGroupName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServerGroupName: The server group name. |
attrServerGroupType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ServerGroupType: The server group type. |
attrServers | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Servers: List of servers. |
attrTags | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Tags: List of resource tags. |
attrVpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpcId: The VPC instance ID. |
props | ServerGroupProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrConnectionDrainConfigRequired
public java.lang.Object getAttrConnectionDrainConfig();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ConnectionDrainConfig: Connected graceful interrupt configuration.
attrCreateTimeRequired
public java.lang.Object getAttrCreateTime();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute CreateTime: The creation time of the server group.
attrHealthCheckConfigRequired
public java.lang.Object getAttrHealthCheckConfig();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute HealthCheckConfig: Health check configurations.
attrProtocolRequired
public java.lang.Object getAttrProtocol();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Protocol: Backend Protocol.
attrResourceGroupIdRequired
public java.lang.Object getAttrResourceGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ResourceGroupId: The ID of the resource group.
attrSchedulerRequired
public java.lang.Object getAttrScheduler();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Scheduler: Scheduling algorithm.
attrServerGroupIdRequired
public java.lang.Object getAttrServerGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ServerGroupId: The server group ID.
attrServerGroupNameRequired
public java.lang.Object getAttrServerGroupName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ServerGroupName: The server group name.
attrServerGroupTypeRequired
public java.lang.Object getAttrServerGroupType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ServerGroupType: The server group type.
attrServersRequired
public java.lang.Object getAttrServers();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Servers: List of servers.
attrTagsRequired
public java.lang.Object getAttrTags();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Tags: List of resource tags.
attrVpcIdRequired
public java.lang.Object getAttrVpcId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: The VPC instance ID.
propsRequired
public ServerGroupProps getProps();
- Type: ServerGroupProps