describeCacheClusters method

Future<CacheClusterMessage> describeCacheClusters({
  1. String? cacheClusterId,
  2. String? marker,
  3. int? maxRecords,
  4. bool? showCacheClustersNotInReplicationGroups,
  5. bool? showCacheNodeInfo,
})

Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cache cluster if a cluster identifier is supplied.

By default, abbreviated information about the clusters is returned. You can use the optional ShowCacheNodeInfo flag to retrieve detailed information about the cache nodes associated with the clusters. These details include the DNS address and port for the cache node endpoint.

If the cluster is in the creating state, only cluster-level information is displayed until all of the nodes are successfully provisioned.

If the cluster is in the deleting state, only cluster-level information is displayed.

If cache nodes are currently being added to the cluster, node endpoint information and creation time for the additional nodes are not displayed until they are completely provisioned. When the cluster state is available, the cluster is ready for use.

If cache nodes are currently being removed from the cluster, no endpoint information for the removed nodes is displayed.

May throw CacheClusterNotFoundFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException.

Parameter cacheClusterId : The user-supplied cluster identifier. If this parameter is specified, only information about that specific cluster is returned. This parameter isn't case sensitive.

Parameter marker : An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Parameter maxRecords : The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: minimum 20; maximum 100.

Parameter showCacheClustersNotInReplicationGroups : An optional flag that can be included in the DescribeCacheCluster request to show only nodes (API/CLI: clusters) that are not members of a replication group. In practice, this mean Memcached and single node Redis clusters.

Parameter showCacheNodeInfo : An optional flag that can be included in the DescribeCacheCluster request to retrieve information about the individual cache nodes.

Implementation

Future<CacheClusterMessage> describeCacheClusters({
  String? cacheClusterId,
  String? marker,
  int? maxRecords,
  bool? showCacheClustersNotInReplicationGroups,
  bool? showCacheNodeInfo,
}) async {
  final $request = <String, dynamic>{};
  cacheClusterId?.also((arg) => $request['CacheClusterId'] = arg);
  marker?.also((arg) => $request['Marker'] = arg);
  maxRecords?.also((arg) => $request['MaxRecords'] = arg);
  showCacheClustersNotInReplicationGroups?.also(
      (arg) => $request['ShowCacheClustersNotInReplicationGroups'] = arg);
  showCacheNodeInfo?.also((arg) => $request['ShowCacheNodeInfo'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeCacheClusters',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeCacheClustersMessage'],
    shapes: shapes,
    resultWrapper: 'DescribeCacheClustersResult',
  );
  return CacheClusterMessage.fromXml($result);
}