查询DSW实例详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
paidsw:GetInstance | get | *全部资源 * |
| 无 |
请求语法
GET /api/v2/instances/{InstanceId} HTTP/1.1
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
InstanceId | string | 是 | 实例 ID。如何获取实例 ID,请参见 ListInstances 。 | dsw-730xxxxxxxxxx |
返回参数
示例
正常返回示例
JSON
格式
{
"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****",
"MountPath": "/mnt/data",
"Uri": "oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/",
"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"
}
],
"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": "",
"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"
]
}
]
},
"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"
}
],
"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": "",
"Tags": [
{
"TagKey": "",
"TagValue": ""
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-10-14 | OpenAPI 入参发生变更 | 查看变更详情 |
2024-09-10 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-07-09 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-06-24 | API 内部配置变更,不影响调用 | 查看变更详情 |
2024-06-24 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2024-04-11 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-12-27 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-11-14 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-08-08 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-07-25 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-06-09 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-05-06 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2022-01-20 | OpenAPI 返回结构发生变更 | 查看变更详情 |
2022-01-20 | OpenAPI 返回结构发生变更 | 查看变更详情 |