modifyCacheSubnetGroup method

Future<ModifyCacheSubnetGroupResult> modifyCacheSubnetGroup({
  1. required String cacheSubnetGroupName,
  2. String? cacheSubnetGroupDescription,
  3. List<String>? subnetIds,
})

Modifies an existing cache subnet group.

May throw CacheSubnetGroupNotFoundFault. May throw CacheSubnetQuotaExceededFault. May throw SubnetInUse. May throw InvalidSubnet. May throw SubnetNotAllowedFault.

Parameter cacheSubnetGroupName : The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup

Parameter cacheSubnetGroupDescription : A description of the cache subnet group.

Parameter subnetIds : The EC2 subnet IDs for the cache subnet group.

Implementation

Future<ModifyCacheSubnetGroupResult> modifyCacheSubnetGroup({
  required String cacheSubnetGroupName,
  String? cacheSubnetGroupDescription,
  List<String>? subnetIds,
}) async {
  ArgumentError.checkNotNull(cacheSubnetGroupName, 'cacheSubnetGroupName');
  final $request = <String, dynamic>{};
  $request['CacheSubnetGroupName'] = cacheSubnetGroupName;
  cacheSubnetGroupDescription
      ?.also((arg) => $request['CacheSubnetGroupDescription'] = arg);
  subnetIds?.also((arg) => $request['SubnetIds'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ModifyCacheSubnetGroup',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyCacheSubnetGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyCacheSubnetGroupResult',
  );
  return ModifyCacheSubnetGroupResult.fromXml($result);
}