com.amazonaws.services.docdbelastic.model.CreateClusterRequest Maven / Gradle / Ivy
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.docdbelastic.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateClusterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the Amazon DocumentDB elastic clusters administrator.
*
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
*
*/
private String adminUserName;
/**
*
* The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable
* ASCII characters.
*
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
*
*/
private String adminUserPassword;
/**
*
* The authentication type used to determine where to fetch the password used for accessing the elastic cluster.
* Valid types are PLAIN_TEXT
or SECRET_ARN
.
*
*/
private String authType;
/**
*
* The number of days for which automatic snapshots are retained.
*
*/
private Integer backupRetentionPeriod;
/**
*
* The client token for the elastic cluster.
*
*/
private String clientToken;
/**
*
* The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
*
*/
private String clusterName;
/**
*
* The KMS key identifier to use to encrypt the new elastic cluster.
*
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for
* your account. Your account has a different default encryption key for each Amazon Region.
*
*/
private String kmsKeyId;
/**
*
* The daily time range during which automated backups are created if automated backups are enabled, as determined
* by the backupRetentionPeriod
.
*
*/
private String preferredBackupWindow;
/**
*
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services
* Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*
*/
private String preferredMaintenanceWindow;
/**
*
* The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32,
* 64.
*
*/
private Integer shardCapacity;
/**
*
* The number of shards assigned to the elastic cluster. Maximum is 32.
*
*/
private Integer shardCount;
/**
*
* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount
* value of 1 means there is one writer instance, and any additional instances are replicas that can be used for
* reads and to improve availability.
*
*/
private Integer shardInstanceCount;
/**
*
* The Amazon EC2 subnet IDs for the new elastic cluster.
*
*/
private java.util.List subnetIds;
/**
*
* The tags to be assigned to the new elastic cluster.
*
*/
private java.util.Map tags;
/**
*
* A list of EC2 VPC security groups to associate with the new elastic cluster.
*
*/
private java.util.List vpcSecurityGroupIds;
/**
*
* The name of the Amazon DocumentDB elastic clusters administrator.
*
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
*
*
* @param adminUserName
* The name of the Amazon DocumentDB elastic clusters administrator.
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
*/
public void setAdminUserName(String adminUserName) {
this.adminUserName = adminUserName;
}
/**
*
* The name of the Amazon DocumentDB elastic clusters administrator.
*
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
*
*
* @return The name of the Amazon DocumentDB elastic clusters administrator.
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
*/
public String getAdminUserName() {
return this.adminUserName;
}
/**
*
* The name of the Amazon DocumentDB elastic clusters administrator.
*
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
*
*
* @param adminUserName
* The name of the Amazon DocumentDB elastic clusters administrator.
*
* Constraints:
*
*
* -
*
* Must be from 1 to 63 letters or numbers.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot be a reserved word.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withAdminUserName(String adminUserName) {
setAdminUserName(adminUserName);
return this;
}
/**
*
* The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable
* ASCII characters.
*
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
*
*
* @param adminUserPassword
* The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any
* printable ASCII characters.
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
*/
public void setAdminUserPassword(String adminUserPassword) {
this.adminUserPassword = adminUserPassword;
}
/**
*
* The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable
* ASCII characters.
*
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
*
*
* @return The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any
* printable ASCII characters.
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
*/
public String getAdminUserPassword() {
return this.adminUserPassword;
}
/**
*
* The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any printable
* ASCII characters.
*
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
*
*
* @param adminUserPassword
* The password for the Amazon DocumentDB elastic clusters administrator. The password can contain any
* printable ASCII characters.
*
* Constraints:
*
*
* -
*
* Must contain from 8 to 100 characters.
*
*
* -
*
* Cannot contain a forward slash (/), double quote ("), or the "at" symbol (@).
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withAdminUserPassword(String adminUserPassword) {
setAdminUserPassword(adminUserPassword);
return this;
}
/**
*
* The authentication type used to determine where to fetch the password used for accessing the elastic cluster.
* Valid types are PLAIN_TEXT
or SECRET_ARN
.
*
*
* @param authType
* The authentication type used to determine where to fetch the password used for accessing the elastic
* cluster. Valid types are PLAIN_TEXT
or SECRET_ARN
.
* @see Auth
*/
public void setAuthType(String authType) {
this.authType = authType;
}
/**
*
* The authentication type used to determine where to fetch the password used for accessing the elastic cluster.
* Valid types are PLAIN_TEXT
or SECRET_ARN
.
*
*
* @return The authentication type used to determine where to fetch the password used for accessing the elastic
* cluster. Valid types are PLAIN_TEXT
or SECRET_ARN
.
* @see Auth
*/
public String getAuthType() {
return this.authType;
}
/**
*
* The authentication type used to determine where to fetch the password used for accessing the elastic cluster.
* Valid types are PLAIN_TEXT
or SECRET_ARN
.
*
*
* @param authType
* The authentication type used to determine where to fetch the password used for accessing the elastic
* cluster. Valid types are PLAIN_TEXT
or SECRET_ARN
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Auth
*/
public CreateClusterRequest withAuthType(String authType) {
setAuthType(authType);
return this;
}
/**
*
* The authentication type used to determine where to fetch the password used for accessing the elastic cluster.
* Valid types are PLAIN_TEXT
or SECRET_ARN
.
*
*
* @param authType
* The authentication type used to determine where to fetch the password used for accessing the elastic
* cluster. Valid types are PLAIN_TEXT
or SECRET_ARN
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Auth
*/
public CreateClusterRequest withAuthType(Auth authType) {
this.authType = authType.toString();
return this;
}
/**
*
* The number of days for which automatic snapshots are retained.
*
*
* @param backupRetentionPeriod
* The number of days for which automatic snapshots are retained.
*/
public void setBackupRetentionPeriod(Integer backupRetentionPeriod) {
this.backupRetentionPeriod = backupRetentionPeriod;
}
/**
*
* The number of days for which automatic snapshots are retained.
*
*
* @return The number of days for which automatic snapshots are retained.
*/
public Integer getBackupRetentionPeriod() {
return this.backupRetentionPeriod;
}
/**
*
* The number of days for which automatic snapshots are retained.
*
*
* @param backupRetentionPeriod
* The number of days for which automatic snapshots are retained.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withBackupRetentionPeriod(Integer backupRetentionPeriod) {
setBackupRetentionPeriod(backupRetentionPeriod);
return this;
}
/**
*
* The client token for the elastic cluster.
*
*
* @param clientToken
* The client token for the elastic cluster.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* The client token for the elastic cluster.
*
*
* @return The client token for the elastic cluster.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* The client token for the elastic cluster.
*
*
* @param clientToken
* The client token for the elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
*
*
* @param clusterName
* The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
*/
public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}
/**
*
* The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
*
*
* @return The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
*/
public String getClusterName() {
return this.clusterName;
}
/**
*
* The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
*
*
* @param clusterName
* The name of the new elastic cluster. This parameter is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: my-cluster
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withClusterName(String clusterName) {
setClusterName(clusterName);
return this;
}
/**
*
* The KMS key identifier to use to encrypt the new elastic cluster.
*
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for
* your account. Your account has a different default encryption key for each Amazon Region.
*
*
* @param kmsKeyId
* The KMS key identifier to use to encrypt the new elastic cluster.
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias
* instead of the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates
* for your account. Your account has a different default encryption key for each Amazon Region.
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* The KMS key identifier to use to encrypt the new elastic cluster.
*
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for
* your account. Your account has a different default encryption key for each Amazon Region.
*
*
* @return The KMS key identifier to use to encrypt the new elastic cluster.
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating
* a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias
* instead of the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates
* for your account. Your account has a different default encryption key for each Amazon Region.
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* The KMS key identifier to use to encrypt the new elastic cluster.
*
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates for
* your account. Your account has a different default encryption key for each Amazon Region.
*
*
* @param kmsKeyId
* The KMS key identifier to use to encrypt the new elastic cluster.
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias
* instead of the ARN as the KMS encryption key.
*
*
* If an encryption key is not specified, Amazon DocumentDB uses the default encryption key that KMS creates
* for your account. Your account has a different default encryption key for each Amazon Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
return this;
}
/**
*
* The daily time range during which automated backups are created if automated backups are enabled, as determined
* by the backupRetentionPeriod
.
*
*
* @param preferredBackupWindow
* The daily time range during which automated backups are created if automated backups are enabled, as
* determined by the backupRetentionPeriod
.
*/
public void setPreferredBackupWindow(String preferredBackupWindow) {
this.preferredBackupWindow = preferredBackupWindow;
}
/**
*
* The daily time range during which automated backups are created if automated backups are enabled, as determined
* by the backupRetentionPeriod
.
*
*
* @return The daily time range during which automated backups are created if automated backups are enabled, as
* determined by the backupRetentionPeriod
.
*/
public String getPreferredBackupWindow() {
return this.preferredBackupWindow;
}
/**
*
* The daily time range during which automated backups are created if automated backups are enabled, as determined
* by the backupRetentionPeriod
.
*
*
* @param preferredBackupWindow
* The daily time range during which automated backups are created if automated backups are enabled, as
* determined by the backupRetentionPeriod
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withPreferredBackupWindow(String preferredBackupWindow) {
setPreferredBackupWindow(preferredBackupWindow);
return this;
}
/**
*
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services
* Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*
*
* @param preferredMaintenanceWindow
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web
* Services Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*/
public void setPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
this.preferredMaintenanceWindow = preferredMaintenanceWindow;
}
/**
*
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services
* Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*
*
* @return The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web
* Services Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*/
public String getPreferredMaintenanceWindow() {
return this.preferredMaintenanceWindow;
}
/**
*
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services
* Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
*
*
* @param preferredMaintenanceWindow
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Default: a 30-minute window selected at random from an 8-hour block of time for each Amazon Web
* Services Region, occurring on a random day of the week.
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Minimum 30-minute window.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
setPreferredMaintenanceWindow(preferredMaintenanceWindow);
return this;
}
/**
*
* The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32,
* 64.
*
*
* @param shardCapacity
* The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16,
* 32, 64.
*/
public void setShardCapacity(Integer shardCapacity) {
this.shardCapacity = shardCapacity;
}
/**
*
* The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32,
* 64.
*
*
* @return The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8,
* 16, 32, 64.
*/
public Integer getShardCapacity() {
return this.shardCapacity;
}
/**
*
* The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32,
* 64.
*
*
* @param shardCapacity
* The number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16,
* 32, 64.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withShardCapacity(Integer shardCapacity) {
setShardCapacity(shardCapacity);
return this;
}
/**
*
* The number of shards assigned to the elastic cluster. Maximum is 32.
*
*
* @param shardCount
* The number of shards assigned to the elastic cluster. Maximum is 32.
*/
public void setShardCount(Integer shardCount) {
this.shardCount = shardCount;
}
/**
*
* The number of shards assigned to the elastic cluster. Maximum is 32.
*
*
* @return The number of shards assigned to the elastic cluster. Maximum is 32.
*/
public Integer getShardCount() {
return this.shardCount;
}
/**
*
* The number of shards assigned to the elastic cluster. Maximum is 32.
*
*
* @param shardCount
* The number of shards assigned to the elastic cluster. Maximum is 32.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withShardCount(Integer shardCount) {
setShardCount(shardCount);
return this;
}
/**
*
* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount
* value of 1 means there is one writer instance, and any additional instances are replicas that can be used for
* reads and to improve availability.
*
*
* @param shardInstanceCount
* The number of replica instances applying to all shards in the elastic cluster. A
* shardInstanceCount
value of 1 means there is one writer instance, and any additional
* instances are replicas that can be used for reads and to improve availability.
*/
public void setShardInstanceCount(Integer shardInstanceCount) {
this.shardInstanceCount = shardInstanceCount;
}
/**
*
* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount
* value of 1 means there is one writer instance, and any additional instances are replicas that can be used for
* reads and to improve availability.
*
*
* @return The number of replica instances applying to all shards in the elastic cluster. A
* shardInstanceCount
value of 1 means there is one writer instance, and any additional
* instances are replicas that can be used for reads and to improve availability.
*/
public Integer getShardInstanceCount() {
return this.shardInstanceCount;
}
/**
*
* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount
* value of 1 means there is one writer instance, and any additional instances are replicas that can be used for
* reads and to improve availability.
*
*
* @param shardInstanceCount
* The number of replica instances applying to all shards in the elastic cluster. A
* shardInstanceCount
value of 1 means there is one writer instance, and any additional
* instances are replicas that can be used for reads and to improve availability.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withShardInstanceCount(Integer shardInstanceCount) {
setShardInstanceCount(shardInstanceCount);
return this;
}
/**
*
* The Amazon EC2 subnet IDs for the new elastic cluster.
*
*
* @return The Amazon EC2 subnet IDs for the new elastic cluster.
*/
public java.util.List getSubnetIds() {
return subnetIds;
}
/**
*
* The Amazon EC2 subnet IDs for the new elastic cluster.
*
*
* @param subnetIds
* The Amazon EC2 subnet IDs for the new elastic cluster.
*/
public void setSubnetIds(java.util.Collection subnetIds) {
if (subnetIds == null) {
this.subnetIds = null;
return;
}
this.subnetIds = new java.util.ArrayList(subnetIds);
}
/**
*
* The Amazon EC2 subnet IDs for the new elastic cluster.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param subnetIds
* The Amazon EC2 subnet IDs for the new elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withSubnetIds(String... subnetIds) {
if (this.subnetIds == null) {
setSubnetIds(new java.util.ArrayList(subnetIds.length));
}
for (String ele : subnetIds) {
this.subnetIds.add(ele);
}
return this;
}
/**
*
* The Amazon EC2 subnet IDs for the new elastic cluster.
*
*
* @param subnetIds
* The Amazon EC2 subnet IDs for the new elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withSubnetIds(java.util.Collection subnetIds) {
setSubnetIds(subnetIds);
return this;
}
/**
*
* The tags to be assigned to the new elastic cluster.
*
*
* @return The tags to be assigned to the new elastic cluster.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags to be assigned to the new elastic cluster.
*
*
* @param tags
* The tags to be assigned to the new elastic cluster.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags to be assigned to the new elastic cluster.
*
*
* @param tags
* The tags to be assigned to the new elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateClusterRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* A list of EC2 VPC security groups to associate with the new elastic cluster.
*
*
* @return A list of EC2 VPC security groups to associate with the new elastic cluster.
*/
public java.util.List getVpcSecurityGroupIds() {
return vpcSecurityGroupIds;
}
/**
*
* A list of EC2 VPC security groups to associate with the new elastic cluster.
*
*
* @param vpcSecurityGroupIds
* A list of EC2 VPC security groups to associate with the new elastic cluster.
*/
public void setVpcSecurityGroupIds(java.util.Collection vpcSecurityGroupIds) {
if (vpcSecurityGroupIds == null) {
this.vpcSecurityGroupIds = null;
return;
}
this.vpcSecurityGroupIds = new java.util.ArrayList(vpcSecurityGroupIds);
}
/**
*
* A list of EC2 VPC security groups to associate with the new elastic cluster.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpcSecurityGroupIds(java.util.Collection)} or {@link #withVpcSecurityGroupIds(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param vpcSecurityGroupIds
* A list of EC2 VPC security groups to associate with the new elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withVpcSecurityGroupIds(String... vpcSecurityGroupIds) {
if (this.vpcSecurityGroupIds == null) {
setVpcSecurityGroupIds(new java.util.ArrayList(vpcSecurityGroupIds.length));
}
for (String ele : vpcSecurityGroupIds) {
this.vpcSecurityGroupIds.add(ele);
}
return this;
}
/**
*
* A list of EC2 VPC security groups to associate with the new elastic cluster.
*
*
* @param vpcSecurityGroupIds
* A list of EC2 VPC security groups to associate with the new elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateClusterRequest withVpcSecurityGroupIds(java.util.Collection vpcSecurityGroupIds) {
setVpcSecurityGroupIds(vpcSecurityGroupIds);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAdminUserName() != null)
sb.append("AdminUserName: ").append(getAdminUserName()).append(",");
if (getAdminUserPassword() != null)
sb.append("AdminUserPassword: ").append("***Sensitive Data Redacted***").append(",");
if (getAuthType() != null)
sb.append("AuthType: ").append(getAuthType()).append(",");
if (getBackupRetentionPeriod() != null)
sb.append("BackupRetentionPeriod: ").append(getBackupRetentionPeriod()).append(",");
if (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getClusterName() != null)
sb.append("ClusterName: ").append(getClusterName()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId()).append(",");
if (getPreferredBackupWindow() != null)
sb.append("PreferredBackupWindow: ").append(getPreferredBackupWindow()).append(",");
if (getPreferredMaintenanceWindow() != null)
sb.append("PreferredMaintenanceWindow: ").append(getPreferredMaintenanceWindow()).append(",");
if (getShardCapacity() != null)
sb.append("ShardCapacity: ").append(getShardCapacity()).append(",");
if (getShardCount() != null)
sb.append("ShardCount: ").append(getShardCount()).append(",");
if (getShardInstanceCount() != null)
sb.append("ShardInstanceCount: ").append(getShardInstanceCount()).append(",");
if (getSubnetIds() != null)
sb.append("SubnetIds: ").append(getSubnetIds()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getVpcSecurityGroupIds() != null)
sb.append("VpcSecurityGroupIds: ").append(getVpcSecurityGroupIds());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateClusterRequest == false)
return false;
CreateClusterRequest other = (CreateClusterRequest) obj;
if (other.getAdminUserName() == null ^ this.getAdminUserName() == null)
return false;
if (other.getAdminUserName() != null && other.getAdminUserName().equals(this.getAdminUserName()) == false)
return false;
if (other.getAdminUserPassword() == null ^ this.getAdminUserPassword() == null)
return false;
if (other.getAdminUserPassword() != null && other.getAdminUserPassword().equals(this.getAdminUserPassword()) == false)
return false;
if (other.getAuthType() == null ^ this.getAuthType() == null)
return false;
if (other.getAuthType() != null && other.getAuthType().equals(this.getAuthType()) == false)
return false;
if (other.getBackupRetentionPeriod() == null ^ this.getBackupRetentionPeriod() == null)
return false;
if (other.getBackupRetentionPeriod() != null && other.getBackupRetentionPeriod().equals(this.getBackupRetentionPeriod()) == false)
return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getClusterName() == null ^ this.getClusterName() == null)
return false;
if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
if (other.getPreferredBackupWindow() == null ^ this.getPreferredBackupWindow() == null)
return false;
if (other.getPreferredBackupWindow() != null && other.getPreferredBackupWindow().equals(this.getPreferredBackupWindow()) == false)
return false;
if (other.getPreferredMaintenanceWindow() == null ^ this.getPreferredMaintenanceWindow() == null)
return false;
if (other.getPreferredMaintenanceWindow() != null && other.getPreferredMaintenanceWindow().equals(this.getPreferredMaintenanceWindow()) == false)
return false;
if (other.getShardCapacity() == null ^ this.getShardCapacity() == null)
return false;
if (other.getShardCapacity() != null && other.getShardCapacity().equals(this.getShardCapacity()) == false)
return false;
if (other.getShardCount() == null ^ this.getShardCount() == null)
return false;
if (other.getShardCount() != null && other.getShardCount().equals(this.getShardCount()) == false)
return false;
if (other.getShardInstanceCount() == null ^ this.getShardInstanceCount() == null)
return false;
if (other.getShardInstanceCount() != null && other.getShardInstanceCount().equals(this.getShardInstanceCount()) == false)
return false;
if (other.getSubnetIds() == null ^ this.getSubnetIds() == null)
return false;
if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getVpcSecurityGroupIds() == null ^ this.getVpcSecurityGroupIds() == null)
return false;
if (other.getVpcSecurityGroupIds() != null && other.getVpcSecurityGroupIds().equals(this.getVpcSecurityGroupIds()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAdminUserName() == null) ? 0 : getAdminUserName().hashCode());
hashCode = prime * hashCode + ((getAdminUserPassword() == null) ? 0 : getAdminUserPassword().hashCode());
hashCode = prime * hashCode + ((getAuthType() == null) ? 0 : getAuthType().hashCode());
hashCode = prime * hashCode + ((getBackupRetentionPeriod() == null) ? 0 : getBackupRetentionPeriod().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getPreferredBackupWindow() == null) ? 0 : getPreferredBackupWindow().hashCode());
hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode());
hashCode = prime * hashCode + ((getShardCapacity() == null) ? 0 : getShardCapacity().hashCode());
hashCode = prime * hashCode + ((getShardCount() == null) ? 0 : getShardCount().hashCode());
hashCode = prime * hashCode + ((getShardInstanceCount() == null) ? 0 : getShardInstanceCount().hashCode());
hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getVpcSecurityGroupIds() == null) ? 0 : getVpcSecurityGroupIds().hashCode());
return hashCode;
}
@Override
public CreateClusterRequest clone() {
return (CreateClusterRequest) super.clone();
}
}