AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. To learn what modifications you can make to your DB instance, call DescribeValidDBInstanceModifications before you call ModifyDBInstance.


For .NET Core this operation is only available in asynchronous form. Please refer to ModifyDBInstanceAsync.

Namespace: Amazon.Neptune
Assembly: AWSSDK.Neptune.dll
Version: 3.x.y.z


public abstract ModifyDBInstanceResponse ModifyDBInstance(
         ModifyDBInstanceRequest request
Type: Amazon.Neptune.Model.ModifyDBInstanceRequest

Container for the necessary parameters to execute the ModifyDBInstance service method.

Return Value
The response from the ModifyDBInstance service method, as returned by Neptune.


AuthorizationNotFoundException Specified CIDRIP or EC2 security group is not authorized for the specified DB security group. Neptune may not also be authorized via IAM to perform necessary actions on your behalf.
CertificateNotFoundException CertificateIdentifier does not refer to an existing certificate.
DBInstanceAlreadyExistsException User already has a DB instance with the given identifier.
DBInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
DBParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB parameter group.
DBSecurityGroupNotFoundException DBSecurityGroupName does not refer to an existing DB security group.
DBUpgradeDependencyFailureException The DB upgrade failed because a resource the DB depends on could not be modified.
DomainNotFoundException Domain does not refer to an existing Active Directory Domain.
InsufficientDBInstanceCapacityException Specified DB instance class is not available in the specified Availability Zone.
InvalidDBInstanceStateException The specified DB instance is not in the available state.
InvalidDBSecurityGroupStateException The state of the DB security group does not allow deletion.
InvalidVPCNetworkStateException DB subnet group does not cover all Availability Zones after it is created because users' change.
OptionGroupNotFoundException The designated option group could not be found.
ProvisionedIopsNotAvailableInAZException Provisioned IOPS not available in the specified Availability Zone.
StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage available across all DB instances.
StorageTypeNotSupportedException StorageType specified cannot be associated with the DB Instance.


This example immediately changes the specified settings for the specified DB instance.

To change DB instance settings

var response = client.ModifyDBInstance(new ModifyDBInstanceRequest 
    AllocatedStorage = 10,
    ApplyImmediately = true,
    BackupRetentionPeriod = 1,
    DBInstanceClass = "db.t2.small",
    DBInstanceIdentifier = "mymysqlinstance",
    MasterUserPassword = "mynewpassword",
    PreferredBackupWindow = "04:00-04:30",
    PreferredMaintenanceWindow = "Tue:05:00-Tue:05:30"

DBInstance dbInstance = response.DBInstance;


Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also