Skip to content

list_dataset_examples

Operation

list_dataset_examples

list_dataset_examples(request: ListDatasetExamplesInput | ListDatasetExamplesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListDatasetExamplesInputDict]) -> ListDatasetExamplesOutput

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.

Parameters:

Name Type Description Default
request ListDatasetExamplesInput | ListDatasetExamplesInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[ListDatasetExamplesInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListDatasetExamplesOutput

An instance of ListDatasetExamplesOutput.

list_dataset_examples async

list_dataset_examples(request: ListDatasetExamplesInput | ListDatasetExamplesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListDatasetExamplesInputDict]) -> ListDatasetExamplesOutput

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.

Parameters:

Name Type Description Default
request ListDatasetExamplesInput | ListDatasetExamplesInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[ListDatasetExamplesInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListDatasetExamplesOutput

An instance of ListDatasetExamplesOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

ListDatasetExamplesInputDict

Bases: TypedDict

Dictionary form of ListDatasetExamplesInput.

Attributes

dataset_id instance-attribute
dataset_id: Required[str]

The unique identifier of the dataset.

dataset_version instance-attribute
dataset_version: str | None

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.

max_results instance-attribute
max_results: int | None

Maximum number of examples to return per page.

next_token instance-attribute
next_token: str | None

The token for the next page of results.

ListDatasetExamplesInput dataclass

Bases: _SerdeShape

Dataclass for ListDatasetExamplesInput structure.

Attributes

dataset_id class-attribute instance-attribute
dataset_id: str | None = ...

The unique identifier of the dataset.

dataset_version class-attribute instance-attribute
dataset_version: str | None = ...

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.

max_results class-attribute instance-attribute
max_results: int | None = ...

Maximum number of examples to return per page.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token for the next page of results.

Output

ListDatasetExamplesOutput dataclass

Bases: _SerdeShape

Dataclass for ListDatasetExamplesOutput structure.

Attributes

dataset_arn instance-attribute
dataset_arn: str

The Amazon Resource Name (ARN) of the dataset.

dataset_id instance-attribute
dataset_id: str

The unique identifier of the dataset.

dataset_version instance-attribute
dataset_version: str

The version returned.

examples instance-attribute
examples: list[Document]

Paginated example content. Each element is a JSON object containing at least an exampleId field plus the schema-specific content fields.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token for the next page of results, or null if there are no more results.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.