updateSubnetGroup method

Future<UpdateSubnetGroupResponse> updateSubnetGroup({
  1. required String subnetGroupName,
  2. String? description,
  3. List<String>? subnetIds,
})

Modifies an existing subnet group.

May throw SubnetGroupNotFoundFault. May throw SubnetQuotaExceededFault. May throw SubnetInUse. May throw InvalidSubnet. May throw ServiceLinkedRoleNotFoundFault.

Parameter subnetGroupName : The name of the subnet group.

Parameter description : A description of the subnet group.

Parameter subnetIds : A list of subnet IDs in the subnet group.

Implementation

Future<UpdateSubnetGroupResponse> updateSubnetGroup({
  required String subnetGroupName,
  String? description,
  List<String>? subnetIds,
}) async {
  ArgumentError.checkNotNull(subnetGroupName, 'subnetGroupName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDAXV3.UpdateSubnetGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SubnetGroupName': subnetGroupName,
      if (description != null) 'Description': description,
      if (subnetIds != null) 'SubnetIds': subnetIds,
    },
  );

  return UpdateSubnetGroupResponse.fromJson(jsonResponse.body);
}