Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.rds.model;
 
 
Container for the parameters to the CreateDBParameterGroup operation.

Creates a new DB parameter group.

A DB parameter group is initially created with the default parameters for the database engine used by the DB instance. To provide custom values for any of the parameters, you must modify the group after creating it using ModifyDBParameterGroup . Once you've created a DB parameter group, you need to associate it with your DB instance using ModifyDBInstance . When you associate a new DB parameter group with a running DB instance, you need to reboot the DB instance without failover for the new DB parameter group and associated settings to take effect.

IMPORTANT: After you create a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon RDS to fully complete the create action before the parameter group is used as the default for a new DB instance. This is especially important for parameters that are critical when creating the default database for a DB instance, such as the character set for the default database defined by the character_set_database parameter. You can use the Parameter Groups option of the Amazon RDS console or the DescribeDBParameters command to verify that your DB parameter group has been created or modified.

 
 public class CreateDBParameterGroupRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>
 
     private String dBParameterGroupName;

    
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.
 
     private String dBParameterGroupFamily;

    
The description for the DB parameter group.
 
     private String description;

    
A list of tags.
 
Default constructor for a new CreateDBParameterGroupRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public CreateDBParameterGroupRequest() {}
    
    
Constructs a new CreateDBParameterGroupRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
dBParameterGroupName The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>
dBParameterGroupFamily The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.
description The description for the DB parameter group.
    public CreateDBParameterGroupRequest(String dBParameterGroupNameString dBParameterGroupFamilyString description) {
        setDBParameterGroupName(dBParameterGroupName);
        setDBParameterGroupFamily(dBParameterGroupFamily);
        setDescription(description);
    }

    
The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>

Returns:
The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>
    public String getDBParameterGroupName() {
        return ;
    }
    
    
The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>

Parameters:
dBParameterGroupName The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>
    public void setDBParameterGroupName(String dBParameterGroupName) {
        this. = dBParameterGroupName;
    }
    
    
The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>

Returns a reference to this object so that method calls can be chained together.

Parameters:
dBParameterGroupName The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
<note>This value is stored as a lower-case string.</note>
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDBParameterGroupRequest withDBParameterGroupName(String dBParameterGroupName) {
        this. = dBParameterGroupName;
        return this;
    }

    
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

Returns:
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.
    public String getDBParameterGroupFamily() {
        return ;
    }
    
    
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

Parameters:
dBParameterGroupFamily The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.
    public void setDBParameterGroupFamily(String dBParameterGroupFamily) {
        this. = dBParameterGroupFamily;
    }
    
    
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

Returns a reference to this object so that method calls can be chained together.

Parameters:
dBParameterGroupFamily The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDBParameterGroupRequest withDBParameterGroupFamily(String dBParameterGroupFamily) {
        this. = dBParameterGroupFamily;
        return this;
    }

    
The description for the DB parameter group.

Returns:
The description for the DB parameter group.
    public String getDescription() {
        return ;
    }
    
    
The description for the DB parameter group.

Parameters:
description The description for the DB parameter group.
    public void setDescription(String description) {
        this. = description;
    }
    
    
The description for the DB parameter group.

Returns a reference to this object so that method calls can be chained together.

Parameters:
description The description for the DB parameter group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDBParameterGroupRequest withDescription(String description) {
        this. = description;
        return this;
    }

    
A list of tags.

Returns:
A list of tags.
    public java.util.List<TaggetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of tags.

Parameters:
tags A list of tags.
    public void setTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
A list of tags.

NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags A list of tags.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateDBParameterGroupRequest withTags(Tag... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<Tag>(tags.length));
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
A list of tags.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags A list of tags.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDBParameterGroupName() != nullsb.append("DBParameterGroupName: " + getDBParameterGroupName() + ",");
        if (getDBParameterGroupFamily() != nullsb.append("DBParameterGroupFamily: " + getDBParameterGroupFamily() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDBParameterGroupName() == null) ? 0 : getDBParameterGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getDBParameterGroupFamily() == null) ? 0 : getDBParameterGroupFamily().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateDBParameterGroupRequest == falsereturn false;
        
        if (other.getDBParameterGroupName() == null ^ this.getDBParameterGroupName() == nullreturn false;
        if (other.getDBParameterGroupName() != null && other.getDBParameterGroupName().equals(this.getDBParameterGroupName()) == falsereturn false
        if (other.getDBParameterGroupFamily() == null ^ this.getDBParameterGroupFamily() == nullreturn false;
        if (other.getDBParameterGroupFamily() != null && other.getDBParameterGroupFamily().equals(this.getDBParameterGroupFamily()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (CreateDBParameterGroupRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X