dataset_examples
Creates, updates, deletes, gets or lists a dataset_examples resource.
Overview
| Name | dataset_examples |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.dataset_examples |
Fields
The following fields are returned by SELECT queries:
- list_dataset_examples
| Name | Datatype | Description |
|---|---|---|
example | object | Paginated example content. Each element is a JSON object containing at least an exampleId field plus the schema-specific content fields. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_dataset_examples | select | dataset_id, region | datasetVersion, maxResults, nextToken | Returns paginated examples from the dataset. The server embeds the resolved version in the pagination token. Once pagination begins, all subsequent pages are pinned to that version regardless of concurrent mutations. |
add_dataset_examples | update | dataset_id, region, source | Adds examples to the dataset's DRAFT. All examples are validated against the dataset's schema type before any writes occur. If any example fails validation, the entire batch is rejected (all-or-nothing semantics). | |
update_dataset_examples | update | dataset_id, region, examples | Updates multiple existing examples in-place on DRAFT. All examples are validated against the dataset's schema type before any writes occur. If any example fails validation, the entire batch is rejected (all-or-nothing semantics). | |
delete_dataset_examples | delete | dataset_id, region | Deletes specific examples by ID from DRAFT. All example IDs are validated before any deletes occur. If any ID does not exist in DRAFT, the entire batch is rejected (all-or-nothing semantics). |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
dataset_id | string | The unique identifier of the dataset. |
region | string | AWS region (default: us-east-1) |
datasetVersion | string | Version to paginate: "DRAFT" or a version number. Defaults to DRAFT if absent. Only used on the first request; for subsequent pages, the version is extracted from the pagination token. |
maxResults | integer | Maximum number of examples to return per page. |
nextToken | string | The token for the next page of results. |
SELECT examples
- list_dataset_examples
Returns paginated examples from the dataset. The server embeds the resolved version in the pagination token. Once pagination begins, all subsequent pages are pinned to that version regardless of concurrent mutations.
SELECT
example
FROM aws.bedrock_agentcore_control.dataset_examples
WHERE dataset_id = '{{ dataset_id }}' -- required
AND region = '{{ region }}' -- required
AND datasetVersion = '{{ datasetVersion }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
UPDATE examples
- add_dataset_examples
- update_dataset_examples
Adds examples to the dataset's DRAFT. All examples are validated against the dataset's schema type before any writes occur. If any example fails validation, the entire batch is rejected (all-or-nothing semantics).
UPDATE aws.bedrock_agentcore_control.dataset_examples
SET
clientToken = '{{ clientToken }}',
source = '{{ source }}'
WHERE
dataset_id = '{{ dataset_id }}' --required
AND region = '{{ region }}' --required
AND source = '{{ source }}' --required
RETURNING
added_count,
dataset_arn,
dataset_id,
example_ids,
status,
updated_at;
Updates multiple existing examples in-place on DRAFT. All examples are validated against the dataset's schema type before any writes occur. If any example fails validation, the entire batch is rejected (all-or-nothing semantics).
UPDATE aws.bedrock_agentcore_control.dataset_examples
SET
clientToken = '{{ clientToken }}',
examples = '{{ examples }}'
WHERE
dataset_id = '{{ dataset_id }}' --required
AND region = '{{ region }}' --required
AND examples = '{{ examples }}' --required
RETURNING
dataset_arn,
dataset_id,
status,
updated_at,
updated_count;
DELETE examples
- delete_dataset_examples
Deletes specific examples by ID from DRAFT. All example IDs are validated before any deletes occur. If any ID does not exist in DRAFT, the entire batch is rejected (all-or-nothing semantics).
DELETE FROM aws.bedrock_agentcore_control.dataset_examples
WHERE dataset_id = '{{ dataset_id }}' --required
AND region = '{{ region }}' --required
;