modifyReplicationSubnetGroup method

Future<ModifyReplicationSubnetGroupResponse> modifyReplicationSubnetGroup({
  1. required String replicationSubnetGroupIdentifier,
  2. required List<String> subnetIds,
  3. String? replicationSubnetGroupDescription,
})

Modifies the settings for the specified replication subnet group.

May throw AccessDeniedFault. May throw ResourceNotFoundFault. May throw ResourceQuotaExceededFault. May throw SubnetAlreadyInUse. May throw ReplicationSubnetGroupDoesNotCoverEnoughAZs. May throw InvalidSubnet.

Parameter replicationSubnetGroupIdentifier : The name of the replication instance subnet group.

Parameter subnetIds : A list of subnet IDs.

Parameter replicationSubnetGroupDescription : A description for the replication instance subnet group.

Implementation

Future<ModifyReplicationSubnetGroupResponse> modifyReplicationSubnetGroup({
  required String replicationSubnetGroupIdentifier,
  required List<String> subnetIds,
  String? replicationSubnetGroupDescription,
}) async {
  ArgumentError.checkNotNull(
      replicationSubnetGroupIdentifier, 'replicationSubnetGroupIdentifier');
  ArgumentError.checkNotNull(subnetIds, 'subnetIds');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.ModifyReplicationSubnetGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplicationSubnetGroupIdentifier': replicationSubnetGroupIdentifier,
      'SubnetIds': subnetIds,
      if (replicationSubnetGroupDescription != null)
        'ReplicationSubnetGroupDescription':
            replicationSubnetGroupDescription,
    },
  );

  return ModifyReplicationSubnetGroupResponse.fromJson(jsonResponse.body);
}