Retrieve 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 information about how to obtain an instance ID, see ListInstances. |
dsw-730xxxxxxxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Token |
string |
No |
The sharing token. |
WUzWCMr325LV0bH2JH4C4HoDaKIU6C4S |
| Fields |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The instance details. |
||
| WorkspaceId |
string |
The workspace ID. |
40823 |
| WorkspaceName |
string |
The workspace name. |
training_data |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
| InstanceName |
string |
The instance name. |
training_data |
| EcsSpec |
string |
The ECS instance type associated with the DSW instance. |
ecs.c6.large |
| Status |
string |
The instance status. Valid values:
|
Running |
| 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/ |
| WebIDEUrl |
string |
The Web IDE URL. |
https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/ide/ |
| TerminalUrl |
string |
The terminal URL. |
https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/tty/ |
| AccumulatedRunningTimeInMs |
integer |
The accumulated running time in milliseconds. |
3600000 |
| ImageId |
string |
The image ID. |
image-05cefd0be2exxxx |
| ImageUrl |
string |
The registry address. |
registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu |
| ImageName |
string |
The image name. |
py36_cpu_tf1.12_ubuntu |
| GmtCreateTime |
string |
The instance creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The instance modification time. |
2021-01-12T14:36:01Z |
| UserId |
string |
The user ID. |
161228528250**** |
| UserName |
string |
The username. |
测试用户 |
| Datasets |
array<object> |
The dataset collection. |
|
|
object |
A dataset object. The dataset can be of NAS or OSS type. The dataset object attributes include the dataset ID and the mount path inside the container. |
||
| DatasetId |
string |
The dataset ID. |
d-vsqjvsjp4orp5l**** |
| DatasetVersion |
string |
The dataset version. |
v1 |
| Uri |
string |
The dataset URI. |
oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/ |
| MountPath |
string |
The mount path inside the container. |
/mnt/data |
| MountAccess |
string |
The read and write permission. RW: read and write. RO: read-only. Valid values:
|
RW |
| Options |
string |
The mount options for 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" } |
| OptionType |
string |
The mount type for the specified dataset (deprecated). |
FastReadWrite |
| Dynamic |
boolean |
Indicates whether dynamic mounting is enabled. Default value: false. |
false |
| ActualMountAccess |
string |
||
| UserVpc |
object |
The user VPC configuration. |
|
| VpcId |
string |
The VPC ID. |
vpc-xxxxx |
| VSwitchId |
string |
The vSwitch ID. |
vsw-xxxxx |
| SecurityGroupId |
string |
The security group ID. |
sg-xxxxxx |
| 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" |
|
| DefaultRoute |
string |
Default Route |
eth0 | eth1 |
| ForwardInfos |
array |
The port forwarding information. |
|
| ForwardInfoResponse |
The list of port forwarding information. |
||
| BandwidthLimit |
BandwidthLimit |
The Internet bandwidth throttling configuration. |
|
| Ip |
string |
||
| InstanceShutdownTimer |
object |
The scheduled shutdown task. |
|
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
| GmtCreateTime |
string |
The creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The modification time. |
2021-01-12T14:36:01Z |
| DueTime |
string |
The scheduled shutdown time. |
2021-01-12T14:36:01Z |
| RemainingTimeInMs |
integer |
The remaining shutdown time in milliseconds. |
3600000 |
| ReasonCode |
string |
The error code of the instance. |
Internal Error |
| ReasonMessage |
string |
The reason for the instance error. |
ImagePullBackOff |
| PaymentType |
string |
The payment type. Valid values:
|
PayAsYouGo |
| LatestSnapshot |
object |
The latest saved user image. |
|
| 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 |
| RepositoryUrl |
string |
The image repository URL. |
https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images |
| GmtCreateTime |
string |
The snapshot creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The snapshot modification time. |
2021-01-12T14:36:01Z |
| ReasonCode |
string |
The error code of the instance snapshot. |
Internal Error |
| ReasonMessage |
string |
The error message of the instance snapshot. |
ImagePullBackOff |
| Status |
string |
The instance snapshot status. Valid values:
|
Pushing |
| AcceleratorType |
string |
The instance compute type. Valid values:
|
CPU |
| Accessibility |
string |
Indicates whether the instance is visible to others in the workspace. Valid values:
Valid values:
|
PRIVATE |
| EnvironmentVariables |
object |
The environment variables. |
{userName: "Chris"} |
|
string |
The custom environment variables defined by the user. These variables are injected into the container after the instance starts. |
app: MAAS |
|
| ResourceId |
string |
The resource ID. Specify this parameter for subscription instances. |
dsw-12345**** |
| ResourceName |
string |
The instance type.
|
ecs.g7.xlarge |
| Priority |
integer |
The priority. When allocating resources to instances, instances with higher priorities are allocated resources first. |
1 |
| RequestedResource |
object |
The resource configuration. This parameter is used for subscription instances. |
{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"} |
| CPU |
string |
The number of CPU cores. |
32 |
| Memory |
string |
The memory size in GB. |
32 |
| SharedMemory |
string |
The shared memory size in GB. |
32 |
| GPU |
string |
The number of GPUs. |
4 |
| GPUType |
string |
The GPU model. Valid values:
|
v100 |
| Labels |
array<object> |
The custom tags. |
{'foo': 'bar'} |
|
object |
You can add custom tags to an instance to mark its custom attributes. |
||
| Key |
string |
The custom tag key. |
stsTokenOwner |
| Value |
string |
The custom tag value. |
123xxxxxxxx |
| IdleInstanceCuller |
object |
The automatic shutdown settings for idle instances. |
{"InstanceId":"dsw-05cefd0be2e5a278","CpuPercentThreshold":20,"GpuPercentThreshold":10,"MaxIdleTimeInMinutes":120,"IdleTimeInMinutes":30} |
| InstanceId |
string |
The instance ID. |
dsw-730xxxxxxxxxx |
| CpuPercentThreshold |
integer |
The CPU utilization threshold. Unit: 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. Unit: percentage. Valid values: 1 to 100. This parameter takes effect only for GPU instances. The instance is considered idle only when both CPU and GPU utilizations are below their respective thresholds. |
10 |
| MaxIdleTimeInMinutes |
integer |
The maximum idle wait time in minutes. If the idle duration exceeds this value, the DSW instance is automatically stopped. |
60 |
| IdleTimeInMinutes |
integer |
The current idle duration of the instance in minutes. |
30 |
| InstanceSnapshotList |
array<object> |
The instance snapshot list. |
[] |
|
object |
An instance snapshot. |
||
| 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 |
| RepositoryUrl |
string |
The image repository URL. |
https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images |
| GmtCreateTime |
string |
The snapshot creation time. |
2021-01-12T14:36:01Z |
| GmtModifiedTime |
string |
The snapshot modification time. |
2021-01-12T14:36:01Z |
| ReasonCode |
string |
The error code of the instance snapshot. |
Internal Error |
| ReasonMessage |
string |
The error message of the instance snapshot. |
ImagePullBackOff |
| Status |
string |
The instance snapshot status. |
Pushing |
| CloudDisks |
array<object> |
The cloud disk list of the instance. |
[] |
|
array<object> |
The cloud disk information. |
||
| Capacity |
string |
The cloud disk capacity. |
30Gi |
| SubType |
string |
The cloud disk usage mode. rootfs is mounted as rootfs. |
rootfs |
| MountPath |
string |
The mount path of the cloud disk inside the container. |
/mmt/workspace |
| Path |
string |
The directory path on the cloud disk that is mounted. |
/workspace |
| Status |
object |
||
| Available |
integer |
||
| Usage |
integer |
||
| Capacity |
integer |
||
| WorkspaceSource |
string |
The storage referenced by the workspace. If this parameter is not specified, NAS, cloud disk, or local disk is used in sequence. |
d-123456789 |
| RequestId |
string |
The request ID. |
E7D55162-4489-1619-AAF5-3F97D5FC**** |
| Success |
boolean |
The success indicator. Valid values:
|
true |
| Message |
string |
The operation result description.
|
null |
| Code |
string |
The status code. Valid values:
|
null |
| HttpStatusCode |
integer |
The HTTP status code. Valid values:
|
null |
| Driver |
string |
The NVIDIA driver configuration. |
535.54.03 |
| NodeErrorRecovery |
object |
The node error recovery configuration. |
|
| hasNodeError |
boolean |
Indicates whether a node error has occurred. |
false |
| enableAutoSwitchOnNodeError |
boolean |
Indicates whether automatic switchover is enabled when a node error occurs. |
true |
| autoSwitchCountdownSeconds |
integer |
The countdown time in seconds before automatic switchover. |
30 |
| CredentialConfig | CredentialConfig |
The credential injection configuration. |
|
| Affinity |
object |
The affinity configuration. |
|
| CPU |
object |
The CPU affinity configuration. This parameter is supported only for general computing subscription instances. |
|
| Enable |
boolean |
Indicates whether CPU affinity is enabled. true: enabled. false: disabled. |
true |
| ImageAuth |
string |
The Base64-encoded username and password for a private image. The password part is masked. |
YWxpeXVuNjUzMzM5MjIwMzoqKioqKio= |
| Tags |
array<object> |
The tag list. |
|
|
object |
The resource tags. |
||
| TagKey |
string |
The tag key. |
tag1 |
| TagValue |
string |
The tag value. |
value1 |
| DynamicMount | DynamicMount |
The dynamic mounting configuration. |
|
| ProxyPath |
string |
The proxy path. |
dsw-170197/proxy/ |
| UserCommandId |
string |
The custom command ID. You can call the GetUserCommand operation with this ID to obtain the specific content of the custom command. |
1900 |
| ServiceConfig |
ServiceConfig |
||
| PodIps |
array |
||
| PodIp | |||
| MigrationOptions |
object |
||
| AccessRestrictionRules |
object |
||
|
string |
|||
| DockerConfig |
object |
||
| Enable |
boolean |
||
| ContainersLimit |
integer |
10 |
|
| MountAccessConfigPath |
string |
/etc/docker/dockerboard/mount_access.json |
|
| TenantId |
string |
Examples
Success response
JSON format
{
"WorkspaceId": "40823",
"WorkspaceName": "training_data",
"InstanceId": "dsw-730xxxxxxxxxx",
"InstanceName": "training_data",
"EcsSpec": "ecs.c6.large",
"Status": "Running",
"InstanceUrl": "https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=3****#/",
"JupyterlabUrl": "https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/lab/",
"WebIDEUrl": "https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/ide/",
"TerminalUrl": "https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/tty/",
"AccumulatedRunningTimeInMs": 3600000,
"ImageId": "image-05cefd0be2exxxx",
"ImageUrl": "registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu",
"ImageName": "py36_cpu_tf1.12_ubuntu",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"UserId": "161228528250****",
"UserName": "测试用户",
"Datasets": [
{
"DatasetId": "d-vsqjvsjp4orp5l****",
"DatasetVersion": "v1",
"Uri": "oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/",
"MountPath": "/mnt/data",
"MountAccess": "RW",
"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}",
"OptionType": "FastReadWrite",
"Dynamic": false,
"ActualMountAccess": ""
}
],
"UserVpc": {
"VpcId": "vpc-xxxxx",
"VSwitchId": "vsw-xxxxx",
"SecurityGroupId": "sg-xxxxxx",
"ExtendedCIDRs": [
"\"172.16.19.0/24\",\"172.16.2.0/24\",\"172.16.12.0/24\""
],
"DefaultRoute": "eth0 | eth1",
"ForwardInfos": [
{
"Enable": true,
"ContainerName": "dsw-notebook",
"ForwardPort": "22",
"NatGatewayId": "ngw-bp1uewa15k4iy5770****",
"EipAllocationId": "eip-25877c70gddh****",
"SSHPublicKey": "ssh-rsa AAAAB3****************************\n",
"ConnectInfo": {
"Phase": "Ready",
"Message": "DNAT and privateZone are both ready.",
"Intranet": {
"Endpoint": "dsw-notebook-22-urz3u6cnu0uts7ej9r.dsw-5cc6083084818f60.dsw.pai.alibaba.com",
"Port": "22"
},
"Internet": {
"Endpoint": "47.111.119.114",
"Port": "22"
}
},
"Name": "ssh",
"ExternalPort": "1024",
"AccessType": [
"intranet"
],
"NlbGatewayId": ""
}
],
"BandwidthLimit": {
"EgressWhitelists": [
""
],
"IngressRate": "",
"EgressRate": "",
"IngressWhitelists": [
""
]
},
"Ip": ""
},
"InstanceShutdownTimer": {
"InstanceId": "dsw-730xxxxxxxxxx",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"DueTime": "2021-01-12T14:36:01Z",
"RemainingTimeInMs": 3600000
},
"ReasonCode": "Internal Error",
"ReasonMessage": "ImagePullBackOff",
"PaymentType": "PayAsYouGo",
"LatestSnapshot": {
"ImageId": "image-05cefd0be2exxxx",
"ImageName": "py36_cpu_tf1.12_ubuntu",
"ImageUrl": "registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu",
"RepositoryUrl": "https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"ReasonCode": "Internal Error",
"ReasonMessage": "ImagePullBackOff",
"Status": "Pushing"
},
"AcceleratorType": "CPU",
"Accessibility": "PRIVATE",
"EnvironmentVariables": {
"key": "app: MAAS"
},
"ResourceId": "dsw-12345****",
"ResourceName": "ecs.g7.xlarge",
"Priority": 1,
"RequestedResource": {
"CPU": "32",
"Memory": "32",
"SharedMemory": "32",
"GPU": "4",
"GPUType": "v100"
},
"Labels": [
{
"Key": "stsTokenOwner",
"Value": "123xxxxxxxx"
}
],
"IdleInstanceCuller": {
"InstanceId": "dsw-730xxxxxxxxxx",
"CpuPercentThreshold": 20,
"GpuPercentThreshold": 10,
"MaxIdleTimeInMinutes": 60,
"IdleTimeInMinutes": 30
},
"InstanceSnapshotList": [
{
"ImageId": "image-05cefd0be2exxxx",
"ImageName": "py36_cpu_tf1.12_ubuntu",
"ImageUrl": "registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu",
"RepositoryUrl": "https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images",
"GmtCreateTime": "2021-01-12T14:36:01Z",
"GmtModifiedTime": "2021-01-12T14:36:01Z",
"ReasonCode": "Internal Error",
"ReasonMessage": "ImagePullBackOff",
"Status": "Pushing"
}
],
"CloudDisks": [
{
"Capacity": "30Gi",
"SubType": "rootfs",
"MountPath": "/mmt/workspace",
"Path": "/workspace",
"Status": {
"Available": 0,
"Usage": 0,
"Capacity": 0
}
}
],
"WorkspaceSource": "d-123456789",
"RequestId": "E7D55162-4489-1619-AAF5-3F97D5FC****",
"Success": true,
"Message": "null",
"Code": "null",
"HttpStatusCode": 0,
"Driver": "535.54.03",
"NodeErrorRecovery": {
"hasNodeError": false,
"enableAutoSwitchOnNodeError": true,
"autoSwitchCountdownSeconds": 30
},
"CredentialConfig": {
"Enable": true,
"AliyunEnvRoleKey": "0",
"Configs": [
{
"Key": "0",
"Type": "Role",
"Roles": [
{
"RoleArn": "acs:ram::123******:role/****",
"RoleType": "service",
"AssumeRoleFor": "123******",
"Policy": "{}",
"UserInfo": {
"Id": "456******",
"Type": "S",
"AccessKeyId": "LT********",
"SecurityToken": "********"
}
}
]
}
]
},
"Affinity": {
"CPU": {
"Enable": true
}
},
"ImageAuth": "YWxpeXVuNjUzMzM5MjIwMzoqKioqKio=",
"Tags": [
{
"TagKey": "tag1",
"TagValue": "value1"
}
],
"DynamicMount": {
"Enable": true,
"MountPoints": [
{
"RootPath": "/mnt/dynamic/",
"Options": "{}"
}
]
},
"ProxyPath": "dsw-170197/proxy/",
"UserCommandId": "1900",
"ServiceConfig": {
"JupyterServerPassword": "",
"JupyterServerAuth": "",
"CodeServerPassword": "",
"CodeServerAuth": ""
},
"PodIps": [
{
"Type": "",
"Ip": "",
"InterfaceName": ""
}
],
"MigrationOptions": {
"test": "test",
"test2": 1
},
"AccessRestrictionRules": {
"key": ""
},
"DockerConfig": {
"Enable": false,
"ContainersLimit": 10,
"MountAccessConfigPath": "/etc/docker/dockerboard/mount_access.json"
},
"TenantId": ""
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.