rebootCacheCluster method
Reboots some, or all, of the cache nodes within a provisioned cluster. This operation applies any modified cache parameter groups to the cluster. The reboot operation takes place as soon as possible, and results in a momentary outage to the cluster. During the reboot, the cluster status is set to REBOOTING.
The reboot causes the contents of the cache (for each cache node being rebooted) to be lost.
When the reboot is complete, a cluster event is created.
Rebooting a cluster is currently supported on Memcached and Redis (cluster mode disabled) clusters. Rebooting is not supported on Redis (cluster mode enabled) clusters.
If you make changes to parameters that require a Redis (cluster mode enabled) cluster reboot for the changes to be applied, see Rebooting a Cluster for an alternate process.
May throw InvalidCacheClusterStateFault. May throw CacheClusterNotFoundFault.
Parameter cacheClusterId
:
The cluster identifier. This parameter is stored as a lowercase string.
Parameter cacheNodeIdsToReboot
:
A list of cache node IDs to reboot. A node ID is a numeric identifier
(0001, 0002, etc.). To reboot an entire cluster, specify all of the cache
node IDs.
Implementation
Future<RebootCacheClusterResult> rebootCacheCluster({
required String cacheClusterId,
required List<String> cacheNodeIdsToReboot,
}) async {
ArgumentError.checkNotNull(cacheClusterId, 'cacheClusterId');
ArgumentError.checkNotNull(cacheNodeIdsToReboot, 'cacheNodeIdsToReboot');
final $request = <String, dynamic>{};
$request['CacheClusterId'] = cacheClusterId;
$request['CacheNodeIdsToReboot'] = cacheNodeIdsToReboot;
final $result = await _protocol.send(
$request,
action: 'RebootCacheCluster',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['RebootCacheClusterMessage'],
shapes: shapes,
resultWrapper: 'RebootCacheClusterResult',
);
return RebootCacheClusterResult.fromXml($result);
}