BedrockAgentCoreControl / Client / delete_dataset_examples

delete_dataset_examples

BedrockAgentCoreControl.Client.delete_dataset_examples(**kwargs)

Deletes specific examples by ID from DRAFT.

Validation: All example IDs are validated before any deletes occur. If any ID does not exist in DRAFT, the entire batch is rejected with ResourceNotFoundException — no examples are deleted (all-or-nothing semantics).

Asynchronous: Operates in-place on DRAFT. No version bump occurs. Use CreateDatasetVersion to publish DRAFT as a new numbered version.

State guard: Returns ConflictException (DATASET_NOT_READY) if the dataset status is not in {DRAFT, ACTIVE}.

See also: AWS API Documentation

Request Syntax

response = client.delete_dataset_examples(
    datasetId='string',
    clientToken='string',
    exampleIds=[
        'string',
    ]
)
Parameters:
  • datasetId (string) –

    [REQUIRED]

    The unique identifier of the dataset.

  • clientToken (string) –

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don’t specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn’t return an error. For more information, see Ensuring idempotency.

    This field is autopopulated if not provided.

  • exampleIds (list) –

    [REQUIRED]

    The IDs of the examples to delete.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'datasetArn': 'string',
    'datasetId': 'string',
    'status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'CREATE_FAILED'|'UPDATE_FAILED'|'DELETE_FAILED',
    'deletedCount': 123,
    '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.

    • deletedCount (integer) –

      The number of examples deleted.

    • updatedAt (datetime) –

      The timestamp when the examples were deleted.

Exceptions

  • BedrockAgentCoreControl.Client.exceptions.ValidationException

  • BedrockAgentCoreControl.Client.exceptions.ConflictException

  • BedrockAgentCoreControl.Client.exceptions.AccessDeniedException

  • BedrockAgentCoreControl.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCoreControl.Client.exceptions.ThrottlingException

  • BedrockAgentCoreControl.Client.exceptions.InternalServerException