deleteDataSource method

Future<void> deleteDataSource({
  1. required String apiId,
  2. required String name,
})

Deletes a DataSource object.

May throw BadRequestException. May throw ConcurrentModificationException. May throw NotFoundException. May throw UnauthorizedException. May throw InternalFailureException.

Parameter apiId : The API ID.

Parameter name : The name of the data source.

Implementation

Future<void> deleteDataSource({
  required String apiId,
  required String name,
}) async {
  ArgumentError.checkNotNull(apiId, 'apiId');
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    65536,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/v1/apis/${Uri.encodeComponent(apiId)}/datasources/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
}