Creates a dataset.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidataset:CreateDataset |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/datasets HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| Name |
string |
Yes |
The name of the dataset. The naming convention is as follows:
|
myName |
| Property |
string |
Yes |
The property of the dataset. Valid values:
Valid values:
|
DIRECTORY |
| DataSourceType |
string |
Yes |
The type of the data source. Valid values:
Valid values:
|
NAS |
| Uri |
string |
Yes |
The URI of the data source. The following examples show the URI format:
|
nas://09f****f2.cn-hangzhou/ |
| DataType |
string |
No |
The data type of the dataset. The default value is COMMON. Valid values:
Valid values:
|
COMMON |
| Labels |
array |
No |
The list of labels. |
|
| Label |
No |
The labels to add to the dataset. |
||
| SourceType |
string |
No |
The type of the data source. The default value is USER. Valid values:
|
USER |
| SourceId |
string |
No |
The ID of the data source.
|
jdnhf***fnrimv |
| Description |
string |
No |
A custom description of the dataset. This helps you distinguish it from other datasets. |
This is a description of the dataset. |
| WorkspaceId |
string |
No |
The ID of the workspace where the dataset resides. For more information about how to obtain a workspace ID, see ListWorkspaces. If you do not specify this parameter, the default workspace is used. If the default workspace does not exist, an error is reported. |
478** |
| Options |
string |
No |
The extended field, which is a JSON string. When a Data Lake Compute (DLC) job uses the dataset, you can configure the mountPath field to specify the default mount path for the dataset. |
{ "mountPath": "/mnt/data/" } |
| Accessibility |
string |
No |
The visibility of the dataset in the workspace. Valid values:
Valid values:
|
PRIVATE |
| ProviderType |
string |
No |
The type of the data source provider. Valid values:
|
Ecs |
| Provider |
string |
No |
The provider of the dataset. You cannot set this parameter to pai. |
Github |
| UserId |
string |
No |
The Alibaba Cloud account ID of the dataset owner. Workspace owners and administrators can create datasets for specified workspace members. |
2485765****023475 |
| SourceDatasetId |
string |
No |
The ID of the source dataset for a labeled dataset. |
d-bvfasdfxxxxj8o411 |
| SourceDatasetVersion |
string |
No |
The version of the source dataset for a labeled dataset. |
v2 |
| VersionDescription |
string |
No |
The description of the initial version of the dataset. |
This is a description of the first dataset version. |
| VersionLabels |
array |
No |
The list of labels for the initial version. |
|
| Label |
No |
The labels to add to the initial version of the dataset. |
||
| DataSize |
integer |
No |
The size of the dataset files. Unit: byte. |
10000 |
| DataCount |
integer |
No |
The number of files in the dataset. |
500 |
| MountAccessReadWriteRoleIdList |
array |
No |
A list of workspace role names that have read and write permissions when the dataset is mounted. Role IDs that start with PAI. are basic role IDs. Role IDs that start with role- are custom role IDs. If the list contains an asterisk (*), all roles have read and write permissions.
|
|
|
string |
No |
The workspace role ID. |
PAI.AlgoOperator |
|
| ImportInfo |
string |
No |
The storage import configuration of the dataset. OSS, NAS, and CPFS are supported. |
{ "region": "cn-wulanchabu", "fileSystemId": "bmcpfs-xxxxxxxxxxx", "path": "/mnt", "mountTarget": "cpfs-xxxxxxxxxxxx-vpc-gacs9f.cn-wulanchabu.cpfs.aliyuncs.com", "isVpcMount": true } |
| Edition |
string |
No |
The edition of the dataset. The default value is BASIC. Valid values:
Valid values:
|
ADVANCED |
| AccessibleRoleIdList |
array |
No |
||
|
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The request ID. |
B2C51F93-1C07-5477-9705-5FDB****F19F |
| DatasetId |
string |
The dataset ID. |
d-rbvg5*****jhc9ks92 |
Examples
Success response
JSON format
{
"RequestId": "B2C51F93-1C07-5477-9705-5FDB****F19F",
"DatasetId": "d-rbvg5*****jhc9ks92"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.