datasets
Creates, updates, deletes, gets or lists a datasets resource.
Overview
| Name | datasets |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.datasets |
Fields
The following fields are returned by SELECT queries:
- get_dataset
- list_datasets
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp when the dataset was created. |
dataset_arn | string | The Amazon Resource Name (ARN) of the dataset. (pattern: <code>arn:aws(-[a-z]+)*:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:dataset/[a-zA-Z0-9_-]{1,110}</code>) |
dataset_id | string | The unique identifier of the dataset. (pattern: <code>[a-zA-Z0-9_-]{1,110}</code>) |
dataset_name | string | The name of the dataset. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>) |
dataset_version | string | Dataset version identifier. Accepts "DRAFT" or a non-negative integer string representing a published version number. (pattern: <code>(DRAFT|[0-9]+)</code>) |
description | string | The description of the dataset. |
download_url | string | Presigned Amazon S3 URL to download the consolidated dataset file for the resolved version. Expires after 5 minutes. Omitted if the file does not yet exist. |
download_url_expires_at | string (date-time) | Expiry timestamp for the download URL. |
draft_status | string | Publish synchronization state. Only authoritative when status is ACTIVE. MODIFIED indicates DRAFT has unpublished changes. UNMODIFIED indicates DRAFT matches the latest published version. (MODIFIED, UNMODIFIED) |
example_count | integer (int64) | The number of examples in the DRAFT. |
failure_reason | string | Populated when status is CREATE_FAILED, UPDATE_FAILED, or DELETE_FAILED. Describes the reason for the failure. |
kms_key_arn | string | KMS key ARN used for server-side encryption on service Amazon S3 writes, if configured. (pattern: <code>arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>) |
schema_type | string | Versioned schema type for dataset examples. Each value identifies both the source format and the version of that format's schema. (AGENTCORE_EVALUATION_PREDEFINED_V1, AGENTCORE_EVALUATION_SIMULATED_V1, GENERIC_EVALUATION_PREDEFINED_V1) |
status | string | The current status of the dataset. (CREATING, UPDATING, DELETING, ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED) |
tags | object | The tags associated with the dataset. |
updated_at | string (date-time) | The timestamp when the dataset was last updated. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The timestamp when the dataset was created. |
dataset_arn | string | The Amazon Resource Name (ARN) of the dataset. (pattern: <code>arn:aws(-[a-z]+)*:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:dataset/[a-zA-Z0-9_-]{1,110}</code>) |
dataset_id | string | The unique identifier of the dataset. (pattern: <code>[a-zA-Z0-9_-]{1,110}</code>) |
dataset_name | string | The name of the dataset. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,47}</code>) |
description | string | The description of the dataset. |
draft_status | string | Publish synchronization state. Only authoritative when status is ACTIVE. (MODIFIED, UNMODIFIED) |
example_count | integer (int64) | The number of examples in the dataset. |
schema_type | string | Versioned schema type for dataset examples. Each value identifies both the source format and the version of that format's schema. (AGENTCORE_EVALUATION_PREDEFINED_V1, AGENTCORE_EVALUATION_SIMULATED_V1, GENERIC_EVALUATION_PREDEFINED_V1) |
status | string | The current status of the dataset. (CREATING, UPDATING, DELETING, ACTIVE, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED) |
updated_at | string (date-time) | The timestamp when the dataset was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_dataset | select | dataset_id, region | datasetVersion | Retrieves dataset metadata. Use the datasetVersion query parameter to retrieve a specific version's metadata. If absent, defaults to DRAFT. For paginated example content, use ListDatasetExamples. |
list_datasets | select | region | nextToken, maxResults | Lists all datasets in the caller's account, paginated. |
create_dataset | insert | region, datasetName, source, schemaType | Creates a new dataset resource asynchronously. Returns immediately with status CREATING. Poll GetDataset until status transitions to ACTIVE or CREATE_FAILED. | |
update_dataset | update | dataset_id, region | Updates a dataset's metadata. Synchronous operation. Only provided fields are updated; omitted fields remain unchanged. To modify dataset content, use AddDatasetExamples, UpdateDatasetExamples, or DeleteDatasetExamples. | |
delete_dataset | delete | dataset_id, region | datasetVersion | Deletes a dataset version or an entire dataset asynchronously. If datasetVersion is absent, deletes all versions and the dataset record itself. If provided, deletes only that specific version. |
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 to delete. |
region | string | AWS region (default: us-east-1) |
datasetVersion | string | Optional version to delete. If absent, deletes the entire dataset. If provided, deletes only that specific version. |
maxResults | integer | The maximum number of datasets to return per page. |
nextToken | string | The token for the next page of results. |
SELECT examples
- get_dataset
- list_datasets
Retrieves dataset metadata. Use the datasetVersion query parameter to retrieve a specific version's metadata. If absent, defaults to DRAFT. For paginated example content, use ListDatasetExamples.
SELECT
created_at,
dataset_arn,
dataset_id,
dataset_name,
dataset_version,
description,
download_url,
download_url_expires_at,
draft_status,
example_count,
failure_reason,
kms_key_arn,
schema_type,
status,
tags,
updated_at
FROM aws.bedrock_agentcore_control.datasets
WHERE dataset_id = '{{ dataset_id }}' -- required
AND region = '{{ region }}' -- required
AND datasetVersion = '{{ datasetVersion }}'
;
Lists all datasets in the caller's account, paginated.
SELECT
created_at,
dataset_arn,
dataset_id,
dataset_name,
description,
draft_status,
example_count,
schema_type,
status,
updated_at
FROM aws.bedrock_agentcore_control.datasets
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_dataset
- Manifest
Creates a new dataset resource asynchronously. Returns immediately with status CREATING. Poll GetDataset until status transitions to ACTIVE or CREATE_FAILED.
INSERT INTO aws.bedrock_agentcore_control.datasets (
clientToken,
datasetName,
description,
source,
schemaType,
kmsKeyArn,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ datasetName }}' /* required */,
'{{ description }}',
'{{ source }}' /* required */,
'{{ schemaType }}' /* required */,
'{{ kmsKeyArn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
created_at,
dataset_arn,
dataset_id,
status
;
# Description fields are for documentation purposes
- name: datasets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the datasets resource.
- name: clientToken
value: "{{ clientToken }}"
- name: datasetName
value: "{{ datasetName }}"
- name: description
value: "{{ description }}"
- name: source
description: |
Source of examples to add to the dataset.
value:
inlineExamples:
examples: "{{ examples }}"
s3Source:
s3Uri: "{{ s3Uri }}"
- name: schemaType
value: "{{ schemaType }}"
description: |
Versioned schema type for dataset examples. Each value identifies both the source format and the version of that format's schema.
valid_values: ['AGENTCORE_EVALUATION_PREDEFINED_V1', 'AGENTCORE_EVALUATION_SIMULATED_V1', 'GENERIC_EVALUATION_PREDEFINED_V1']
- name: kmsKeyArn
value: "{{ kmsKeyArn }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_dataset
Updates a dataset's metadata. Synchronous operation. Only provided fields are updated; omitted fields remain unchanged. To modify dataset content, use AddDatasetExamples, UpdateDatasetExamples, or DeleteDatasetExamples.
UPDATE aws.bedrock_agentcore_control.datasets
SET
clientToken = '{{ clientToken }}',
description = '{{ description }}'
WHERE
dataset_id = '{{ dataset_id }}' --required
AND region = '{{ region }}' --required
RETURNING
dataset_arn,
dataset_id,
updated_at;
DELETE examples
- delete_dataset
Deletes a dataset version or an entire dataset asynchronously. If datasetVersion is absent, deletes all versions and the dataset record itself. If provided, deletes only that specific version.
DELETE FROM aws.bedrock_agentcore_control.datasets
WHERE dataset_id = '{{ dataset_id }}' --required
AND region = '{{ region }}' --required
AND datasetVersion = '{{ datasetVersion }}'
;