modifyCacheSubnetGroup method
Modifies an existing cache subnet group.
May throw CacheSubnetGroupNotFoundFault.
May throw CacheSubnetQuotaExceededFault.
May throw InvalidSubnet.
May throw SubnetInUse.
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 {
final $request = <String, String>{
'CacheSubnetGroupName': cacheSubnetGroupName,
if (cacheSubnetGroupDescription != null)
'CacheSubnetGroupDescription': cacheSubnetGroupDescription,
if (subnetIds != null)
if (subnetIds.isEmpty)
'SubnetIds': ''
else
for (var i1 = 0; i1 < subnetIds.length; i1++)
'SubnetIds.SubnetIdentifier.${i1 + 1}': subnetIds[i1],
};
final $result = await _protocol.send(
$request,
action: 'ModifyCacheSubnetGroup',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyCacheSubnetGroupResult',
);
return ModifyCacheSubnetGroupResult.fromXml($result);
}