Skip to content

Add Dataset Examples

bedrockagentcorecontrol_add_dataset_examples R Documentation

Adds examples to the dataset's DRAFT

Description

Adds examples to the dataset's DRAFT.

Validation: All examples are validated against the dataset's schemaType before any writes occur. If any example fails validation, the entire batch is rejected with ValidationException — no examples are written (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}.

Request size limit: Max 5 MB total request body. Max 1000 examples per call.

Usage

bedrockagentcorecontrol_add_dataset_examples(datasetId, clientToken,
  source)

Arguments

datasetId

[required] The unique identifier of the dataset to add examples to.

clientToken

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.

source

[required] Source of examples to add. Provide either inline examples or an S3 URI pointing to a JSONL file.

Value

A list with the following syntax:

list(
  datasetArn = "string",
  datasetId = "string",
  status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"|"CREATE_FAILED"|"UPDATE_FAILED"|"DELETE_FAILED",
  addedCount = 123,
  updatedAt = as.POSIXct(
    "2015-01-01"
  ),
  exampleIds = list(
    "string"
  )
)

Request syntax

svc$add_dataset_examples(
  datasetId = "string",
  clientToken = "string",
  source = list(
    inlineExamples = list(
      examples = list(
        list()
      )
    ),
    s3Source = list(
      s3Uri = "string"
    )
  )
)