create_dataset¶
Operation¶
create_dataset
¶
create_dataset(request: CreateDatasetInput | CreateDatasetInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateDatasetInputDict]) -> CreateDatasetOutput
Creates a new dataset resource asynchronously. Returns immediately with
status CREATING. Poll GetDataset until status transitions to ACTIVE or
CREATE_FAILED.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateDatasetInput | CreateDatasetInputDict | 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[CreateDatasetInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateDatasetOutput
|
An instance of |
create_dataset
async
¶
create_dataset(request: CreateDatasetInput | CreateDatasetInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateDatasetInputDict]) -> CreateDatasetOutput
Creates a new dataset resource asynchronously. Returns immediately with
status CREATING. Poll GetDataset until status transitions to ACTIVE or
CREATE_FAILED.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreateDatasetInput | CreateDatasetInputDict | 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[CreateDatasetInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreateDatasetOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreateDatasetInputDict
¶
Bases: TypedDict
Dictionary form of CreateDatasetInput.
Attributes¶
client_token
instance-attribute
¶
client_token: str | None
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.
This field is autopopulated if not provided.
dataset_name
instance-attribute
¶
Human-readable name for the dataset. Must be unique within the account. Immutable after creation.
kms_key_arn
instance-attribute
¶
kms_key_arn: str | None
Optional KMS key ARN for server-side encryption on service Amazon S3 writes.
schema_type
instance-attribute
¶
Versioned schema type governing the structure of examples. Immutable after creation.
source
instance-attribute
¶
source: Required[DataSourceType | DataSourceTypeDict]
Source of initial examples. Provide either inline examples or an S3 URI pointing to a JSONL file.
CreateDatasetInput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateDatasetInput structure.
Attributes¶
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
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.
This field is autopopulated if not provided.
dataset_name
class-attribute
instance-attribute
¶
dataset_name: str | None = ...
Human-readable name for the dataset. Must be unique within the account. Immutable after creation.
description
class-attribute
instance-attribute
¶
description: str | None = ...
A description of the dataset.
kms_key_arn
class-attribute
instance-attribute
¶
kms_key_arn: str | None = ...
Optional KMS key ARN for server-side encryption on service Amazon S3 writes.
schema_type
class-attribute
instance-attribute
¶
schema_type: str | None = ...
Versioned schema type governing the structure of examples. Immutable after creation.
source
class-attribute
instance-attribute
¶
source: DataSourceType | None = ...
Source of initial examples. Provide either inline examples or an S3 URI pointing to a JSONL file.
Output¶
CreateDatasetOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for CreateDatasetOutput structure.
Attributes¶
dataset_arn
instance-attribute
¶
dataset_arn: str
The Amazon Resource Name (ARN) of the created dataset.
response_metadata
class-attribute
instance-attribute
¶
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.