Creates a dataset version.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidataset:CreateDatasetVersion |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/datasets/{DatasetId}/versions HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DatasetId |
string |
Yes |
The dataset ID. For more information about how to obtain the dataset ID, see ListDatasets. |
d-rbvg5*****jhc9ks92 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| Property |
string |
Yes |
The property of the dataset. Valid values:
Valid values:
|
DIRECTORY |
| DataSourceType |
string |
Yes |
The type of the data source. If you specify multiple types, separate them with commas (,). Valid values:
Note: The DataSourceType of the version must be the same as the DataSourceType of the dataset. The system verifies this consistency when you create the version. Valid values:
|
OSS |
| Uri |
string |
Yes |
The following examples show how to configure the URI:
|
oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/ |
| Labels |
array |
No |
A list of tags for the dataset version. |
|
| Label |
No |
The tag. |
||
| SourceType |
string |
No |
The type of the data source. The default value is USER. Valid values:
Valid values:
|
USER |
| SourceId |
string |
No |
The ID of the data source.
|
d-a0xbe5n03bhqof46ce |
| Options |
string |
No |
The extended field, which is a JSON string. When DLC uses the dataset, you can configure the mountPath field to specify the default mount path for the dataset. |
{ "mountPath": "/mnt/data/" } |
| Description |
string |
No |
A custom description for the dataset version. This helps distinguish different dataset versions. |
This is a description of the dataset version. |
| DataSize |
integer |
No |
The size of the space occupied by the dataset files. Unit: bytes. |
19000 |
| DataCount |
integer |
No |
The number of files in the dataset. |
300 |
| ImportInfo |
string |
No |
The storage import configuration of the dataset. Supported storage types include OSS, NAS, and CPFS. |
{ "region": "cn-wulanchabu", "fileSystemId": "bmcpfs-xxxxxxxxxxx", "path": "/mnt", "mountTarget": "cpfs-xxxxxxxxxxxx-vpc-gacs9f.cn-wulanchabu.cpfs.aliyuncs.com", "isVpcMount": true } |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
Id of the request |
41A847C8-3D12-5F24-8CE9-7F9EB2DA9ECD |
| VersionName |
string |
The name of the dataset version. |
v1 |
Examples
Success response
JSON format
{
"RequestId": "41A847C8-3D12-5F24-8CE9-7F9EB2DA9ECD",
"VersionName": "v1"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.