deleteDataSource method

Future<DeleteDataSourceOutput> deleteDataSource({
  1. required String domainIdentifier,
  2. required String identifier,
  3. String? clientToken,
  4. bool? retainPermissionsOnRevokeFailure,
})

Deletes a data source in Amazon DataZone.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The ID of the Amazon DataZone domain in which the data source is deleted.

Parameter identifier : The identifier of the data source that is deleted.

Parameter clientToken : A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Parameter retainPermissionsOnRevokeFailure : Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source.

Implementation

Future<DeleteDataSourceOutput> deleteDataSource({
  required String domainIdentifier,
  required String identifier,
  String? clientToken,
  bool? retainPermissionsOnRevokeFailure,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
    if (retainPermissionsOnRevokeFailure != null)
      'retainPermissionsOnRevokeFailure': [
        retainPermissionsOnRevokeFailure.toString()
      ],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/data-sources/${Uri.encodeComponent(identifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDataSourceOutput.fromJson(response);
}