Creates a dataset.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
paidataset:CreateDataset | create | *All Resources * |
| none |
Request syntax
POST /api/v1/datasets HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
body | object | No | The request data. | |
Name | string | Yes | The dataset name. The name must meet the following requirements:
| myName |
Property | string | Yes | The property of the dataset. Valid values:
| DIRECTORY |
DataSourceType | string | Yes | The data source type. Valid values:
| NAS |
Uri | string | Yes | The URI of the data source.
| nas://09f****f2.cn-hangzhou/ |
DataType | string | No | The type of the dataset. Default value: COMMON. Valid values:
Enumeration Value:
| COMMON |
Labels | array | No | The tags. | |
Label | No | The tag to be added to the dataset. | ||
SourceType | string | No | The type of the data source. Default value: USER. Valid values:
| USER |
SourceId | string | No | The data source ID.
| jdnhf***fnrimv |
Description | string | No | The description of the dataset. Descriptions are used to differentiate datasets. | |
WorkspaceId | string | No | The ID of the workspace to which the dataset belongs. You can call ListWorkspaces to obtain the workspace ID. 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 you use the dataset in Deep Learning Containers (DLC), you can configure the mountPath field to specify the default mount path of the dataset. | { "mountPath": "/mnt/data/" } |
Accessibility | string | No | The workspace accessibility. Valid values:
| PRIVATE |
ProviderType | string | No | The source type of the dataset. Valid values:
| Ecs |
Provider | string | No | The dataset provider. The value cannot be set to pai. | Github |
UserId | string | No | The ID of the Alibaba Cloud account to which the dataset belongs. The workspace owner and administrator have permissions to create datasets for specified members in the workspace. | 2485765****023475 |
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 |
VersionDescription | string | No | The description of the dataset of the initial version. | The initial version |
VersionLabels | array | No | The list of tags to be added to the dataset of the initial version. | |
Label | No | The tag to be added to the dataset of the initial version. | ||
DataSize | long | No | The size of the dataset file. Unit: bytes. | 10000 |
DataCount | long | No | The number of dataset files. | 500 |
MountAccessReadWriteRoleIdList | array | No | The list of role names in the workspace that have read and write permissions on the mounted database. The names start with PAI are basic role names and the names start with role- are custom role names. If the list contains asterisks (*), all roles have read and write permissions.
| |
string | No | The ID of the workspace role. | PAI.AlgoOperator | |
ImportInfo | string | No | The dataset configurations to be imported to a storage, such as OSS, NAS, or Cloud Parallel File Storage (CPFS). OSS { NAS { CPFS { CPFS for Lingjun { | { "region": "cn-wulanchabu", "fileSystemId": "bmcpfs-xxxxxxxxxxx", "path": "/mnt", "mountTarget": "cpfs-xxxxxxxxxxxx-vpc-gacs9f.cn-wulanchabu.cpfs.aliyuncs.com", "isVpcMount": true } |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "B2C51F93-1C07-5477-9705-5FDB****F19F",
"DatasetId": "d-rbvg5*****jhc9ks92"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2025-02-06 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-10-18 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-07-09 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-06-20 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-02-27 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-04-26 | The internal configuration of the API is changed, but the call is not affected | View Change Details |