modifyClusterSubnetGroup method

Future<ModifyClusterSubnetGroupResult> modifyClusterSubnetGroup({
  1. required String clusterSubnetGroupName,
  2. required List<String> subnetIds,
  3. String? description,
})

Modifies a cluster subnet group to include the specified list of VPC subnets. The operation replaces the existing list of subnets with the new list of subnets.

May throw ClusterSubnetGroupNotFoundFault. May throw ClusterSubnetQuotaExceededFault. May throw SubnetAlreadyInUse. May throw InvalidSubnet. May throw UnauthorizedOperation. May throw DependentServiceRequestThrottlingFault.

Parameter clusterSubnetGroupName : The name of the subnet group to be modified.

Parameter subnetIds : An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.

Parameter description : A text description of the subnet group to be modified.

Implementation

Future<ModifyClusterSubnetGroupResult> modifyClusterSubnetGroup({
  required String clusterSubnetGroupName,
  required List<String> subnetIds,
  String? description,
}) async {
  ArgumentError.checkNotNull(
      clusterSubnetGroupName, 'clusterSubnetGroupName');
  _s.validateStringLength(
    'clusterSubnetGroupName',
    clusterSubnetGroupName,
    0,
    2147483647,
    isRequired: true,
  );
  ArgumentError.checkNotNull(subnetIds, 'subnetIds');
  _s.validateStringLength(
    'description',
    description,
    0,
    2147483647,
  );
  final $request = <String, dynamic>{};
  $request['ClusterSubnetGroupName'] = clusterSubnetGroupName;
  $request['SubnetIds'] = subnetIds;
  description?.also((arg) => $request['Description'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ModifyClusterSubnetGroup',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyClusterSubnetGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyClusterSubnetGroupResult',
  );
  return ModifyClusterSubnetGroupResult.fromXml($result);
}