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

com.amazonaws.services.docdb.model.CreateDBInstanceRequest Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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 CreateDBInstance. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDBInstanceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The DB instance 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: mydbinstance *

*/ private String dBInstanceIdentifier; /** *

* The compute and memory capacity of the DB instance; for example, db.r5.large. *

*/ private String dBInstanceClass; /** *

* The name of the database engine to be used for this instance. *

*

* Valid value: docdb *

*/ private String engine; /** *

* The Amazon EC2 Availability Zone that the DB instance is created in. *

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter * is set to true. The specified Availability Zone must be in the same AWS Region as the current * endpoint. *

*/ private String availabilityZone; /** *

* The time range each week 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 AWS 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; /** *

* Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. *

*

* Default: true *

*/ private Boolean autoMinorVersionUpgrade; /** *

* The tags to be assigned to the DB instance. *

*/ private java.util.List tags; /** *

* The identifier of the DB cluster that the instance will belong to. *

*/ private String dBClusterIdentifier; /** *

* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after * a failure of the existing primary instance. *

*

* Default: 1 *

*

* Valid values: 0-15 *

*/ private Integer promotionTier; /** *

* The DB instance 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: mydbinstance *

* * @param dBInstanceIdentifier * The DB instance 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: mydbinstance */ public void setDBInstanceIdentifier(String dBInstanceIdentifier) { this.dBInstanceIdentifier = dBInstanceIdentifier; } /** *

* The DB instance 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: mydbinstance *

* * @return The DB instance 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: mydbinstance */ public String getDBInstanceIdentifier() { return this.dBInstanceIdentifier; } /** *

* The DB instance 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: mydbinstance *

* * @param dBInstanceIdentifier * The DB instance 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: mydbinstance * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withDBInstanceIdentifier(String dBInstanceIdentifier) { setDBInstanceIdentifier(dBInstanceIdentifier); return this; } /** *

* The compute and memory capacity of the DB instance; for example, db.r5.large. *

* * @param dBInstanceClass * The compute and memory capacity of the DB instance; for example, db.r5.large. */ public void setDBInstanceClass(String dBInstanceClass) { this.dBInstanceClass = dBInstanceClass; } /** *

* The compute and memory capacity of the DB instance; for example, db.r5.large. *

* * @return The compute and memory capacity of the DB instance; for example, db.r5.large. */ public String getDBInstanceClass() { return this.dBInstanceClass; } /** *

* The compute and memory capacity of the DB instance; for example, db.r5.large. *

* * @param dBInstanceClass * The compute and memory capacity of the DB instance; for example, db.r5.large. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withDBInstanceClass(String dBInstanceClass) { setDBInstanceClass(dBInstanceClass); return this; } /** *

* The name of the database engine to be used for this instance. *

*

* Valid value: docdb *

* * @param engine * The name of the database engine to be used for this instance.

*

* Valid value: docdb */ public void setEngine(String engine) { this.engine = engine; } /** *

* The name of the database engine to be used for this instance. *

*

* Valid value: docdb *

* * @return The name of the database engine to be used for this instance.

*

* Valid value: docdb */ public String getEngine() { return this.engine; } /** *

* The name of the database engine to be used for this instance. *

*

* Valid value: docdb *

* * @param engine * The name of the database engine to be used for this instance.

*

* Valid value: docdb * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withEngine(String engine) { setEngine(engine); return this; } /** *

* The Amazon EC2 Availability Zone that the DB instance is created in. *

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter * is set to true. The specified Availability Zone must be in the same AWS Region as the current * endpoint. *

* * @param availabilityZone * The Amazon EC2 Availability Zone that the DB instance is created in.

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ * parameter is set to true. The specified Availability Zone must be in the same AWS Region as * the current endpoint. */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; } /** *

* The Amazon EC2 Availability Zone that the DB instance is created in. *

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter * is set to true. The specified Availability Zone must be in the same AWS Region as the current * endpoint. *

* * @return The Amazon EC2 Availability Zone that the DB instance is created in.

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ * parameter is set to true. The specified Availability Zone must be in the same AWS Region as * the current endpoint. */ public String getAvailabilityZone() { return this.availabilityZone; } /** *

* The Amazon EC2 Availability Zone that the DB instance is created in. *

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ parameter * is set to true. The specified Availability Zone must be in the same AWS Region as the current * endpoint. *

* * @param availabilityZone * The Amazon EC2 Availability Zone that the DB instance is created in.

*

* Default: A random, system-chosen Availability Zone in the endpoint's AWS Region. *

*

* Example: us-east-1d *

*

* Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ * parameter is set to true. The specified Availability Zone must be in the same AWS Region as * the current endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withAvailabilityZone(String availabilityZone) { setAvailabilityZone(availabilityZone); return this; } /** *

* The time range each week 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 AWS 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 time range each week 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 AWS 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 time range each week 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 AWS 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 time range each week 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 AWS 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 time range each week 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 AWS 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 time range each week 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 AWS 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 CreateDBInstanceRequest withPreferredMaintenanceWindow(String preferredMaintenanceWindow) { setPreferredMaintenanceWindow(preferredMaintenanceWindow); return this; } /** *

* Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. *

*

* Default: true *

* * @param autoMinorVersionUpgrade * Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance * window.

*

* Default: true */ public void setAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) { this.autoMinorVersionUpgrade = autoMinorVersionUpgrade; } /** *

* Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. *

*

* Default: true *

* * @return Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance * window.

*

* Default: true */ public Boolean getAutoMinorVersionUpgrade() { return this.autoMinorVersionUpgrade; } /** *

* Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. *

*

* Default: true *

* * @param autoMinorVersionUpgrade * Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance * window.

*

* Default: true * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) { setAutoMinorVersionUpgrade(autoMinorVersionUpgrade); return this; } /** *

* Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. *

*

* Default: true *

* * @return Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance * window.

*

* Default: true */ public Boolean isAutoMinorVersionUpgrade() { return this.autoMinorVersionUpgrade; } /** *

* The tags to be assigned to the DB instance. *

* * @return The tags to be assigned to the DB instance. */ public java.util.List getTags() { return tags; } /** *

* The tags to be assigned to the DB instance. *

* * @param tags * The tags to be assigned to the DB instance. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* The tags to be assigned to the DB instance. *

*

* 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 DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The tags to be assigned to the DB instance. *

* * @param tags * The tags to be assigned to the DB instance. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The identifier of the DB cluster that the instance will belong to. *

* * @param dBClusterIdentifier * The identifier of the DB cluster that the instance will belong to. */ public void setDBClusterIdentifier(String dBClusterIdentifier) { this.dBClusterIdentifier = dBClusterIdentifier; } /** *

* The identifier of the DB cluster that the instance will belong to. *

* * @return The identifier of the DB cluster that the instance will belong to. */ public String getDBClusterIdentifier() { return this.dBClusterIdentifier; } /** *

* The identifier of the DB cluster that the instance will belong to. *

* * @param dBClusterIdentifier * The identifier of the DB cluster that the instance will belong to. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withDBClusterIdentifier(String dBClusterIdentifier) { setDBClusterIdentifier(dBClusterIdentifier); return this; } /** *

* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after * a failure of the existing primary instance. *

*

* Default: 1 *

*

* Valid values: 0-15 *

* * @param promotionTier * A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance * after a failure of the existing primary instance.

*

* Default: 1 *

*

* Valid values: 0-15 */ public void setPromotionTier(Integer promotionTier) { this.promotionTier = promotionTier; } /** *

* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after * a failure of the existing primary instance. *

*

* Default: 1 *

*

* Valid values: 0-15 *

* * @return A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary * instance after a failure of the existing primary instance.

*

* Default: 1 *

*

* Valid values: 0-15 */ public Integer getPromotionTier() { return this.promotionTier; } /** *

* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after * a failure of the existing primary instance. *

*

* Default: 1 *

*

* Valid values: 0-15 *

* * @param promotionTier * A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance * after a failure of the existing primary instance.

*

* Default: 1 *

*

* Valid values: 0-15 * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDBInstanceRequest withPromotionTier(Integer promotionTier) { setPromotionTier(promotionTier); 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 (getDBInstanceIdentifier() != null) sb.append("DBInstanceIdentifier: ").append(getDBInstanceIdentifier()).append(","); if (getDBInstanceClass() != null) sb.append("DBInstanceClass: ").append(getDBInstanceClass()).append(","); if (getEngine() != null) sb.append("Engine: ").append(getEngine()).append(","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getPreferredMaintenanceWindow() != null) sb.append("PreferredMaintenanceWindow: ").append(getPreferredMaintenanceWindow()).append(","); if (getAutoMinorVersionUpgrade() != null) sb.append("AutoMinorVersionUpgrade: ").append(getAutoMinorVersionUpgrade()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getDBClusterIdentifier() != null) sb.append("DBClusterIdentifier: ").append(getDBClusterIdentifier()).append(","); if (getPromotionTier() != null) sb.append("PromotionTier: ").append(getPromotionTier()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDBInstanceRequest == false) return false; CreateDBInstanceRequest other = (CreateDBInstanceRequest) obj; if (other.getDBInstanceIdentifier() == null ^ this.getDBInstanceIdentifier() == null) return false; if (other.getDBInstanceIdentifier() != null && other.getDBInstanceIdentifier().equals(this.getDBInstanceIdentifier()) == false) return false; if (other.getDBInstanceClass() == null ^ this.getDBInstanceClass() == null) return false; if (other.getDBInstanceClass() != null && other.getDBInstanceClass().equals(this.getDBInstanceClass()) == 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.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == 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.getAutoMinorVersionUpgrade() == null ^ this.getAutoMinorVersionUpgrade() == null) return false; if (other.getAutoMinorVersionUpgrade() != null && other.getAutoMinorVersionUpgrade().equals(this.getAutoMinorVersionUpgrade()) == 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.getDBClusterIdentifier() == null ^ this.getDBClusterIdentifier() == null) return false; if (other.getDBClusterIdentifier() != null && other.getDBClusterIdentifier().equals(this.getDBClusterIdentifier()) == false) return false; if (other.getPromotionTier() == null ^ this.getPromotionTier() == null) return false; if (other.getPromotionTier() != null && other.getPromotionTier().equals(this.getPromotionTier()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDBInstanceIdentifier() == null) ? 0 : getDBInstanceIdentifier().hashCode()); hashCode = prime * hashCode + ((getDBInstanceClass() == null) ? 0 : getDBInstanceClass().hashCode()); hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode()); hashCode = prime * hashCode + ((getAutoMinorVersionUpgrade() == null) ? 0 : getAutoMinorVersionUpgrade().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getDBClusterIdentifier() == null) ? 0 : getDBClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getPromotionTier() == null) ? 0 : getPromotionTier().hashCode()); return hashCode; } @Override public CreateDBInstanceRequest clone() { return (CreateDBInstanceRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy