BedrockAgentCoreControl / Client / delete_dataset
delete_dataset¶
- BedrockAgentCoreControl.Client.delete_dataset(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.delete_dataset( datasetId='string', datasetVersion='string' )
- Parameters:
datasetId (string) –
[REQUIRED]
The unique identifier of the dataset to delete.
datasetVersion (string) – Optional version to delete. Use “DRAFT” or omit to delete the draft. Returns ResourceNotFoundException if the specified version does not exist.
- Return type:
dict
- Returns:
Response Syntax
{ 'datasetArn': 'string', 'datasetId': 'string', 'status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'CREATE_FAILED'|'UPDATE_FAILED'|'DELETE_FAILED', 'datasetVersion': 'string', 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
datasetArn (string) –
The Amazon Resource Name (ARN) of the dataset.
datasetId (string) –
The unique identifier of the dataset.
status (string) –
The current status of the dataset after the delete request.
datasetVersion (string) –
The version deleted.
updatedAt (datetime) –
The timestamp when the delete was initiated.
Exceptions
BedrockAgentCoreControl.Client.exceptions.ValidationExceptionBedrockAgentCoreControl.Client.exceptions.ConflictExceptionBedrockAgentCoreControl.Client.exceptions.AccessDeniedExceptionBedrockAgentCoreControl.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCoreControl.Client.exceptions.ThrottlingExceptionBedrockAgentCoreControl.Client.exceptions.InternalServerException