deleteAsset method

Future<void> deleteAsset({
  1. required String domainIdentifier,
  2. required String identifier,
})

Deletes an asset in Amazon DataZone.

  • --domain-identifier must refer to a valid and existing domain.
  • --identifier must refer to an existing asset in the specified domain.
  • Asset must not be referenced in any existing asset filters.
  • Asset must not be linked to any draft or published data product.
  • User must have delete permissions for the domain and project.

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

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

Parameter identifier : The identifier of the asset that is deleted.

Implementation

Future<void> deleteAsset({
  required String domainIdentifier,
  required String identifier,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/assets/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
}