updateDbCluster method

Future<UpdateDbClusterOutput> updateDbCluster({
  1. required String dbClusterId,
  2. DbInstanceType? dbInstanceType,
  3. String? dbParameterGroupIdentifier,
  4. FailoverMode? failoverMode,
  5. LogDeliveryConfiguration? logDeliveryConfiguration,
  6. MaintenanceSchedule? maintenanceSchedule,
  7. int? port,
})

Updates a Timestream for InfluxDB cluster.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dbClusterId : Service-generated unique identifier of the DB cluster to update.

Parameter dbInstanceType : Update the DB cluster to use the specified DB instance Type.

Parameter dbParameterGroupIdentifier : Update the DB cluster to use the specified DB parameter group.

Parameter failoverMode : Update the DB cluster's failover behavior.

Parameter logDeliveryConfiguration : The log delivery configuration to apply to the DB cluster.

Parameter maintenanceSchedule : Specifies the maintenance schedule for the DB cluster, including the preferred maintenance window and timezone.

Parameter port : Update the DB cluster to use the specified port.

Implementation

Future<UpdateDbClusterOutput> updateDbCluster({
  required String dbClusterId,
  DbInstanceType? dbInstanceType,
  String? dbParameterGroupIdentifier,
  FailoverMode? failoverMode,
  LogDeliveryConfiguration? logDeliveryConfiguration,
  MaintenanceSchedule? maintenanceSchedule,
  int? port,
}) async {
  _s.validateNumRange(
    'port',
    port,
    1024,
    65535,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonTimestreamInfluxDB.UpdateDbCluster'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'dbClusterId': dbClusterId,
      if (dbInstanceType != null) 'dbInstanceType': dbInstanceType.value,
      if (dbParameterGroupIdentifier != null)
        'dbParameterGroupIdentifier': dbParameterGroupIdentifier,
      if (failoverMode != null) 'failoverMode': failoverMode.value,
      if (logDeliveryConfiguration != null)
        'logDeliveryConfiguration': logDeliveryConfiguration,
      if (maintenanceSchedule != null)
        'maintenanceSchedule': maintenanceSchedule,
      if (port != null) 'port': port,
    },
  );

  return UpdateDbClusterOutput.fromJson(jsonResponse.body);
}