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 ModifyDBParameterGroup operation.

Modifies the parameters of a DB parameter group. To modify more than one parameter, submit a list of the following: ParameterName , ParameterValue , and ApplyMethod . A maximum of 20 parameters can be modified in a single request.

NOTE: Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot without failover to the DB instance associated with the parameter group before the change can take effect.

IMPORTANT: After you modify 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 modify 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 ModifyDBParameterGroupRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the DB parameter group.

Constraints:

  • Must be the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
 
     private String dBParameterGroupName;

    
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

 
Default constructor for a new ModifyDBParameterGroupRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public ModifyDBParameterGroupRequest() {}
    
    
Constructs a new ModifyDBParameterGroupRequest 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 the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
parameters An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

    public ModifyDBParameterGroupRequest(String dBParameterGroupNamejava.util.List<Parameterparameters) {
        setDBParameterGroupName(dBParameterGroupName);
        setParameters(parameters);
    }

    
The name of the DB parameter group.

Constraints:

  • Must be the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Returns:
The name of the DB parameter group.

Constraints:

  • Must be the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
    public String getDBParameterGroupName() {
        return ;
    }
    
    
The name of the DB parameter group.

Constraints:

  • Must be the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Parameters:
dBParameterGroupName The name of the DB parameter group.

Constraints:

  • Must be the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
    public void setDBParameterGroupName(String dBParameterGroupName) {
        this. = dBParameterGroupName;
    }
    
    
The name of the DB parameter group.

Constraints:

  • Must be the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

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 the name of an existing DB parameter group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyDBParameterGroupRequest withDBParameterGroupName(String dBParameterGroupName) {
        this. = dBParameterGroupName;
        return this;
    }

    
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

Returns:
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

    public java.util.List<ParametergetParameters() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Parameter>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

Parameters:
parameters An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

    public void setParameters(java.util.Collection<Parameterparameters) {
        if (parameters == null) {
            this. = null;
            return;
        }
        parametersCopy.addAll(parameters);
        this. = parametersCopy;
    }
    
    
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

NOTE: This method appends the values to the existing list (if any). Use setParameters(java.util.Collection) or withParameters(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:
parameters An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

Returns:
A reference to this updated object so that method calls can be chained together.
    public ModifyDBParameterGroupRequest withParameters(Parameter... parameters) {
        if (getParameters() == nullsetParameters(new java.util.ArrayList<Parameter>(parameters.length));
        for (Parameter value : parameters) {
            getParameters().add(value);
        }
        return this;
    }
    
    
An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

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

Parameters:
parameters An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request.

Valid Values (for the application method): immediate | pending-reboot <note>You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when you reboot the DB instance without failover. </note>

Returns:
A reference to this updated object so that method calls can be chained together.
        if (parameters == null) {
            this. = null;
        } else {
            parametersCopy.addAll(parameters);
            this. = parametersCopy;
        }
        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 (getParameters() != nullsb.append("Parameters: " + getParameters() );
        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 + ((getParameters() == null) ? 0 : getParameters().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ModifyDBParameterGroupRequest == falsereturn false;
        
        if (other.getDBParameterGroupName() == null ^ this.getDBParameterGroupName() == nullreturn false;
        if (other.getDBParameterGroupName() != null && other.getDBParameterGroupName().equals(this.getDBParameterGroupName()) == falsereturn false
        if (other.getParameters() == null ^ this.getParameters() == nullreturn false;
        if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (ModifyDBParameterGroupRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X