deletePackage method

Future<void> deletePackage({
  1. required String packageId,
  2. bool? forceDelete,
})

Deletes a package.

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

Parameter packageId : The package's ID.

Parameter forceDelete : Delete the package even if it has artifacts stored in its access point. Deletes the package's artifacts from Amazon S3.

Implementation

Future<void> deletePackage({
  required String packageId,
  bool? forceDelete,
}) async {
  final $query = <String, List<String>>{
    if (forceDelete != null) 'ForceDelete': [forceDelete.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/packages/${Uri.encodeComponent(packageId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}