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

com.aliyun.sdk.service.ess20220222.models.AttachServerGroupsRequest Maven / Gradle / Ivy

The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ess20220222.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * 
 * {@link AttachServerGroupsRequest} extends {@link RequestModel}
 *
 * 

AttachServerGroupsRequest

*/ public class AttachServerGroupsRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ClientToken") private String clientToken; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ForceAttach") private Boolean forceAttach; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RegionId") @com.aliyun.core.annotation.Validation(required = true) private String regionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ScalingGroupId") @com.aliyun.core.annotation.Validation(required = true) private String scalingGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ServerGroups") @com.aliyun.core.annotation.Validation(required = true) private java.util.List < ServerGroups> serverGroups; private AttachServerGroupsRequest(Builder builder) { super(builder); this.clientToken = builder.clientToken; this.forceAttach = builder.forceAttach; this.ownerId = builder.ownerId; this.regionId = builder.regionId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.scalingGroupId = builder.scalingGroupId; this.serverGroups = builder.serverGroups; } public static Builder builder() { return new Builder(); } public static AttachServerGroupsRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return forceAttach */ public Boolean getForceAttach() { return this.forceAttach; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return scalingGroupId */ public String getScalingGroupId() { return this.scalingGroupId; } /** * @return serverGroups */ public java.util.List < ServerGroups> getServerGroups() { return this.serverGroups; } public static final class Builder extends Request.Builder { private String clientToken; private Boolean forceAttach; private Long ownerId; private String regionId; private String resourceOwnerAccount; private String scalingGroupId; private java.util.List < ServerGroups> serverGroups; private Builder() { super(); } private Builder(AttachServerGroupsRequest request) { super(request); this.clientToken = request.clientToken; this.forceAttach = request.forceAttach; this.ownerId = request.ownerId; this.regionId = request.regionId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.scalingGroupId = request.scalingGroupId; this.serverGroups = request.serverGroups; } /** *

The client token that is used to ensure the idempotence of the request.

*

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see Ensure idempotence.

* * example: *

123e4567-e89b-12d3-a456-42665544****

*/ public Builder clientToken(String clientToken) { this.putQueryParameter("ClientToken", clientToken); this.clientToken = clientToken; return this; } /** *

Specifies whether to add the existing Elastic Compute Service (ECS) instances or elastic container instances in the scaling group to the server group. Valid values:

*
    *
  • true
  • *
  • false
  • *
*

Default value: false.

* * example: *

false

*/ public Builder forceAttach(Boolean forceAttach) { this.putQueryParameter("ForceAttach", forceAttach); this.forceAttach = forceAttach; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** *

The region ID of the scaling group.

*

This parameter is required.

* * example: *

cn-hangzhou

*/ public Builder regionId(String regionId) { this.putQueryParameter("RegionId", regionId); this.regionId = regionId; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** *

The ID of the scaling group.

*

This parameter is required.

* * example: *

asg-bp1fo0dbtsbmqa9h****

*/ public Builder scalingGroupId(String scalingGroupId) { this.putQueryParameter("ScalingGroupId", scalingGroupId); this.scalingGroupId = scalingGroupId; return this; } /** *

The information about the server groups.

*

This parameter is required.

*/ public Builder serverGroups(java.util.List < ServerGroups> serverGroups) { this.putQueryParameter("ServerGroups", serverGroups); this.serverGroups = serverGroups; return this; } @Override public AttachServerGroupsRequest build() { return new AttachServerGroupsRequest(this); } } /** * * {@link AttachServerGroupsRequest} extends {@link TeaModel} * *

AttachServerGroupsRequest

*/ public static class ServerGroups extends TeaModel { @com.aliyun.core.annotation.NameInMap("Port") @com.aliyun.core.annotation.Validation(required = true) private Integer port; @com.aliyun.core.annotation.NameInMap("ServerGroupId") @com.aliyun.core.annotation.Validation(required = true) private String serverGroupId; @com.aliyun.core.annotation.NameInMap("Type") @com.aliyun.core.annotation.Validation(required = true) private String type; @com.aliyun.core.annotation.NameInMap("Weight") @com.aliyun.core.annotation.Validation(required = true) private Integer weight; private ServerGroups(Builder builder) { this.port = builder.port; this.serverGroupId = builder.serverGroupId; this.type = builder.type; this.weight = builder.weight; } public static Builder builder() { return new Builder(); } public static ServerGroups create() { return builder().build(); } /** * @return port */ public Integer getPort() { return this.port; } /** * @return serverGroupId */ public String getServerGroupId() { return this.serverGroupId; } /** * @return type */ public String getType() { return this.type; } /** * @return weight */ public Integer getWeight() { return this.weight; } public static final class Builder { private Integer port; private String serverGroupId; private String type; private Integer weight; /** *

The port used by ECS instances or elastic container instances after being added as backend servers to the server group.

*

Valid values: 1 to 65535.

*

This parameter is required.

* * example: *

22

*/ public Builder port(Integer port) { this.port = port; return this; } /** *

The ID of the server group.

*

This parameter is required.

* * example: *

sgp-5yc3bd9lfyh*****

*/ public Builder serverGroupId(String serverGroupId) { this.serverGroupId = serverGroupId; return this; } /** *

The type of the server group. Valid values:

*
    *
  • ALB
  • *
  • NLB
  • *
*

This parameter is required.

* * example: *

ALB

*/ public Builder type(String type) { this.type = type; return this; } /** *

The weight of an ECS instance or elastic container instance as a backend server of the server group. Valid values: 0 to 100.

*

If you assign a higher weight to an instance, the instance is allocated a larger proportion of access requests. If you assign zero weight to an instance, the instance is allocated no access requests.

*

This parameter is required.

* * example: *

100

*/ public Builder weight(Integer weight) { this.weight = weight; return this; } public ServerGroups build() { return new ServerGroups(this); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy