View a markdown version of this page

GetDataset - Amazon Bedrock AgentCore Control Plane

GetDataset

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.

Request Syntax

GET /datasets/datasetId?datasetVersion=datasetVersion HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

datasetId

The unique identifier of the dataset to retrieve.

Pattern: [a-zA-Z0-9_-]{1,110}

Required: Yes

datasetVersion

Version to retrieve: "DRAFT" or a version number. Defaults to DRAFT if absent.

Pattern: (DRAFT|[0-9]+)

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "createdAt": number, "datasetArn": "string", "datasetId": "string", "datasetName": "string", "datasetVersion": "string", "description": "string", "downloadUrl": "string", "downloadUrlExpiresAt": number, "draftStatus": "string", "exampleCount": number, "failureReason": "string", "kmsKeyArn": "string", "schemaType": "string", "status": "string", "tags": { "string" : "string" }, "updatedAt": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

createdAt

The timestamp when the dataset was created.

Type: Timestamp

datasetArn

The Amazon Resource Name (ARN) of the dataset.

Type: String

Pattern: arn:aws(-[a-z]+)*:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:dataset/[a-zA-Z0-9_-]{1,110}

datasetId

The unique identifier of the dataset.

Type: String

Pattern: [a-zA-Z0-9_-]{1,110}

datasetName

The name of the dataset.

Type: String

Pattern: [a-zA-Z][a-zA-Z0-9_]{0,47}

datasetVersion

The resolved version: "DRAFT" (default) or the requested version number.

Type: String

Pattern: (DRAFT|[0-9]+)

description

The description of the dataset.

Type: String

downloadUrl

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.

Type: String

downloadUrlExpiresAt

Expiry timestamp for the download URL.

Type: Timestamp

draftStatus

Publish synchronization state. Only authoritative when status is ACTIVE. MODIFIED indicates DRAFT has unpublished changes. UNMODIFIED indicates DRAFT matches the latest published version.

Type: String

Valid Values: MODIFIED | UNMODIFIED

exampleCount

The number of examples in the DRAFT.

Type: Long

failureReason

Populated when status is CREATE_FAILED, UPDATE_FAILED, or DELETE_FAILED. Describes the reason for the failure.

Type: String

kmsKeyArn

AWS KMS key ARN used for server-side encryption on service Amazon S3 writes, if configured.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}

schemaType

The schema type declared at create time. Immutable after creation.

Type: String

Valid Values: AGENTCORE_EVALUATION_PREDEFINED_V1 | AGENTCORE_EVALUATION_SIMULATED_V1

status

The current status of the dataset.

Type: String

Valid Values: CREATING | UPDATING | DELETING | ACTIVE | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED

tags

The tags associated with the dataset.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9\s._:/=+@-]*

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: [a-zA-Z0-9\s._:/=+@-]*

updatedAt

The timestamp when the dataset was last updated.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

This exception is thrown when a request is denied per access permissions

HTTP Status Code: 403

ConflictException

This exception is thrown when there is a conflict performing an operation

HTTP Status Code: 409

InternalServerException

This exception is thrown if there was an unexpected error during processing of request

HTTP Status Code: 500

ResourceNotFoundException

This exception is thrown when a resource referenced by the operation does not exist

HTTP Status Code: 404

ThrottlingException

This exception is thrown when the number of requests exceeds the limit

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by the service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: