com.aliyun.sdk.service.ess20220222.models.AttachDBInstancesRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ess20220222 Show documentation
// 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 AttachDBInstancesRequest} extends {@link RequestModel}
*
* AttachDBInstancesRequest
*/
public class AttachDBInstancesRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("AttachMode")
private String attachMode;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ClientToken")
private String clientToken;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DBInstances")
@com.aliyun.core.annotation.Validation(required = true)
private java.util.List < String > DBInstances;
@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")
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("Type")
private String type;
private AttachDBInstancesRequest(Builder builder) {
super(builder);
this.attachMode = builder.attachMode;
this.clientToken = builder.clientToken;
this.DBInstances = builder.DBInstances;
this.forceAttach = builder.forceAttach;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.scalingGroupId = builder.scalingGroupId;
this.type = builder.type;
}
public static Builder builder() {
return new Builder();
}
public static AttachDBInstancesRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return attachMode
*/
public String getAttachMode() {
return this.attachMode;
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return DBInstances
*/
public java.util.List < String > getDBInstances() {
return this.DBInstances;
}
/**
* @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 type
*/
public String getType() {
return this.type;
}
public static final class Builder extends Request.Builder {
private String attachMode;
private String clientToken;
private java.util.List < String > DBInstances;
private Boolean forceAttach;
private Long ownerId;
private String regionId;
private String resourceOwnerAccount;
private String scalingGroupId;
private String type;
private Builder() {
super();
}
private Builder(AttachDBInstancesRequest request) {
super(request);
this.attachMode = request.attachMode;
this.clientToken = request.clientToken;
this.DBInstances = request.DBInstances;
this.forceAttach = request.forceAttach;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.scalingGroupId = request.scalingGroupId;
this.type = request.type;
}
/**
* The mode in which you want to attach the database to the scaling group. Valid values:
*
* - SecurityIp: adds the private IP addresses of scaled out ECS instances to the IP address whitelist of the database. Take note that you can choose this mode only when the database that you want to attach is an ApsaraDB RDS instance.
* - SecurityGroup: adds the security group of the scaling configuration based on which ECS instances are created in the scaling group to the security group whitelist of the database for registration.
*
* Default value: SecurityIp.
*
* example:
* SecurityIp
*/
public Builder attachMode(String attachMode) {
this.putQueryParameter("AttachMode", attachMode);
this.attachMode = attachMode;
return this;
}
/**
* The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests.
* The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure the idempotence of a request.
*
* example:
* 123e4567-e89b-12d3-a456-42665544****
*/
public Builder clientToken(String clientToken) {
this.putQueryParameter("ClientToken", clientToken);
this.clientToken = clientToken;
return this;
}
/**
* The IDs of the ApsaraDB RDS instances that you want to attach to the scaling group.
* This parameter is required.
*/
public Builder DBInstances(java.util.List < String > DBInstances) {
this.putQueryParameter("DBInstances", DBInstances);
this.DBInstances = DBInstances;
return this;
}
/**
* Specifies whether to add the private IP addresses of all ECS instances in the scaling group to the IP address whitelist of an ApsaraDB RDS instance when you attach the ApsaraDB RDS instance to the scaling 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.
*
* example:
* cn-qingdao
*/
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-bp1avr6ensitts3w****
*/
public Builder scalingGroupId(String scalingGroupId) {
this.putQueryParameter("ScalingGroupId", scalingGroupId);
this.scalingGroupId = scalingGroupId;
return this;
}
/**
* The type of the database that you want to attach to the scaling group. Valid values:
*
* - RDS
* - Redis
* - MongoDB
*
* Default value: RDS.
*
* example:
* RDS
*/
public Builder type(String type) {
this.putQueryParameter("Type", type);
this.type = type;
return this;
}
@Override
public AttachDBInstancesRequest build() {
return new AttachDBInstancesRequest(this);
}
}
}