BedrockAgentCoreControl / Client / get_dataset
get_dataset¶
- BedrockAgentCoreControl.Client.get_dataset(**kwargs)¶
Retrieves dataset metadata only.
Use
?datasetVersion=DRAFTor?datasetVersion=Nto retrieve a specific version’s metadata. If absent, defaults to DRAFT (the mutable working copy). Returns ResourceNotFoundException if the specified version is not found.Initial state after CreateDataset: When CreateDataset completes successfully (status transitions to ACTIVE), only a DRAFT working copy exists. No published versions exist until CreateDatasetVersion is called. At this point draftStatus is MODIFIED because the DRAFT has content that has never been published.
Default version behavior: When
datasetVersionis omitted, the operation returns the DRAFT working copy. To retrieve a specific published version, pass the version number as a string (e.g.?datasetVersion=1).State guard: Allowed for all statuses including DELETING. Returns the dataset record with its current status so callers can observe the deletion in progress.
For paginated example IDs use ListDatasetExamples.
See also: AWS API Documentation
Request Syntax
response = client.get_dataset( datasetId='string', datasetVersion='string' )
- Parameters:
datasetId (string) –
[REQUIRED]
The unique identifier of the dataset to retrieve.
datasetVersion (string) – Version to retrieve: “DRAFT” or a version number. Defaults to DRAFT if absent.
- Return type:
dict
- Returns:
Response Syntax
{ 'datasetArn': 'string', 'datasetId': 'string', 'datasetVersion': 'string', 'datasetName': 'string', 'description': 'string', 'status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'CREATE_FAILED'|'UPDATE_FAILED'|'DELETE_FAILED', 'draftStatus': 'MODIFIED'|'UNMODIFIED', 'failureReason': 'string', 'schemaType': 'AGENTCORE_EVALUATION_PREDEFINED_V1'|'AGENTCORE_EVALUATION_SIMULATED_V1', 'kmsKeyArn': 'string', 'exampleCount': 123, 'downloadUrl': 'string', 'downloadUrlExpiresAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'tags': { 'string': 'string' } }
Response Structure
(dict) –
datasetArn (string) –
The Amazon Resource Name (ARN) of the dataset.
datasetId (string) –
The unique identifier of the dataset.
datasetVersion (string) –
The resolved version: “DRAFT” (default) or the requested version number.
datasetName (string) –
The name of the dataset.
description (string) –
The description of the dataset.
status (string) –
The current status of the dataset.
draftStatus (string) –
Publish synchronization state. Only authoritative when status == ACTIVE. MODIFIED — DRAFT has unpublished changes (or no published versions yet). UNMODIFIED — DRAFT matches the latest published version exactly.
failureReason (string) –
Populated when status is CREATE_FAILED, UPDATE_FAILED, or DELETE_FAILED.
schemaType (string) –
The schema type declared at create time. Immutable after creation.
kmsKeyArn (string) –
AWS KMS key ARN used for SSE-KMS on service S3 writes, if configured.
exampleCount (integer) –
Example count for DRAFT.
downloadUrl (string) –
Presigned S3 URL to download the consolidated dataset.jsonl file for the resolved version (DRAFT or published). TTL: 5 minutes. Omitted if the file does not yet exist (e.g. during CREATING) or on presign failure.
downloadUrlExpiresAt (datetime) –
Expiry timestamp for downloadUrl.
createdAt (datetime) –
The timestamp when the dataset was created.
updatedAt (datetime) –
The timestamp when the dataset was last updated.
tags (dict) –
The tags associated with the dataset.
(string) –
(string) –
Exceptions
BedrockAgentCoreControl.Client.exceptions.ValidationExceptionBedrockAgentCoreControl.Client.exceptions.ConflictExceptionBedrockAgentCoreControl.Client.exceptions.AccessDeniedExceptionBedrockAgentCoreControl.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCoreControl.Client.exceptions.ThrottlingExceptionBedrockAgentCoreControl.Client.exceptions.InternalServerException