deleteAssetFile method

Future<void> deleteAssetFile({
  1. required String agentSpaceId,
  2. required String assetId,
  3. required String path,
})

Deletes a file from an asset

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

Parameter agentSpaceId : The unique identifier for the agent space containing the asset

Parameter assetId : The unique identifier of the asset containing the file

Parameter path : The path of the file within the asset to delete

Implementation

Future<void> deleteAssetFile({
  required String agentSpaceId,
  required String assetId,
  required String path,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/asset/agent-space/${Uri.encodeComponent(agentSpaceId)}/assets/${Uri.encodeComponent(assetId)}/files/${path.split('/').map(Uri.encodeComponent).join('/')}',
    hostPrefix: 'dp.',
    exceptionFnMap: _exceptionFns,
  );
}