CreateDatasetVersion
Creates a dataset version.
Operation description
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. |
|
| DataCount |
integer |
No |
The number of files in the dataset. |
300 |
| DataSize |
integer |
No |
The size of the space occupied by the dataset files. Unit: bytes. |
19000 |
| DataSourceType |
string |
Yes |
The data source type. Separate multiple values with commas. Valid values:
Note: The DataSourceType of the version must be the same as the DataSourceType of the dataset. The system validates this when you create the version. Valid values:
|
OSS |
| DatasetTaskRamRole |
string |
No |
UserMetricsEndpoints |
acs:ram::1234567890123456:role/role-name |
| Description |
string |
No |
The custom description of the dataset version. You can use this description to distinguish between different dataset versions. |
This is a description of the dataset version. |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run without actually creating the dataset version. |
|
| 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 for the dataset version. |
|
| Label |
No |
The label. |
||
| Options |
string |
No |
The extended field. The value 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/" } |
| Property |
string |
Yes |
The property of the dataset. Valid values:
Valid values:
|
DIRECTORY |
| SourceId |
string |
No |
The source ID.
|
d-a0xbe5n03bhqof46ce |
| SourceType |
string |
No |
The source type. Default value: USER. Valid values:
Valid values:
|
USER |
| Uri |
string |
Yes |
The URI. Configuration examples:
|
oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/ |
| UserMetricsEndpoints |
array |
No |
The list of user metric collection endpoints. |
|
| UserMetricsEndpoint |
No |
The user metric collection endpoint, which includes the port and path. |
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.