CreateDataset
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. |
|
| Accessibility |
string |
No |
The workspace visibility. Valid values:
Valid values:
|
PRIVATE |
| AccessibleRoleIdList |
array |
No |
Takes effect when Accessibility is set to ROLE_PUBLIC. The list of workspace role names that have visibility to the dataset. Role IDs starting with PAI are basic role IDs, and those starting with role- are custom role IDs. |
|
|
string |
No |
The workspace role ID. |
PAI.AlgoOperator |
|
| DataCount |
integer |
No |
The number of files in the dataset. |
500 |
| DataSize |
integer |
No |
The storage space occupied by the dataset files. Unit: bytes. |
10000 |
| DataSourceType |
string |
Yes |
The data source type. Valid values:
Valid values:
|
NAS |
| DataType |
string |
No |
The data type of the dataset. Default value: COMMON. Valid values:
Valid values:
|
COMMON |
| DatasetTaskRamRole |
string |
No |
DatasetTaskRamRole |
acs:ram::1234567890123456:role/role-name |
| Description |
string |
No |
The custom description of the dataset to distinguish it from other datasets. |
This is a description of the dataset. |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run without actually creating the dataset. |
true |
| Edition |
string |
No |
The dataset edition. Default value: BASIC. Valid values:
Valid values:
|
ADVANCED |
| 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 } |
| Labels |
array |
No |
The list of labels. |
|
| Label |
No |
The label added to the dataset. |
||
| MountAccessReadWriteRoleIdList |
array |
No |
The list of workspace role names that have read and write permissions when the dataset is mounted. Role IDs starting with PAI are basic role IDs, and those starting 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 |
|
| Name |
string |
Yes |
The name of the dataset. The naming rules are as follows:
|
myName |
| Options |
string |
No |
The extended field in JSON string format. When Deep Learning Containers (DLC) uses the dataset, you can configure the mountPath field to specify the default mount path of the dataset. |
{ "mountPath": "/mnt/data/" } |
| Property |
string |
Yes |
The property of the dataset. Valid values:
Valid values:
|
DIRECTORY |
| Provider |
string |
No |
The provider of the dataset. You cannot set this parameter to pai. |
Github |
| ProviderType |
string |
No |
The data source type of the dataset. Valid values:
|
Ecs |
| SourceDatasetId |
string |
No |
The ID of the source dataset for the labeled dataset. |
d-bvfasdfxxxxj8o411 |
| SourceDatasetVersion |
string |
No |
The version of the source dataset for the labeled dataset. |
v2 |
| SourceId |
string |
No |
The ID of the data source.
|
jdnhf***fnrimv |
| SourceType |
string |
No |
The data source type. Default value: USER. Valid values:
|
USER |
| Uri |
string |
Yes |
The URI configuration examples are as follows:
|
nas://09f****f2.cn-hangzhou/ |
| UserId |
string |
No |
The Alibaba Cloud account ID of the dataset owner. The workspace owner and administrators have the permissions to create datasets for specified workspace members. |
2485765****023475 |
| UserMetricsEndpoints |
array |
No |
UserMetricsEndpoints |
|
| UserMetricsEndpoint |
No |
UserMetricsEndpoints |
||
| 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 label added to the initial version of the dataset. |
||
| WorkspaceId |
string |
No |
The ID of the workspace to which the dataset belongs. For more information about how to obtain the workspace ID, see ListWorkspaces. If you do not configure this parameter, the default workspace is used. If the default workspace does not exist, an error is reported. |
478** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| DatasetId |
string |
The dataset ID. |
d-rbvg5*****jhc9ks92 |
| RequestId |
string |
The request ID. |
B2C51F93-1C07-5477-9705-5FDB****F19F |
Examples
Success response
JSON format
{
"DatasetId": "d-rbvg5*****jhc9ks92",
"RequestId": "B2C51F93-1C07-5477-9705-5FDB****F19F"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.