Delete Dataset
| bedrockagentcorecontrol_delete_dataset | R Documentation |
Deletes a dataset version or an entire dataset (all versions + name claim)¶
Description¶
Deletes a dataset version or an entire dataset (all versions + name claim). Asynchronous 202.
State transitions:
-
If
datasetVersionis absent (full delete): status transitions to DELETING immediately. -
If
datasetVersionis provided (version-specific delete): status transitions to UPDATING.
State guard (full delete): Returns ConflictException (DATASET_NOT_READY) if the dataset status is in {CREATING, UPDATING}. Deletion is allowed from ACTIVE, CREATE_FAILED, UPDATE_FAILED, and DELETE_FAILED states.
State guard (version-specific delete): Returns ConflictException (DATASET_NOT_READY) if the dataset status is not in {ACTIVE, CREATE_FAILED, UPDATE_FAILED}.
Fails with ConflictException (REFERENCED_BY_EVAL_JOB) if referenced by an active evaluation job (full delete only).
If the delete workflow fails after retries, status is set to DELETE_FAILED (full delete) or UPDATE_FAILED (version-specific delete). Calling DeleteDataset on a DELETE_FAILED dataset re-triggers the delete workflow (idempotent retry path).
Version parameter:
-
If
datasetVersionis absent: deletes ALL versions and the Dataset record itself. -
If
datasetVersionis provided: deletes only that specific DatasetVersion. Returns ResourceNotFoundException if the specified version does not exist.
Usage¶
bedrockagentcorecontrol_delete_dataset(datasetId, datasetVersion)
Arguments¶
datasetId |
[required] The unique identifier of the dataset to delete. |
datasetVersion |
Optional version to delete. Use "DRAFT" or omit to delete the draft. Returns ResourceNotFoundException if the specified version does not exist. |
Value¶
A list with the following syntax:
list(
datasetArn = "string",
datasetId = "string",
status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"|"CREATE_FAILED"|"UPDATE_FAILED"|"DELETE_FAILED",
datasetVersion = "string",
updatedAt = as.POSIXct(
"2015-01-01"
)
)
Request syntax¶
svc$delete_dataset(
datasetId = "string",
datasetVersion = "string"
)