GetInstance
Queries the details of a DSW instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidsw:GetInstance |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v2/instances/{InstanceId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. For more information about how to obtain the instance ID, see ListInstances. |
dsw-730xxxxxxxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Token |
string |
No |
The sharing token information. |
WUzWCMr325LV0bH2JH4C4HoDaKIU6C4S |
| Fields |
string |
No |
If specified, only the specified fields are returned. Separate multiple fields with commas. |
Name,Status,Priority |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The instance details. |
||
| AcceleratorType |
string |
The compute type of the instance. Valid values:
|
CPU |
| AccessRestrictionRules |
object |
The restriction rules of the instance. |
{"key":"PAI.AlgoOperator,PAI.AlgoDeveloper,PAI.LabelManager,PAI.WorkspaceGuest,PAI.MaxComputeDeveloper"} |
|
string |
The configuration values of the instance restriction rules. |
PAI.AlgoOperator,PAI.AlgoDeveloper,PAI.LabelManager,PAI.WorkspaceGuest,PAI.MaxComputeDeveloper |
|
| Accessibility |
string |
Specifies whether the instance is visible to other users in the workspace. Valid values:
Valid values:
|
PRIVATE |
| AccumulatedRunningTimeInMs |
integer |
The accumulated running time in milliseconds. |
3600000 |
| Affinity |
object |
The affinity configuration. |
|
| CPU |
object |
The CPU affinity configuration. This configuration is supported only for general-purpose computing subscription instances. |
|
| Enable |
boolean |
Specifies whether to enable CPU affinity. Valid values:
|
true |
| CloudDisks |
array<object> |
The cloud disks of the instance. |
[] |
|
array<object> |
The cloud disk information. |
||
| Capacity |
string |
The capacity of the cloud disk. |
30Gi |
| MountPath |
string |
The mount path of the cloud disk in the container. |
/mmt/workspace |
| Path |
string |
The path of the mounted directory in the cloud disk. |
/workspace |
| Status |
object |
The usage status of the cloud disk or snapshot. |
|
| Available |
integer |
The available capacity in bytes. |
106300440576 |
| Capacity |
integer |
The total capacity in bytes. |
107374182400 |
| Usage |
integer |
The used capacity in bytes. |
1073741824 |
| SubType |
string |
The usage type of the cloud disk. If the value is rootfs, the cloud disk is mounted as rootfs. |
rootfs |
| Code |
string |
The status code. Valid values:
|
null |
| CredentialConfig | CredentialConfig |
The credential injection configuration. |
|
| Datasets |
array<object> |
The dataset collection. |
|
|
object |
The dataset object. A dataset can be of the NAS or OSS type. The properties of the dataset object include the dataset ID and the mount path in the container. |
||
| AccessPointId |
string |
The access point ID of BMCPFS (CPFS for AI). This parameter is used for fine-grained access control based on access points. This parameter must be specified together with RoleArn and takes effect only on Lingjun resources. |
ap-bp15victorick1132***** |
| ActualMountAccess |
string |
The actual read and write permissions. Valid values: RW (read and write) and RO (read-only). |
RW |
| BoundCacheServiceId |
string |
The ID of the cache service currently bound to the dataset. This parameter is returned only as a response parameter and only when the instance is in the running state. Any value passed in the request is ignored. |
cache-abc123 |
| DatasetId |
string |
The dataset ID. |
d-vsqjvsjp4orp5l**** |
| DatasetVersion |
string |
The dataset version. |
v1 |
| Dynamic |
boolean |
Specifies whether to enable dynamic mounting. Default value: false. |
false |
| EnableCache |
boolean |
Specifies whether to enable local cache acceleration for the dataset. If this parameter is not specified or is set to false, local cache acceleration is disabled. If this parameter is set to true, local cache acceleration is enabled. This parameter takes effect only when the resources to which the instance belongs are connected to a cache service. |
true |
| MountAccess |
string |
The read and write permissions. Valid values: RW (read and write) and RO (read-only). Valid values:
|
RW |
| MountPath |
string |
The mount path in the container. |
/mnt/data |
| OptionType |
string |
[Deprecated] The mount type of the specified dataset. |
FastReadWrite |
| Options |
string |
The mount properties of the specified dataset. |
{ "fs.oss.download.thread.concurrency": "10", "fs.oss.upload.thread.concurrency": "10", "fs.jindo.args": "-oattr_timeout=3 -oentry_timeout=0 -onegative_timeout=0 -oauto_cache -ono_symlink" } |
| RoleArn |
string |
If you specify this parameter, the system uses the identity of this role to mount the OSS dataset. |
acs:ram::uid:role/test-role |
| Uri |
string |
The URI of the specified dataset. |
oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/ |
| DockerConfig |
object |
The Docker configuration of the instance. |
|
| ContainersLimit |
integer |
The maximum number of sub-containers in the instance. |
10 |
| Enable |
boolean |
Specifies whether to enable Docker in the instance. |
|
| MountAccessConfigPath |
string |
The path of the mount permission configuration for secondary containers. |
/etc/docker/dockerboard/mount_access.json |
| Driver |
string |
The NVIDIA driver configuration. |
535.54.03 |
| DynamicMount | DynamicMount |
The dynamic mount configuration. |
|
| EcsSpec |
string |
The ECS instance type of the instance. |
ecs.c6.large |
| EnvironmentVariables |
object |
The environment variables. |
{"userName":"Chris"} |
|
string |
The user-defined environment variables. These variables are injected into the container after the instance is started. |
app: MAAS |
|
| GmtCreateTime |
string |
The time when the instance was created. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The time when the instance was modified. |
2021-01-12T14:36:01Z |
| HttpStatusCode |
integer |
The HTTP status code. Valid values:
|
400 |
| IdleInstanceCuller |
object |
The automatic shutdown settings for idle instances. |
{"InstanceId":"dsw-05cefd0be2e5a278","CpuPercentThreshold":20,"GpuPercentThreshold":10,"MaxIdleTimeInMinutes":120,"IdleTimeInMinutes":30} |
| CpuPercentThreshold |
integer |
The CPU utilization threshold in percentage. Valid values: 1 to 100. If the CPU utilization is lower than this value, the instance is considered idle. |
20 |
| GpuPercentThreshold |
integer |
The GPU utilization threshold in percentage. Valid values: 1 to 100. This parameter takes effect only for GPU-accelerated instances. If both the CPU and GPU utilization are lower than their respective thresholds, the instance is considered idle. |
10 |
| IdleTimeInMinutes |
integer |
The current idle duration of the instance in minutes. |
30 |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
| MaxIdleTimeInMinutes |
integer |
The maximum idle time threshold in minutes. If the idle duration exceeds this value, the DSW instance is automatically stopped. |
60 |
| ImageAuth |
string |
The value of the Base64 encoding for the account and password information of private user images. The password is hidden. |
YWxpeXVuNjUzMzM5MjIwMzoqKioqKio= |
| ImageId |
string |
The image ID. |
image-05cefd0be2exxxx |
| ImageName |
string |
The image name. |
py36_cpu_tf1.12_ubuntu |
| ImageUrl |
string |
The image URL. |
registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
| InstanceName |
string |
The instance name. |
training_data |
| InstanceShutdownTimer |
object |
The scheduled shutdown task. |
|
| DueTime |
string |
The scheduled shutdown time. |
2021-01-12T14:36:01Z |
| GmtCreateTime |
string |
The creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The modification time. |
2021-01-12T14:36:01Z |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
| RemainingTimeInMs |
integer |
The remaining time before shutdown in milliseconds. |
3600000 |
| InstanceSnapshotList |
array<object> |
The list of instance snapshots. |
[] |
|
object |
The instance snapshot. |
||
| GmtCreateTime |
string |
The snapshot creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The snapshot modification time. |
2021-01-12T14:36:01Z |
| ImageId |
string |
The image ID. |
image-05cefd0be2exxxx |
| ImageName |
string |
The image name. |
py36_cpu_tf1.12_ubuntu |
| ImageUrl |
string |
The image URL. |
registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu |
| ReasonCode |
string |
The error code of the instance snapshot. |
Internal Error |
| ReasonMessage |
string |
The error message of the instance snapshot. |
ImagePullBackOff |
| RepositoryUrl |
string |
The image repository URL. |
https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images |
| Status |
string |
The status of the instance snapshot. |
Pushing |
| InstanceUrl |
string |
The instance URL. |
https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=3****#/ |
| JupyterlabUrl |
string |
The JupyterLab URL. |
https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/lab/ |
| Labels |
array<object> |
The custom labels. |
[{"Key":"stsTokenOwner","Value":"123xxxxxxxx"}] |
|
object |
The custom label. You can add custom labels to instances to mark their custom attributes. |
||
| Key |
string |
The key of the custom label. |
stsTokenOwner |
| Value |
string |
The value of the custom label. |
123xxxxxxxx |
| LatestSnapshot |
object |
The latest saved user image. |
|
| GmtCreateTime |
string |
The snapshot creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The snapshot modification time. |
2021-01-12T14:36:01Z |
| ImageId |
string |
The image ID. |
image-05cefd0be2exxxx |
| ImageName |
string |
The image name. |
py36_cpu_tf1.12_ubuntu |
| ImageUrl |
string |
The image URL. |
registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu |
| ReasonCode |
string |
The error code of the instance snapshot. |
Internal Error |
| ReasonMessage |
string |
The error message of the instance snapshot. |
ImagePullBackOff |
| RepositoryUrl |
string |
The image repository URL. |
https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images |
| Status |
string |
The status of the instance snapshot. Valid values:
|
Pushing |
| Message |
string |
The description of the operation result.
|
null |
| MigrationOptions |
object |
The instance migration options. |
{"EnableProcessesPreservation":true} |
| NodeErrorRecovery |
object |
The node error recovery configuration. |
|
| autoSwitchCountdownSeconds |
integer |
The wait time in seconds for an automatic switchover. |
30 |
| enableAutoSwitchOnNodeError |
boolean |
Specifies whether to enable automatic switchover when a node error occurs. |
true |
| hasNodeError |
boolean |
Indicates whether a node error has occurred. |
false |
| PaymentType |
string |
The payment type. Valid values:
|
PayAsYouGo |
| PodIps |
array |
The list of IP addresses of the instance pods. |
|
| PodIp | |||
| Priority |
integer |
The priority. Instances with a higher priority are allocated resources first. |
1 |
| ProxyPath |
string |
The path of the proxy. |
dsw-170197/proxy/ |
| ReasonCode |
string |
The error code of the instance. |
Internal Error |
| ReasonMessage |
string |
The cause of the instance error. |
ImagePullBackOff |
| RequestId |
string |
The request ID. |
E7D55162-4489-1619-AAF5-3F97D5FC**** |
| RequestedResource |
object |
The resource configuration for subscription scenarios. |
{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"} |
| CPU |
string |
The number of CPU cores. |
32 |
| GPU |
string |
The number of GPUs. |
4 |
| GPUType |
string |
The GPU type. Valid values:
|
v100 |
| Memory |
string |
The memory size. Unit: GB. |
32 |
| SharedMemory |
string |
The shared memory size. Unit: GB. |
32 |
| ResourceId |
string |
The resource ID. Specify this parameter for subscription resources. |
dsw-12345**** |
| ResourceName |
string |
The instance specifications.
|
ecs.g7.xlarge |
| ServiceConfig | ServiceConfig | ||
| Status |
string |
The instance status. Valid values:
|
Running |
| Success |
boolean |
The success flag. Valid values:
|
true |
| Tags |
array<object> |
The list of tags. |
|
|
object |
The resource tag. |
||
| TagKey |
string |
The tag key. |
tag1 |
| TagValue |
string |
The tag value. |
value1 |
| TenantId |
string |
The tenant ID. |
1234567890123456 |
| TerminalUrl |
string |
The terminal URL. |
https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/tty/ |
| UserCommandId |
string |
The custom command ID. You can call the GetUserCommand operation by using this ID to obtain the details of the custom command. |
1900 |
| UserId |
string |
The user ID. |
161228528250**** |
| UserMetricsEndpoints |
array |
The list of custom metric collection endpoints. |
|
| UserMetricsEndpoint | |||
| UserName |
string |
The username. |
Test user |
| UserVpc |
object |
The user VPC configuration. |
|
| BandwidthLimit | BandwidthLimit |
The Internet bandwidth throttling configuration. |
|
| DefaultRoute |
string |
Default Route |
eth0 | eth1 |
| ExtendedCIDRs |
array |
The extended CIDR blocks.
|
["192.168.0.1/24", "192.168.1.1/24"] |
|
string |
The extended CIDR block. |
"172.16.19.0/24","172.16.2.0/24","172.16.12.0/24" |
|
| ForwardInfos |
array |
The port forwarding information. |
|
| ForwardInfoResponse |
The port forwarding information. |
||
| Ip |
string |
The IP address of the user VPC. |
192.0.2.10 |
| SecurityGroupId |
string |
The security group ID. |
sg-xxxxxx |
| VSwitchId |
string |
The vSwitch ID. |
vsw-xxxxx |
| VpcId |
string |
The VPC ID. |
vpc-xxxxx |
| WebIDEUrl |
string |
The Web IDE URL. |
https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/ide/ |
| WorkspaceId |
string |
The workspace ID. |
40823 |
| WorkspaceName |
string |
The workspace name. |
training_data |
| WorkspaceSource |
string |
The storage used by the workspace. If this parameter is not specified, NAS, cloud disks, or local disks are used in that order. |
d-123456789 |
Examples
Success response
JSON format
{
"AcceleratorType": "CPU",
"AccessRestrictionRules": {
"key": "PAI.AlgoOperator,PAI.AlgoDeveloper,PAI.LabelManager,PAI.WorkspaceGuest,PAI.MaxComputeDeveloper"
},
"Accessibility": "PRIVATE",
"AccumulatedRunningTimeInMs": 3600000,
"Affinity": {
"CPU": {
"Enable": true
}
},
"CloudDisks": [
{
"Capacity": "30Gi",
"MountPath": "/mmt/workspace",
"Path": "/workspace",
"Status": {
"Available": 106300440576,
"Capacity": 107374182400,
"Usage": 1073741824
},
"SubType": "rootfs"
}
],
"Code": "null",
"CredentialConfig": {
"AliyunEnvRoleKey": "0",
"Configs": [
{
"Key": "0",
"Roles": [
{
"AssumeRoleFor": "123******",
"Policy": "{}",
"RoleArn": "acs:ram::123******:role/****",
"RoleType": "service",
"UserInfo": {
"AccessKeyId": "LT********",
"Id": "456******",
"SecurityToken": "********",
"Type": "S"
}
}
],
"Type": "Role"
}
],
"Enable": true
},
"Datasets": [
{
"AccessPointId": "ap-bp15victorick1132*****",
"ActualMountAccess": "RW",
"BoundCacheServiceId": "cache-abc123",
"DatasetId": "d-vsqjvsjp4orp5l****",
"DatasetVersion": "v1",
"Dynamic": false,
"EnableCache": true,
"MountAccess": "RW",
"MountPath": "/mnt/data",
"OptionType": "FastReadWrite",
"Options": "{\n \"fs.oss.download.thread.concurrency\": \"10\",\n \"fs.oss.upload.thread.concurrency\": \"10\",\n \"fs.jindo.args\": \"-oattr_timeout=3 -oentry_timeout=0 -onegative_timeout=0 -oauto_cache -ono_symlink\"\n}",
"RoleArn": "acs:ram::uid:role/test-role",
"Uri": "oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/"
}
],
"DockerConfig": {
"ContainersLimit": 10,
"Enable": false,
"MountAccessConfigPath": "/etc/docker/dockerboard/mount_access.json"
},
"Driver": "535.54.03",
"DynamicMount": {
"Enable": true,
"MountPoints": [
{
"Options": "{}",
"RootPath": "/mnt/dynamic/"
}
]
},
"EcsSpec": "ecs.c6.large",
"EnvironmentVariables": {
"key": "app: MAAS"
},
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"HttpStatusCode": 400,
"IdleInstanceCuller": {
"CpuPercentThreshold": 20,
"GpuPercentThreshold": 10,
"IdleTimeInMinutes": 30,
"InstanceId": "dsw-730xxxxxxxxxx",
"MaxIdleTimeInMinutes": 60
},
"ImageAuth": "YWxpeXVuNjUzMzM5MjIwMzoqKioqKio=",
"ImageId": "image-05cefd0be2exxxx",
"ImageName": "py36_cpu_tf1.12_ubuntu",
"ImageUrl": "registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu",
"InstanceId": "dsw-730xxxxxxxxxx",
"InstanceName": "training_data",
"InstanceShutdownTimer": {
"DueTime": "2021-01-12T14:36:01Z",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"InstanceId": "dsw-730xxxxxxxxxx",
"RemainingTimeInMs": 3600000
},
"InstanceSnapshotList": [
{
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"ImageId": "image-05cefd0be2exxxx",
"ImageName": "py36_cpu_tf1.12_ubuntu",
"ImageUrl": "registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu",
"ReasonCode": "Internal Error",
"ReasonMessage": "ImagePullBackOff",
"RepositoryUrl": "https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images",
"Status": "Pushing"
}
],
"InstanceUrl": "https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=3****#/",
"JupyterlabUrl": "https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/lab/",
"Labels": [
{
"Key": "stsTokenOwner",
"Value": "123xxxxxxxx"
}
],
"LatestSnapshot": {
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"ImageId": "image-05cefd0be2exxxx",
"ImageName": "py36_cpu_tf1.12_ubuntu",
"ImageUrl": "registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu",
"ReasonCode": "Internal Error",
"ReasonMessage": "ImagePullBackOff",
"RepositoryUrl": "https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images",
"Status": "Pushing"
},
"Message": "null",
"MigrationOptions": {
"EnableProcessesPreservation": true
},
"NodeErrorRecovery": {
"autoSwitchCountdownSeconds": 30,
"enableAutoSwitchOnNodeError": true,
"hasNodeError": false
},
"PaymentType": "PayAsYouGo",
"PodIps": [
{
"InterfaceName": "eth0",
"Ip": "192.0.2.10",
"Type": "system"
}
],
"Priority": 1,
"ProxyPath": "dsw-170197/proxy/",
"ReasonCode": "Internal Error",
"ReasonMessage": "ImagePullBackOff",
"RequestId": "E7D55162-4489-1619-AAF5-3F97D5FC****",
"RequestedResource": {
"CPU": "32",
"GPU": "4",
"GPUType": "v100",
"Memory": "32",
"SharedMemory": "32"
},
"ResourceId": "dsw-12345****",
"ResourceName": "ecs.g7.xlarge",
"ServiceConfig": {
"CodeServerAuth": "password",
"CodeServerPassword": "",
"JupyterServerAuth": "password",
"JupyterServerPassword": ""
},
"Status": "Running",
"Success": true,
"Tags": [
{
"TagKey": "tag1",
"TagValue": "value1"
}
],
"TenantId": "1234567890123456",
"TerminalUrl": "https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/tty/",
"UserCommandId": "1900",
"UserId": "161228528250****",
"UserMetricsEndpoints": [
{
"Path": "",
"Port": 0
}
],
"UserName": "TestUser",
"UserVpc": {
"BandwidthLimit": {
"EgressRate": "10Mbps",
"EgressWhitelists": [
""
],
"IngressRate": "10Mbps",
"IngressWhitelists": [
""
]
},
"DefaultRoute": "eth0 | eth1",
"ExtendedCIDRs": [
"\"172.16.19.0/24\",\"172.16.2.0/24\",\"172.16.12.0/24\""
],
"ForwardInfos": [
{
"AccessType": [
"intranet"
],
"ConnectInfo": {
"Internet": {
"Endpoint": "47.111.119.114",
"Port": "22"
},
"Intranet": {
"Endpoint": "dsw-notebook-22-urz3u6cnu0uts7ej9r.dsw-5cc6083084818f60.dsw.pai.alibaba.com",
"Port": "22"
},
"Message": "DNAT and privateZone are both ready.",
"Phase": "Ready"
},
"ContainerName": "dsw-notebook",
"EipAllocationId": "eip-25877c70gddh****",
"Enable": true,
"ExternalPort": "1024",
"ForwardPort": "22",
"Name": "ssh",
"NatGatewayId": "ngw-bp1uewa15k4iy5770****",
"NlbGatewayId": "nlb-a1b2c3d4e5f6g7h8i9",
"SSHPublicKey": "ssh-rsa AAAAB3****************************\n"
}
],
"Ip": "192.0.2.10",
"SecurityGroupId": "sg-xxxxxx",
"VSwitchId": "vsw-xxxxx",
"VpcId": "vpc-xxxxx"
},
"WebIDEUrl": "https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/ide/",
"WorkspaceId": "40823",
"WorkspaceName": "training_data",
"WorkspaceSource": "d-123456789"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.