CreateRuntime
Creates a runtime.
Operation description
Before you call this operation, make sure that you fully understand the billing methods and pricing of PAI-DSW.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pailangstudio:CreateRuntime |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/langstudio/runtimes HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| Accessibility |
string |
No |
The visibility of the workspace. Valid values:
Valid values:
|
PRIVATE |
| WorkspaceId |
string |
No |
The workspace ID. For more information about how to obtain the workspace ID, see ListWorkspaces. |
174*** |
| RuntimeName |
string |
No |
The name of the runtime. Format requirements:
|
dev01 |
| RuntimeType |
string |
No |
The runtime type. Valid values:
Valid values:
|
DSW |
| EcsSpec |
object |
No |
The ECS resource configuration. |
|
| InstanceType |
string |
No |
The instance type. |
ecs.c6.large |
| GPUType |
string |
No |
The GPU type. Valid values:
|
V100 |
| CPU |
integer |
No |
The number of vCPUs. |
4 |
| GPU |
integer |
No |
The number of GPUs. |
0 |
| Memory |
integer |
No |
The memory size. Unit: GB. |
8 |
| SharedMemory |
integer |
No |
The shared memory size. Unit: GB. |
8 |
| Driver |
string |
No |
The GPU driver version. |
535.161.08 |
| ResourceId |
string |
No |
The resource quota ID. |
quota18******zv9 |
| UserVpc |
object |
No |
The user VPC configuration. |
|
| VpcId |
string |
No |
The VPC ID. |
vpc-wz90****5v23 |
| VSwitchId |
string |
No |
The vSwitch ID. |
vsw-wz9r****ng10 |
| SecurityGroupId |
string |
No |
The security group ID. |
sg-wz9i****1129 |
| DefaultRoute |
string |
No |
The default route. |
eth0 |
| ExtendedCIDRs |
array |
No |
The extended CIDR blocks. |
|
|
string |
No |
The extended CIDR blocks. |
172.16.1.0/24 |
|
| Envs |
array<object> |
No |
The environment variables. |
|
|
object |
No |
|||
| Key |
string |
No |
The environment variable key. |
testKey1 |
| Value |
string |
No |
The environment variable value. |
testValue1 |
| Labels |
array<object> |
No |
The labels. |
|
|
object |
No |
|||
| Key |
string |
No |
The label key. |
testKey1 |
| Value |
string |
No |
The label value. |
testValue1 |
| DataSources |
array<object> |
No |
The mounted data sources. |
|
|
object |
No |
|||
| DatasetId |
string |
No |
The dataset ID. This parameter and Uri are mutually exclusive. |
d-umns******zij4szhc |
| Uri |
string |
No |
The OSS path of the data source. This parameter and DatasetId are mutually exclusive. |
oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/source/ |
| MountPath |
string |
No |
The mount path. |
/mnt/data |
| CredentialConfig |
object |
No |
The credential configuration. |
|
| EnableCredentialInject |
boolean |
No |
Specifies whether to enable credential injection. |
true |
| AliyunEnvRoleKey |
string |
No |
The environment variable role key. |
0 |
| CredentialConfigItems |
array<object> |
No |
The list of credential configurations. |
|
|
array<object> |
No |
|||
| Key |
string |
No |
The key that identifies the configuration. |
0 |
| Type |
string |
No |
The configuration type. Valid values:
|
Role |
| Roles |
array<object> |
No |
The list of configured roles. |
|
|
object |
No |
The role information. |
||
| AssumeRoleFor |
string |
No |
The principal on whose behalf the role is assumed. |
1095******785714 |
| RoleType |
string |
No |
The type of the assumed role. Valid values:
|
service |
| RoleArn |
string |
No |
The role ARN. |
acs:ram::1095******785714:role/testrole |
| RunTimeout |
integer |
No |
The timeout period for a single test executed on the runtime. Unit: seconds. |
180 |
| WorkDir |
string |
No |
The OSS path of the working directory. |
oss://mybucket.oss-cn-hangzhou-internal.aliyuncs.com/workdir/ |
| AutoUpdateImage |
boolean |
No |
Specifies whether to automatically update the image. When a new image version is available, the system automatically updates the runtime image during off-peak hours. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RuntimeId |
string |
The runtime ID. |
rtime-apje******beaz |
| RequestId |
string |
The request ID. |
963BD7F9-0C02-5594-9550-BCC6DD43E3C0 |
Examples
Success response
JSON format
{
"RuntimeId": "rtime-apje******beaz",
"RequestId": "963BD7F9-0C02-5594-9550-BCC6DD43E3C0"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.