modifyDBCluster method
- required String dBClusterIdentifier,
- bool? allowMajorVersionUpgrade,
- bool? applyImmediately,
- int? backupRetentionPeriod,
- CloudwatchLogsExportConfiguration? cloudwatchLogsExportConfiguration,
- bool? copyTagsToSnapshot,
- String? dBClusterParameterGroupName,
- String? dBInstanceParameterGroupName,
- bool? deletionProtection,
- bool? enableIAMDatabaseAuthentication,
- String? engineVersion,
- String? masterUserPassword,
- String? newDBClusterIdentifier,
- String? optionGroupName,
- int? port,
- String? preferredBackupWindow,
- String? preferredMaintenanceWindow,
- ServerlessV2ScalingConfiguration? serverlessV2ScalingConfiguration,
- String? storageType,
- List<
String> ? vpcSecurityGroupIds,
Modify a setting for a DB cluster. You can change one or more database configuration parameters by specifying these parameters and the new values in the request.
May throw DBClusterAlreadyExistsFault.
May throw DBClusterNotFoundFault.
May throw DBClusterParameterGroupNotFoundFault.
May throw DBSubnetGroupNotFoundFault.
May throw InvalidDBClusterStateFault.
May throw InvalidDBInstanceStateFault.
May throw InvalidDBSecurityGroupStateFault.
May throw InvalidDBSubnetGroupStateFault.
May throw InvalidSubnet.
May throw InvalidVPCNetworkStateFault.
May throw StorageQuotaExceededFault.
May throw StorageTypeNotSupportedFault.
Parameter dBClusterIdentifier :
The DB cluster identifier for the cluster being modified. This parameter
is not case-sensitive.
Constraints:
- Must match the identifier of an existing DBCluster.
Parameter allowMajorVersionUpgrade :
A value that indicates whether upgrades between different major versions
are allowed.
Constraints: You must set the allow-major-version-upgrade flag when
providing an EngineVersion parameter that uses a different
major version than the DB cluster's current version.
Parameter applyImmediately :
A value that specifies whether the modifications in this request and any
pending modifications are asynchronously applied as soon as possible,
regardless of the PreferredMaintenanceWindow setting for the
DB cluster. If this parameter is set to false, changes to the
DB cluster are applied during the next maintenance window.
The ApplyImmediately parameter only affects
NewDBClusterIdentifier values. If you set the
ApplyImmediately parameter value to false, then changes to
NewDBClusterIdentifier values are applied during the next
maintenance window. All other changes are applied immediately, regardless
of the value of the ApplyImmediately parameter.
Default: false
Parameter backupRetentionPeriod :
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
Parameter cloudwatchLogsExportConfiguration :
The configuration setting for the log types to be enabled for export to
CloudWatch Logs for a specific DB cluster. See Using
the CLI to publish Neptune audit logs to CloudWatch Logs.
Parameter copyTagsToSnapshot :
If set to true, tags are copied to any snapshot of the DB
cluster that is created.
Parameter dBClusterParameterGroupName :
The name of the DB cluster parameter group to use for the DB cluster.
Parameter dBInstanceParameterGroupName :
The name of the DB parameter group to apply to all instances of the DB
cluster.
Default: The existing name setting
Constraints:
- The DB parameter group must be in the same DB parameter group family as the target DB cluster version.
-
The
DBInstanceParameterGroupNameparameter is only valid in combination with theAllowMajorVersionUpgradeparameter.
Parameter deletionProtection :
A value that indicates whether the DB cluster has deletion protection
enabled. The database can't be deleted when deletion protection is
enabled. By default, deletion protection is disabled.
Parameter enableIAMDatabaseAuthentication :
True to enable mapping of Amazon Identity and Access Management (IAM)
accounts to database accounts, and otherwise false.
Default: false
Parameter engineVersion :
The version number of the database engine to which you want to upgrade.
Changing this parameter results in an outage. The change is applied during
the next maintenance window unless the ApplyImmediately
parameter is set to true.
For a list of valid engine versions, see Engine Releases for Amazon Neptune, or call DescribeDBEngineVersions.
Parameter masterUserPassword :
Not supported by Neptune.
Parameter newDBClusterIdentifier :
The new DB cluster identifier for the DB cluster when renaming a DB
cluster. This value 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
my-cluster2
Parameter optionGroupName :
Not supported by Neptune.
Parameter port :
The port number on which the DB cluster accepts connections.
Constraints: Value must be 1150-65535
Default: The same port as the original DB cluster.
Parameter preferredBackupWindow :
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 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.
Parameter 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 Region, occurring on a random day of the week.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Constraints: Minimum 30-minute window.
Parameter serverlessV2ScalingConfiguration :
Contains the scaling configuration of a Neptune Serverless DB cluster.
For more information, see Using Amazon Neptune Serverless in the Amazon Neptune User Guide.
Parameter storageType :
The storage type to associate with the DB cluster.
Valid Values:
-
standard– ( the default ) Configures cost-effective database storage for applications with moderate to small I/O usage. -
iopt1– Enables I/O-Optimized storage that's designed to meet the needs of I/O-intensive graph workloads that require predictable pricing with low I/O latency and consistent I/O throughput.Neptune I/O-Optimized storage is only available starting with engine release 1.3.0.0.
Parameter vpcSecurityGroupIds :
A list of VPC security groups that the DB cluster will belong to.
Implementation
Future<ModifyDBClusterResult> modifyDBCluster({
required String dBClusterIdentifier,
bool? allowMajorVersionUpgrade,
bool? applyImmediately,
int? backupRetentionPeriod,
CloudwatchLogsExportConfiguration? cloudwatchLogsExportConfiguration,
bool? copyTagsToSnapshot,
String? dBClusterParameterGroupName,
String? dBInstanceParameterGroupName,
bool? deletionProtection,
bool? enableIAMDatabaseAuthentication,
String? engineVersion,
String? masterUserPassword,
String? newDBClusterIdentifier,
String? optionGroupName,
int? port,
String? preferredBackupWindow,
String? preferredMaintenanceWindow,
ServerlessV2ScalingConfiguration? serverlessV2ScalingConfiguration,
String? storageType,
List<String>? vpcSecurityGroupIds,
}) async {
final $request = <String, String>{
'DBClusterIdentifier': dBClusterIdentifier,
if (allowMajorVersionUpgrade != null)
'AllowMajorVersionUpgrade': allowMajorVersionUpgrade.toString(),
if (applyImmediately != null)
'ApplyImmediately': applyImmediately.toString(),
if (backupRetentionPeriod != null)
'BackupRetentionPeriod': backupRetentionPeriod.toString(),
if (cloudwatchLogsExportConfiguration != null)
for (var e1 in cloudwatchLogsExportConfiguration.toQueryMap().entries)
'CloudwatchLogsExportConfiguration.${e1.key}': e1.value,
if (copyTagsToSnapshot != null)
'CopyTagsToSnapshot': copyTagsToSnapshot.toString(),
if (dBClusterParameterGroupName != null)
'DBClusterParameterGroupName': dBClusterParameterGroupName,
if (dBInstanceParameterGroupName != null)
'DBInstanceParameterGroupName': dBInstanceParameterGroupName,
if (deletionProtection != null)
'DeletionProtection': deletionProtection.toString(),
if (enableIAMDatabaseAuthentication != null)
'EnableIAMDatabaseAuthentication':
enableIAMDatabaseAuthentication.toString(),
if (engineVersion != null) 'EngineVersion': engineVersion,
if (masterUserPassword != null) 'MasterUserPassword': masterUserPassword,
if (newDBClusterIdentifier != null)
'NewDBClusterIdentifier': newDBClusterIdentifier,
if (optionGroupName != null) 'OptionGroupName': optionGroupName,
if (port != null) 'Port': port.toString(),
if (preferredBackupWindow != null)
'PreferredBackupWindow': preferredBackupWindow,
if (preferredMaintenanceWindow != null)
'PreferredMaintenanceWindow': preferredMaintenanceWindow,
if (serverlessV2ScalingConfiguration != null)
for (var e1 in serverlessV2ScalingConfiguration.toQueryMap().entries)
'ServerlessV2ScalingConfiguration.${e1.key}': e1.value,
if (storageType != null) 'StorageType': storageType,
if (vpcSecurityGroupIds != null)
if (vpcSecurityGroupIds.isEmpty)
'VpcSecurityGroupIds': ''
else
for (var i1 = 0; i1 < vpcSecurityGroupIds.length; i1++)
'VpcSecurityGroupIds.VpcSecurityGroupId.${i1 + 1}':
vpcSecurityGroupIds[i1],
};
final $result = await _protocol.send(
$request,
action: 'ModifyDBCluster',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyDBClusterResult',
);
return ModifyDBClusterResult.fromXml($result);
}