updateCluster method
- required String clusterName,
- String? aCLName,
- String? description,
- String? engine,
- String? engineVersion,
- IpDiscovery? ipDiscovery,
- String? maintenanceWindow,
- String? nodeType,
- String? parameterGroupName,
- ReplicaConfigurationRequest? replicaConfiguration,
- List<
String> ? securityGroupIds, - ShardConfigurationRequest? shardConfiguration,
- int? snapshotRetentionLimit,
- String? snapshotWindow,
- String? snsTopicArn,
- String? snsTopicStatus,
Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration settings by specifying the settings and the new values.
May throw ACLNotFoundFault.
May throw ClusterNotFoundFault.
May throw ClusterQuotaForCustomerExceededFault.
May throw InvalidACLStateFault.
May throw InvalidClusterStateFault.
May throw InvalidKMSKeyFault.
May throw InvalidNodeStateFault.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
May throw InvalidVPCNetworkStateFault.
May throw NodeQuotaForClusterExceededFault.
May throw NodeQuotaForCustomerExceededFault.
May throw NoOperationFault.
May throw ParameterGroupNotFoundFault.
May throw ServiceLinkedRoleNotFoundFault.
May throw ShardsPerClusterQuotaExceededFault.
Parameter clusterName :
The name of the cluster to update.
Parameter aCLName :
The Access Control List that is associated with the cluster.
Parameter description :
The description of the cluster to update.
Parameter engine :
The name of the engine to be used for the cluster.
Parameter engineVersion :
The upgraded version of the engine to be run on the nodes. You can upgrade
to a newer engine version, but you cannot downgrade to an earlier engine
version. If you want to use an earlier engine version, you must delete the
existing cluster and create it anew with the earlier engine version.
Parameter ipDiscovery :
The mechanism for discovering IP addresses for the cluster discovery
protocol. Valid values are 'ipv4' or 'ipv6'. When set to 'ipv4', cluster
discovery functions such as cluster slots, cluster shards, and cluster
nodes will return IPv4 addresses for cluster nodes. When set to 'ipv6',
the cluster discovery functions return IPv6 addresses for cluster nodes.
The value must be compatible with the NetworkType parameter. If not
specified, the default is 'ipv4'.
Parameter maintenanceWindow :
Specifies the weekly time range during which maintenance on the cluster is
performed. It is specified as a range in the format
ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is
a 60 minute period.
Valid values for ddd are:
-
sun -
mon -
tue -
wed -
thu -
fri -
sat
sun:23:00-mon:01:30
Parameter nodeType :
A valid node type that you want to scale this cluster up or down to.
Parameter parameterGroupName :
The name of the parameter group to update.
Parameter replicaConfiguration :
The number of replicas that will reside in each shard.
Parameter securityGroupIds :
The SecurityGroupIds to update.
Parameter shardConfiguration :
The number of shards in the cluster.
Parameter snapshotRetentionLimit :
The number of days for which MemoryDB retains automatic cluster snapshots
before deleting them. For example, if you set SnapshotRetentionLimit to 5,
a snapshot that was taken today is retained for 5 days before being
deleted.
Parameter snapshotWindow :
The daily time range (in UTC) during which MemoryDB begins taking a daily
snapshot of your cluster.
Parameter snsTopicArn :
The SNS topic ARN to update.
Parameter snsTopicStatus :
The status of the Amazon SNS notification topic. Notifications are sent
only if the status is active.
Implementation
Future<UpdateClusterResponse> updateCluster({
required String clusterName,
String? aCLName,
String? description,
String? engine,
String? engineVersion,
IpDiscovery? ipDiscovery,
String? maintenanceWindow,
String? nodeType,
String? parameterGroupName,
ReplicaConfigurationRequest? replicaConfiguration,
List<String>? securityGroupIds,
ShardConfigurationRequest? shardConfiguration,
int? snapshotRetentionLimit,
String? snapshotWindow,
String? snsTopicArn,
String? snsTopicStatus,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonMemoryDB.UpdateCluster'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterName': clusterName,
if (aCLName != null) 'ACLName': aCLName,
if (description != null) 'Description': description,
if (engine != null) 'Engine': engine,
if (engineVersion != null) 'EngineVersion': engineVersion,
if (ipDiscovery != null) 'IpDiscovery': ipDiscovery.value,
if (maintenanceWindow != null) 'MaintenanceWindow': maintenanceWindow,
if (nodeType != null) 'NodeType': nodeType,
if (parameterGroupName != null)
'ParameterGroupName': parameterGroupName,
if (replicaConfiguration != null)
'ReplicaConfiguration': replicaConfiguration,
if (securityGroupIds != null) 'SecurityGroupIds': securityGroupIds,
if (shardConfiguration != null)
'ShardConfiguration': shardConfiguration,
if (snapshotRetentionLimit != null)
'SnapshotRetentionLimit': snapshotRetentionLimit,
if (snapshotWindow != null) 'SnapshotWindow': snapshotWindow,
if (snsTopicArn != null) 'SnsTopicArn': snsTopicArn,
if (snsTopicStatus != null) 'SnsTopicStatus': snsTopicStatus,
},
);
return UpdateClusterResponse.fromJson(jsonResponse.body);
}