/* * Copyright 2018-2023 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.docdb.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* Represents the input to CreateDBCluster. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDBClusterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. *
*/ private java.util.List* The number of days for which automated backups are retained. You must specify a minimum value of 1. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** The cluster identifier. 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
*
* The name of the cluster parameter group to associate with this cluster. *
*/ private String dBClusterParameterGroupName; /** ** A list of EC2 VPC security groups to associate with this cluster. *
*/ private java.util.List* A subnet group to associate with this cluster. *
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
*
* The name of the database engine to be used for this cluster. *
*
* Valid values: docdb
*
* The version number of the database engine to use. The --engine-version
will default to the latest
* major engine version. For production workloads, we recommend explicitly declaring this parameter with the
* intended major engine version.
*
* The port number on which the instances in the cluster accept connections. *
*/ private Integer port; /** ** The name of the master user for the cluster. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** The password for the master database user. This password can contain any printable ASCII character except forward * slash (/), double quote ("), or the "at" symbol (@). *
** Constraints: Must contain from 8 to 100 characters. *
*/ private String masterUserPassword; /** *
* The daily time range during which automated backups are created if automated backups are enabled using the
* BackupRetentionPeriod
parameter.
*
* The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services * Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
** The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). *
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
* The default is 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 tags to be assigned to the cluster. *
*/ private java.util.List* Specifies whether the cluster is encrypted. *
*/ private Boolean storageEncrypted; /** ** The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to encrypt the * new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has * a different default encryption key for each Amazon Web Services Regions. *
*/ private String kmsKeyId; /** ** Not currently supported. *
*/ private String preSignedUrl; /** ** A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or * profiler logs. For more information, see Auditing Amazon * DocumentDB Events and * Profiling Amazon DocumentDB Operations. *
*/ private java.util.List
* Specifies whether this cluster can be deleted. If DeletionProtection
is enabled, the cluster cannot
* be deleted unless it is modified and DeletionProtection
is disabled. DeletionProtection
* protects clusters from being accidentally deleted.
*
* The cluster identifier of the new global cluster. *
*/ private String globalClusterIdentifier; /** The region where the source instance is located. */ private String sourceRegion; /** ** A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. *
* * @return A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. */ public java.util.List* A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. *
* * @param availabilityZones * A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. */ public void setAvailabilityZones(java.util.Collection* A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if * you want to override the existing values. *
* * @param availabilityZones * A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withAvailabilityZones(String... availabilityZones) { if (this.availabilityZones == null) { setAvailabilityZones(new java.util.ArrayList* A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. *
* * @param availabilityZones * A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withAvailabilityZones(java.util.Collection* The number of days for which automated backups are retained. You must specify a minimum value of 1. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** The number of days for which automated backups are retained. You must specify a minimum value of 1. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** The number of days for which automated backups are retained. You must specify a minimum value of 1. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** Default: 1 *
** Constraints: *
** Must be a value from 1 to 35. *
** The cluster identifier. 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
*
* 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 setDBClusterIdentifier(String dBClusterIdentifier) {
this.dBClusterIdentifier = dBClusterIdentifier;
}
/**
*
* The cluster identifier. 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
*
* 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 getDBClusterIdentifier() {
return this.dBClusterIdentifier;
}
/**
*
* The cluster identifier. 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
*
* 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 CreateDBClusterRequest withDBClusterIdentifier(String dBClusterIdentifier) {
setDBClusterIdentifier(dBClusterIdentifier);
return this;
}
/**
*
* The name of the cluster parameter group to associate with this cluster. *
* * @param dBClusterParameterGroupName * The name of the cluster parameter group to associate with this cluster. */ public void setDBClusterParameterGroupName(String dBClusterParameterGroupName) { this.dBClusterParameterGroupName = dBClusterParameterGroupName; } /** ** The name of the cluster parameter group to associate with this cluster. *
* * @return The name of the cluster parameter group to associate with this cluster. */ public String getDBClusterParameterGroupName() { return this.dBClusterParameterGroupName; } /** ** The name of the cluster parameter group to associate with this cluster. *
* * @param dBClusterParameterGroupName * The name of the cluster parameter group to associate with this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withDBClusterParameterGroupName(String dBClusterParameterGroupName) { setDBClusterParameterGroupName(dBClusterParameterGroupName); return this; } /** ** A list of EC2 VPC security groups to associate with this cluster. *
* * @return A list of EC2 VPC security groups to associate with this cluster. */ public java.util.List* A list of EC2 VPC security groups to associate with this cluster. *
* * @param vpcSecurityGroupIds * A list of EC2 VPC security groups to associate with this cluster. */ public void setVpcSecurityGroupIds(java.util.Collection* A list of EC2 VPC security groups to associate with this 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 this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withVpcSecurityGroupIds(String... vpcSecurityGroupIds) { if (this.vpcSecurityGroupIds == null) { setVpcSecurityGroupIds(new java.util.ArrayList* A list of EC2 VPC security groups to associate with this cluster. *
* * @param vpcSecurityGroupIds * A list of EC2 VPC security groups to associate with this cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withVpcSecurityGroupIds(java.util.Collection* A subnet group to associate with this cluster. *
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
*/
public void setDBSubnetGroupName(String dBSubnetGroupName) {
this.dBSubnetGroupName = dBSubnetGroupName;
}
/**
*
* A subnet group to associate with this cluster. *
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
*/
public String getDBSubnetGroupName() {
return this.dBSubnetGroupName;
}
/**
*
* A subnet group to associate with this cluster. *
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
*
* Constraints: Must match the name of an existing DBSubnetGroup
. Must not be default.
*
* Example: mySubnetgroup
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDBClusterRequest withDBSubnetGroupName(String dBSubnetGroupName) {
setDBSubnetGroupName(dBSubnetGroupName);
return this;
}
/**
*
* The name of the database engine to be used for this cluster. *
*
* Valid values: docdb
*
* Valid values: docdb
*/
public void setEngine(String engine) {
this.engine = engine;
}
/**
*
* The name of the database engine to be used for this cluster. *
*
* Valid values: docdb
*
* Valid values: docdb
*/
public String getEngine() {
return this.engine;
}
/**
*
* The name of the database engine to be used for this cluster. *
*
* Valid values: docdb
*
* Valid values: docdb
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDBClusterRequest withEngine(String engine) {
setEngine(engine);
return this;
}
/**
*
* The version number of the database engine to use. The --engine-version
will default to the latest
* major engine version. For production workloads, we recommend explicitly declaring this parameter with the
* intended major engine version.
*
--engine-version
will default to the
* latest major engine version. For production workloads, we recommend explicitly declaring this parameter
* with the intended major engine version.
*/
public void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
/**
*
* The version number of the database engine to use. The --engine-version
will default to the latest
* major engine version. For production workloads, we recommend explicitly declaring this parameter with the
* intended major engine version.
*
--engine-version
will default to the
* latest major engine version. For production workloads, we recommend explicitly declaring this parameter
* with the intended major engine version.
*/
public String getEngineVersion() {
return this.engineVersion;
}
/**
*
* The version number of the database engine to use. The --engine-version
will default to the latest
* major engine version. For production workloads, we recommend explicitly declaring this parameter with the
* intended major engine version.
*
--engine-version
will default to the
* latest major engine version. For production workloads, we recommend explicitly declaring this parameter
* with the intended major engine version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDBClusterRequest withEngineVersion(String engineVersion) {
setEngineVersion(engineVersion);
return this;
}
/**
* * The port number on which the instances in the cluster accept connections. *
* * @param port * The port number on which the instances in the cluster accept connections. */ public void setPort(Integer port) { this.port = port; } /** ** The port number on which the instances in the cluster accept connections. *
* * @return The port number on which the instances in the cluster accept connections. */ public Integer getPort() { return this.port; } /** ** The port number on which the instances in the cluster accept connections. *
* * @param port * The port number on which the instances in the cluster accept connections. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withPort(Integer port) { setPort(port); return this; } /** ** The name of the master user for the cluster. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** The name of the master user for the cluster. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** The name of the master user for the cluster. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** Constraints: *
** Must be from 1 to 63 letters or numbers. *
** The first character must be a letter. *
** Cannot be a reserved word for the chosen database engine. *
** The password for the master database user. This password can contain any printable ASCII character except forward * slash (/), double quote ("), or the "at" symbol (@). *
** Constraints: Must contain from 8 to 100 characters. *
* * @param masterUserPassword * The password for the master database user. This password can contain any printable ASCII character except * forward slash (/), double quote ("), or the "at" symbol (@). ** Constraints: Must contain from 8 to 100 characters. */ public void setMasterUserPassword(String masterUserPassword) { this.masterUserPassword = masterUserPassword; } /** *
* The password for the master database user. This password can contain any printable ASCII character except forward * slash (/), double quote ("), or the "at" symbol (@). *
** Constraints: Must contain from 8 to 100 characters. *
* * @return The password for the master database user. This password can contain any printable ASCII character except * forward slash (/), double quote ("), or the "at" symbol (@). ** Constraints: Must contain from 8 to 100 characters. */ public String getMasterUserPassword() { return this.masterUserPassword; } /** *
* The password for the master database user. This password can contain any printable ASCII character except forward * slash (/), double quote ("), or the "at" symbol (@). *
** Constraints: Must contain from 8 to 100 characters. *
* * @param masterUserPassword * The password for the master database user. This password can contain any printable ASCII character except * forward slash (/), double quote ("), or the "at" symbol (@). ** Constraints: Must contain from 8 to 100 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withMasterUserPassword(String masterUserPassword) { setMasterUserPassword(masterUserPassword); return this; } /** *
* The daily time range during which automated backups are created if automated backups are enabled using the
* BackupRetentionPeriod
parameter.
*
* The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services * Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
*BackupRetentionPeriod
parameter.
* * The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web * Services Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
*
* The daily time range during which automated backups are created if automated backups are enabled using the
* BackupRetentionPeriod
parameter.
*
* The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services * Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
*BackupRetentionPeriod
parameter.
* * The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web * Services Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
*
* The daily time range during which automated backups are created if automated backups are enabled using the
* BackupRetentionPeriod
parameter.
*
* The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services * Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
*BackupRetentionPeriod
parameter.
* * The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web * Services Region. *
** Constraints: *
*
* Must be in the format hh24:mi-hh24:mi
.
*
* Must be in Universal Coordinated Time (UTC). *
** Must not conflict with the preferred maintenance window. *
** Must be at least 30 minutes. *
** The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). *
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
* The default is 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
*
* The default is 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
*
* The default is 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
*
* The default is 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
*
* The default is 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
*
* The default is 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 CreateDBClusterRequest withPreferredMaintenanceWindow(String preferredMaintenanceWindow) { setPreferredMaintenanceWindow(preferredMaintenanceWindow); return this; } /** *
* The tags to be assigned to the cluster. *
* * @return The tags to be assigned to the cluster. */ public java.util.List* The tags to be assigned to the cluster. *
* * @param tags * The tags to be assigned to the cluster. */ public void setTags(java.util.Collection* The tags to be assigned to the cluster. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags to be assigned to the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tags to be assigned to the cluster. *
* * @param tags * The tags to be assigned to the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withTags(java.util.Collection* Specifies whether the cluster is encrypted. *
* * @param storageEncrypted * Specifies whether the cluster is encrypted. */ public void setStorageEncrypted(Boolean storageEncrypted) { this.storageEncrypted = storageEncrypted; } /** ** Specifies whether the cluster is encrypted. *
* * @return Specifies whether the cluster is encrypted. */ public Boolean getStorageEncrypted() { return this.storageEncrypted; } /** ** Specifies whether the cluster is encrypted. *
* * @param storageEncrypted * Specifies whether the cluster is encrypted. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withStorageEncrypted(Boolean storageEncrypted) { setStorageEncrypted(storageEncrypted); return this; } /** ** Specifies whether the cluster is encrypted. *
* * @return Specifies whether the cluster is encrypted. */ public Boolean isStorageEncrypted() { return this.storageEncrypted; } /** ** The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to encrypt the * new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has * a different default encryption key for each Amazon Web Services Regions. *
* * @param kmsKeyId * The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to * encrypt the new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services * account has a different default encryption key for each Amazon Web Services Regions. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *
* The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to encrypt the * new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has * a different default encryption key for each Amazon Web Services Regions. *
* * @return The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to * encrypt the new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services * account has a different default encryption key for each Amazon Web Services Regions. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *
* The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to encrypt the * new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has * a different default encryption key for each Amazon Web Services Regions. *
* * @param kmsKeyId * The KMS key identifier for an encrypted 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 Web Services account that owns the KMS encryption key that is used to * encrypt the new cluster, you can use the KMS key alias instead of the ARN for the KMS encryption key. *
*
* If an encryption key is not specified in KmsKeyId
:
*
* If the StorageEncrypted
parameter is true
, Amazon DocumentDB uses your default
* encryption key.
*
* KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services * account has a different default encryption key for each Amazon Web Services Regions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *
* Not currently supported. *
* * @param preSignedUrl * Not currently supported. */ public void setPreSignedUrl(String preSignedUrl) { this.preSignedUrl = preSignedUrl; } /** ** Not currently supported. *
* * @return Not currently supported. */ public String getPreSignedUrl() { return this.preSignedUrl; } /** ** Not currently supported. *
* * @param preSignedUrl * Not currently supported. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withPreSignedUrl(String preSignedUrl) { setPreSignedUrl(preSignedUrl); return this; } /** ** A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or * profiler logs. For more information, see Auditing Amazon * DocumentDB Events and * Profiling Amazon DocumentDB Operations. *
* * @return A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit * logs or profiler logs. For more information, see Auditing Amazon * DocumentDB Events and Profiling Amazon * DocumentDB Operations. */ public java.util.List* A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or * profiler logs. For more information, see Auditing Amazon * DocumentDB Events and * Profiling Amazon DocumentDB Operations. *
* * @param enableCloudwatchLogsExports * A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit * logs or profiler logs. For more information, see Auditing Amazon * DocumentDB Events and Profiling Amazon * DocumentDB Operations. */ public void setEnableCloudwatchLogsExports(java.util.Collection* A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or * profiler logs. For more information, see Auditing Amazon * DocumentDB Events and * Profiling Amazon DocumentDB Operations. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEnableCloudwatchLogsExports(java.util.Collection)} or * {@link #withEnableCloudwatchLogsExports(java.util.Collection)} if you want to override the existing values. *
* * @param enableCloudwatchLogsExports * A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit * logs or profiler logs. For more information, see Auditing Amazon * DocumentDB Events and Profiling Amazon * DocumentDB Operations. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withEnableCloudwatchLogsExports(String... enableCloudwatchLogsExports) { if (this.enableCloudwatchLogsExports == null) { setEnableCloudwatchLogsExports(new java.util.ArrayList* A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit logs or * profiler logs. For more information, see Auditing Amazon * DocumentDB Events and * Profiling Amazon DocumentDB Operations. *
* * @param enableCloudwatchLogsExports * A list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. You can enable audit * logs or profiler logs. For more information, see Auditing Amazon * DocumentDB Events and Profiling Amazon * DocumentDB Operations. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withEnableCloudwatchLogsExports(java.util.Collection
* Specifies whether this cluster can be deleted. If DeletionProtection
is enabled, the cluster cannot
* be deleted unless it is modified and DeletionProtection
is disabled. DeletionProtection
* protects clusters from being accidentally deleted.
*
DeletionProtection
is enabled, the cluster
* cannot be deleted unless it is modified and DeletionProtection
is disabled.
* DeletionProtection
protects clusters from being accidentally deleted.
*/
public void setDeletionProtection(Boolean deletionProtection) {
this.deletionProtection = deletionProtection;
}
/**
*
* Specifies whether this cluster can be deleted. If DeletionProtection
is enabled, the cluster cannot
* be deleted unless it is modified and DeletionProtection
is disabled. DeletionProtection
* protects clusters from being accidentally deleted.
*
DeletionProtection
is enabled, the cluster
* cannot be deleted unless it is modified and DeletionProtection
is disabled.
* DeletionProtection
protects clusters from being accidentally deleted.
*/
public Boolean getDeletionProtection() {
return this.deletionProtection;
}
/**
*
* Specifies whether this cluster can be deleted. If DeletionProtection
is enabled, the cluster cannot
* be deleted unless it is modified and DeletionProtection
is disabled. DeletionProtection
* protects clusters from being accidentally deleted.
*
DeletionProtection
is enabled, the cluster
* cannot be deleted unless it is modified and DeletionProtection
is disabled.
* DeletionProtection
protects clusters from being accidentally deleted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDBClusterRequest withDeletionProtection(Boolean deletionProtection) {
setDeletionProtection(deletionProtection);
return this;
}
/**
*
* Specifies whether this cluster can be deleted. If DeletionProtection
is enabled, the cluster cannot
* be deleted unless it is modified and DeletionProtection
is disabled. DeletionProtection
* protects clusters from being accidentally deleted.
*
DeletionProtection
is enabled, the cluster
* cannot be deleted unless it is modified and DeletionProtection
is disabled.
* DeletionProtection
protects clusters from being accidentally deleted.
*/
public Boolean isDeletionProtection() {
return this.deletionProtection;
}
/**
* * The cluster identifier of the new global cluster. *
* * @param globalClusterIdentifier * The cluster identifier of the new global cluster. */ public void setGlobalClusterIdentifier(String globalClusterIdentifier) { this.globalClusterIdentifier = globalClusterIdentifier; } /** ** The cluster identifier of the new global cluster. *
* * @return The cluster identifier of the new global cluster. */ public String getGlobalClusterIdentifier() { return this.globalClusterIdentifier; } /** ** The cluster identifier of the new global cluster. *
* * @param globalClusterIdentifier * The cluster identifier of the new global cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withGlobalClusterIdentifier(String globalClusterIdentifier) { setGlobalClusterIdentifier(globalClusterIdentifier); return this; } /** * The region where the source instance is located. * * @param sourceRegion * The region where the source instance is located. */ public void setSourceRegion(String sourceRegion) { this.sourceRegion = sourceRegion; } /** * The region where the source instance is located. * * @return The region where the source instance is located. */ public String getSourceRegion() { return this.sourceRegion; } /** * The region where the source instance is located. * * @param sourceRegion * The region where the source instance is located. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBClusterRequest withSourceRegion(String sourceRegion) { setSourceRegion(sourceRegion); 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 (getAvailabilityZones() != null) sb.append("AvailabilityZones: ").append(getAvailabilityZones()).append(","); if (getBackupRetentionPeriod() != null) sb.append("BackupRetentionPeriod: ").append(getBackupRetentionPeriod()).append(","); if (getDBClusterIdentifier() != null) sb.append("DBClusterIdentifier: ").append(getDBClusterIdentifier()).append(","); if (getDBClusterParameterGroupName() != null) sb.append("DBClusterParameterGroupName: ").append(getDBClusterParameterGroupName()).append(","); if (getVpcSecurityGroupIds() != null) sb.append("VpcSecurityGroupIds: ").append(getVpcSecurityGroupIds()).append(","); if (getDBSubnetGroupName() != null) sb.append("DBSubnetGroupName: ").append(getDBSubnetGroupName()).append(","); if (getEngine() != null) sb.append("Engine: ").append(getEngine()).append(","); if (getEngineVersion() != null) sb.append("EngineVersion: ").append(getEngineVersion()).append(","); if (getPort() != null) sb.append("Port: ").append(getPort()).append(","); if (getMasterUsername() != null) sb.append("MasterUsername: ").append(getMasterUsername()).append(","); if (getMasterUserPassword() != null) sb.append("MasterUserPassword: ").append(getMasterUserPassword()).append(","); if (getPreferredBackupWindow() != null) sb.append("PreferredBackupWindow: ").append(getPreferredBackupWindow()).append(","); if (getPreferredMaintenanceWindow() != null) sb.append("PreferredMaintenanceWindow: ").append(getPreferredMaintenanceWindow()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getStorageEncrypted() != null) sb.append("StorageEncrypted: ").append(getStorageEncrypted()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getPreSignedUrl() != null) sb.append("PreSignedUrl: ").append(getPreSignedUrl()).append(","); if (getEnableCloudwatchLogsExports() != null) sb.append("EnableCloudwatchLogsExports: ").append(getEnableCloudwatchLogsExports()).append(","); if (getDeletionProtection() != null) sb.append("DeletionProtection: ").append(getDeletionProtection()).append(","); if (getGlobalClusterIdentifier() != null) sb.append("GlobalClusterIdentifier: ").append(getGlobalClusterIdentifier()).append(","); if (getSourceRegion() != null) sb.append("SourceRegion: ").append(getSourceRegion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDBClusterRequest == false) return false; CreateDBClusterRequest other = (CreateDBClusterRequest) obj; if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == null) return false; if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == 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.getDBClusterIdentifier() == null ^ this.getDBClusterIdentifier() == null) return false; if (other.getDBClusterIdentifier() != null && other.getDBClusterIdentifier().equals(this.getDBClusterIdentifier()) == false) return false; if (other.getDBClusterParameterGroupName() == null ^ this.getDBClusterParameterGroupName() == null) return false; if (other.getDBClusterParameterGroupName() != null && other.getDBClusterParameterGroupName().equals(this.getDBClusterParameterGroupName()) == false) return false; if (other.getVpcSecurityGroupIds() == null ^ this.getVpcSecurityGroupIds() == null) return false; if (other.getVpcSecurityGroupIds() != null && other.getVpcSecurityGroupIds().equals(this.getVpcSecurityGroupIds()) == false) return false; if (other.getDBSubnetGroupName() == null ^ this.getDBSubnetGroupName() == null) return false; if (other.getDBSubnetGroupName() != null && other.getDBSubnetGroupName().equals(this.getDBSubnetGroupName()) == false) return false; if (other.getEngine() == null ^ this.getEngine() == null) return false; if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false) return false; if (other.getEngineVersion() == null ^ this.getEngineVersion() == null) return false; if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false) return false; if (other.getPort() == null ^ this.getPort() == null) return false; if (other.getPort() != null && other.getPort().equals(this.getPort()) == false) return false; if (other.getMasterUsername() == null ^ this.getMasterUsername() == null) return false; if (other.getMasterUsername() != null && other.getMasterUsername().equals(this.getMasterUsername()) == false) return false; if (other.getMasterUserPassword() == null ^ this.getMasterUserPassword() == null) return false; if (other.getMasterUserPassword() != null && other.getMasterUserPassword().equals(this.getMasterUserPassword()) == 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.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getStorageEncrypted() == null ^ this.getStorageEncrypted() == null) return false; if (other.getStorageEncrypted() != null && other.getStorageEncrypted().equals(this.getStorageEncrypted()) == 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.getPreSignedUrl() == null ^ this.getPreSignedUrl() == null) return false; if (other.getPreSignedUrl() != null && other.getPreSignedUrl().equals(this.getPreSignedUrl()) == false) return false; if (other.getEnableCloudwatchLogsExports() == null ^ this.getEnableCloudwatchLogsExports() == null) return false; if (other.getEnableCloudwatchLogsExports() != null && other.getEnableCloudwatchLogsExports().equals(this.getEnableCloudwatchLogsExports()) == false) return false; if (other.getDeletionProtection() == null ^ this.getDeletionProtection() == null) return false; if (other.getDeletionProtection() != null && other.getDeletionProtection().equals(this.getDeletionProtection()) == false) return false; if (other.getGlobalClusterIdentifier() == null ^ this.getGlobalClusterIdentifier() == null) return false; if (other.getGlobalClusterIdentifier() != null && other.getGlobalClusterIdentifier().equals(this.getGlobalClusterIdentifier()) == false) return false; if (other.getSourceRegion() == null ^ this.getSourceRegion() == null) return false; if (other.getSourceRegion() != null && other.getSourceRegion().equals(this.getSourceRegion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); hashCode = prime * hashCode + ((getBackupRetentionPeriod() == null) ? 0 : getBackupRetentionPeriod().hashCode()); hashCode = prime * hashCode + ((getDBClusterIdentifier() == null) ? 0 : getDBClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getDBClusterParameterGroupName() == null) ? 0 : getDBClusterParameterGroupName().hashCode()); hashCode = prime * hashCode + ((getVpcSecurityGroupIds() == null) ? 0 : getVpcSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getDBSubnetGroupName() == null) ? 0 : getDBSubnetGroupName().hashCode()); hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode()); hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); hashCode = prime * hashCode + ((getMasterUsername() == null) ? 0 : getMasterUsername().hashCode()); hashCode = prime * hashCode + ((getMasterUserPassword() == null) ? 0 : getMasterUserPassword().hashCode()); hashCode = prime * hashCode + ((getPreferredBackupWindow() == null) ? 0 : getPreferredBackupWindow().hashCode()); hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getStorageEncrypted() == null) ? 0 : getStorageEncrypted().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getPreSignedUrl() == null) ? 0 : getPreSignedUrl().hashCode()); hashCode = prime * hashCode + ((getEnableCloudwatchLogsExports() == null) ? 0 : getEnableCloudwatchLogsExports().hashCode()); hashCode = prime * hashCode + ((getDeletionProtection() == null) ? 0 : getDeletionProtection().hashCode()); hashCode = prime * hashCode + ((getGlobalClusterIdentifier() == null) ? 0 : getGlobalClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getSourceRegion() == null) ? 0 : getSourceRegion().hashCode()); return hashCode; } @Override public CreateDBClusterRequest clone() { return (CreateDBClusterRequest) super.clone(); } }