'1.0', 'info' => [ 'style' => 'ROA', 'product' => 'pai-dsw', 'version' => '2022-01-01', ], 'directories' => [ [ 'id' => 313771, 'title' => '实例', 'type' => 'directory', 'children' => [ 'CreateInstance', 'DeleteInstance', 'UpdateInstance', 'StartInstance', 'StopInstance', 'GetInstance', 'ListInstances', 'GetInstanceEvents', 'UpdateInstanceLabels', 'DeleteInstanceLabels', 'DeleteInstances', 'StopInstances', ], ], [ 'id' => 313784, 'title' => '生命周期', 'type' => 'directory', 'children' => [ 'GetLifecycle', ], ], [ 'id' => 313786, 'title' => '资源监控', 'type' => 'directory', 'children' => [ 'GetInstanceMetrics', ], ], [ 'id' => 313788, 'title' => '实例快照', 'type' => 'directory', 'children' => [ 'CreateInstanceSnapshot', 'DeleteInstanceSnapshot', 'GetInstanceSnapshot', 'ListInstanceSnapshot', ], ], [ 'id' => 313793, 'title' => '统计', 'type' => 'directory', 'children' => [ 'GetResourceGroupStatistics', 'ListInstanceStatistics', ], ], [ 'id' => 313796, 'title' => '实例定时自动关机', 'type' => 'directory', 'children' => [ 'CreateInstanceShutdownTimer', 'DeleteInstanceShutdownTimer', 'GetInstanceShutdownTimer', ], ], [ 'id' => 313800, 'title' => '闲置实例自动关机', 'type' => 'directory', 'children' => [ 'CreateIdleInstanceCuller', 'DeleteIdleInstanceCuller', 'GetIdleInstanceCuller', ], ], [ 'id' => 313804, 'title' => 'ECS规格', 'type' => 'directory', 'children' => [ 'ListEcsSpecs', ], ], [ 'id' => 313806, 'title' => '用户配置', 'type' => 'directory', 'children' => [ 'GetUserConfig', ], ], [ 'id' => 313808, 'title' => '其他', 'type' => 'directory', 'children' => [ 'CreateDiagnosis', 'GetToken', 'GetMetrics', 'GetUserCommand', 'ListSystemLogs', ], ], [ 'id' => 0, 'title' => '其它', 'type' => 'directory', 'children' => [ 'GetSanityCheckTask', 'CreateSanityCheckTask', ], ], ], 'components' => [ 'schemas' => [ 'BandwidthLimit' => [ 'title' => '带宽限制', 'type' => 'object', 'properties' => [ 'EgressWhitelists' => [ 'title' => '出口白名单', 'type' => 'array', 'items' => [ 'type' => 'string', ], ], 'IngressRate' => [ 'title' => '入口速率', 'type' => 'string', ], 'EgressRate' => [ 'title' => '出口速率', 'type' => 'string', ], 'IngressWhitelists' => [ 'title' => '入口白名单', 'type' => 'array', 'items' => [ 'type' => 'string', ], ], ], ], 'CredentialConfig' => [ 'title' => 'credential配置', 'description' => '凭据配置。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'title' => '是否开启Credential注入', 'description' => '是否开启Credential注入', 'type' => 'boolean', 'example' => 'true', ], 'AliyunEnvRoleKey' => [ 'title' => '环境变量角色key', 'description' => '环境变量角色key', 'type' => 'string', 'required' => false, 'example' => '0', ], 'Configs' => [ 'title' => '配置列表', 'description' => '配置列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '标识config的key。', 'description' => '标识config的key。', 'type' => 'string', 'required' => true, 'example' => '0', ], 'Type' => [ 'title' => '配置类型。可选值包括:Role-角色扮演;RoleChain-角色链扮演', 'description' => '配置类型。可选值包括:Role-角色扮演;RoleChain-角色链扮演', 'type' => 'string', 'required' => true, 'example' => 'Role', ], 'Roles' => [ 'title' => '配置的角色列表', 'description' => '配置的角色列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'RoleArn' => [ 'title' => 'RAM角色arn', 'description' => 'RAM角色arn', 'type' => 'string', 'required' => true, 'example' => 'acs:ram::123******:role/****', ], 'RoleType' => [ 'title' => '扮演的角色类型。可选值包括:service-由服务扮演;user-由普通用户账号扮演', 'description' => '扮演的角色类型。可选值包括:service-由服务扮演;user-由普通用户账号扮演', 'type' => 'string', 'required' => true, 'example' => 'service', ], 'AssumeRoleFor' => [ 'title' => '扮演角色的所属主体', 'description' => '扮演角色的所属主体', 'type' => 'string', 'example' => '123******', ], 'Policy' => [ 'title' => '为角色进一步限定的权限策略。', 'description' => '为角色进一步限定的权限策略。', 'type' => 'string', 'example' => '{}', ], 'UserInfo' => [ 'title' => '代理的用户信息。', 'description' => '代理的用户信息。', 'type' => 'object', 'properties' => [ 'Id' => [ 'title' => '用户ID。', 'description' => '用户ID。', 'type' => 'string', 'example' => '456******', ], 'Type' => [ 'title' => '用户类型。可选值包括:customer-主账号;sub-子账号;AssumedRoleUser-RAM角色', 'description' => '用户类型。可选值包括:'."\n" .'* customer - 主账号'."\n" .'* sub - 子账号'."\n" .'* AssumedRoleUser - RAM角色', 'type' => 'string', 'example' => 'S', ], 'AccessKeyId' => [ 'title' => '访问密钥ID。', 'description' => '访问密钥ID。', 'type' => 'string', 'example' => 'LT********', ], 'SecurityToken' => [ 'title' => '安全令牌', 'description' => '安全令牌', 'type' => 'string', 'example' => '********', ], ], ], ], ], ], ], ], ], ], ], 'DemoCategory' => [ 'title' => '样例目录', 'description' => '样例目录。', 'type' => 'object', 'properties' => [ 'SubCategories' => [ 'title' => '目录列表', 'description' => '目录列表', 'type' => 'array', 'items' => [ '$ref' => '#/components/schemas/DemoCategory', ], ], 'CategoryName' => [ 'title' => '目录名', 'description' => '目录名', 'type' => 'string', 'example' => 'SDK Usage', ], 'CategoryCode' => [ 'title' => '目录码', 'description' => '目录码', 'type' => 'string', 'example' => 'sdk', ], 'Order' => [ 'title' => '序号', 'description' => '序号', 'type' => 'integer', 'format' => 'int64', 'example' => '12', ], ], ], 'DynamicMount' => [ 'title' => 'Dynamic Mount Config', 'description' => '动态挂载配置', 'type' => 'object', 'properties' => [ 'Enable' => [ 'title' => 'Is dynamic mount enabled.', 'description' => '是否开启动态挂载的能力。', 'type' => 'boolean', 'example' => 'true', ], 'MountPoints' => [ 'title' => 'Mount points of dynaimc config.', 'description' => '动态挂载点列表。', 'type' => 'array', 'items' => [ 'description' => '动态挂载点。', '$ref' => '#/components/schemas/DynamicMountPoint', ], ], ], ], 'DynamicMountPoint' => [ 'title' => 'Dynamic Mount Point', 'description' => '动态挂载点配置。', 'type' => 'object', 'properties' => [ 'RootPath' => [ 'title' => '动态挂载点的根路径', 'description' => '动态挂载点的根路径,动态挂载数据集的挂载路径必须是根路径的子路径,根路径默认是/mnt/dynamic/。'."\n" ."\n" .'可以配置多个动态挂载根路径,但是根路径不能是另外一个根路径的子路径。', 'type' => 'string', 'required' => true, 'example' => '/mnt/dynamic/', ], 'Options' => [ 'title' => '挂载点配置', 'description' => '挂载点配置。', 'type' => 'string', 'example' => '{}', ], ], ], 'ForwardInfo' => [ 'title' => 'DSW实例端口透出信息', 'description' => 'DSW实例端口透出配置。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'title' => '是否开启端口映射', 'description' => '是否开启端口映射', 'type' => 'boolean', 'example' => 'true', ], 'ContainerName' => [ 'title' => '目标容器名字', 'description' => '目标容器名字', 'type' => 'string', 'example' => 'dsw-notebook', ], 'ForwardPort' => [ 'title' => '内部端口', 'description' => '内部端口', 'type' => 'string', 'example' => '22', ], 'NatGatewayId' => [ 'title' => '网关ID', 'description' => '网关ID', 'type' => 'string', 'example' => 'ngw-bp1uewa15k4iy5770****', ], 'EipAllocationId' => [ 'title' => '公网EIP ID', 'description' => '公网EIP ID', 'type' => 'string', 'example' => 'eip-25877c70gddh****', ], 'SSHPublicKey' => [ 'title' => 'SSH公钥', 'description' => 'SSH公钥', 'type' => 'string', 'example' => 'ssh-rsa AAAAB3****************************', ], 'Name' => [ 'title' => '转发配置名称', 'description' => '转发配置名称', 'type' => 'string', 'example' => 'ssh', ], 'ExternalPort' => [ 'title' => '公网端口', 'description' => '公网端口', 'type' => 'string', 'example' => '10086', ], 'AccessType' => [ 'title' => '访问类型', 'description' => '访问类型', 'type' => 'array', 'items' => [ 'description' => '访问类型。'."\n" ."\n" .'- intranet:内网'."\n" .'- internet:公网', 'type' => 'string', 'example' => 'intranet', ], ], ], ], 'ForwardInfoResponse' => [ 'title' => 'DSW实例端口透出结果', 'description' => 'DSW实例端口透出结果。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'title' => '是否开启端口映射', 'description' => '是否开启端口映射', 'type' => 'boolean', 'example' => 'true', ], 'ContainerName' => [ 'title' => '目标容器名字', 'description' => '目标容器名字', 'type' => 'string', 'example' => 'dsw-notebook', ], 'ForwardPort' => [ 'title' => '内部端口', 'description' => '内部端口', 'type' => 'string', 'example' => '22', ], 'NatGatewayId' => [ 'title' => '网关ID', 'description' => '网关ID', 'type' => 'string', 'example' => 'ngw-bp1uewa15k4iy5770****', ], 'EipAllocationId' => [ 'title' => '公网EIP ID', 'description' => '公网EIP ID', 'type' => 'string', 'example' => 'eip-25877c70gddh****', ], 'SSHPublicKey' => [ 'title' => 'SSH公钥', 'description' => 'SSH公钥', 'type' => 'string', 'example' => 'ssh-rsa AAAAB3****************************'."\n", ], 'ConnectInfo' => [ 'title' => '链接信息', 'description' => '链接信息', 'type' => 'object', 'properties' => [ 'Phase' => [ 'title' => '链接状态', 'description' => '链接状态', 'type' => 'string', 'example' => 'Ready', ], 'Message' => [ 'title' => '链接状态信息', 'description' => '链接状态信息', 'type' => 'string', 'example' => 'DNAT and privateZone are both ready.', ], 'Intranet' => [ 'title' => '内网链接信息', 'description' => '内网链接信息', 'type' => 'object', 'properties' => [ 'Endpoint' => [ 'title' => '链接地址', 'description' => '链接地址', 'type' => 'string', 'example' => 'dsw-notebook-22-urz3u6cnu0uts7ej9r.dsw-5cc6083084818f60.dsw.pai.alibaba.com', ], 'Port' => [ 'title' => '链接端口', 'description' => '链接端口', 'type' => 'string', 'example' => '22', ], ], ], 'Internet' => [ 'title' => '外网链接信息', 'description' => '外网链接信息', 'type' => 'object', 'properties' => [ 'Endpoint' => [ 'title' => '链接地址', 'description' => '链接地址', 'type' => 'string', 'example' => '47.111.119.114', ], 'Port' => [ 'title' => '链接端口', 'description' => '链接端口', 'type' => 'string', 'example' => '22', ], ], ], ], ], 'Name' => [ 'title' => '转发配置名称', 'description' => '转发配置名称', 'type' => 'string', 'example' => 'ssh', ], 'ExternalPort' => [ 'title' => '公网端口', 'description' => '公网端口', 'type' => 'string', 'example' => '1024', ], 'AccessType' => [ 'title' => '访问类型', 'description' => '访问类型', 'type' => 'array', 'items' => [ 'description' => '访问类型'."\n" ."\n" .'- intranet:内网'."\n" .'- internet:公网', 'type' => 'string', 'example' => 'intranet', ], ], ], ], 'PodIp' => [ 'type' => 'object', 'properties' => [ 'Type' => [ 'type' => 'string', ], 'Ip' => [ 'type' => 'string', ], 'InterfaceName' => [ 'type' => 'string', ], ], ], 'ServiceConfig' => [ 'title' => 'A short description of struct', 'description' => '服务配置', 'type' => 'object', 'properties' => [ 'JupyterServerPassword' => [ 'title' => 'jupyter密码', 'type' => 'string', ], 'JupyterServerAuth' => [ 'title' => 'jupyter鉴权方式', 'type' => 'string', ], 'CodeServerPassword' => [ 'title' => 'webide密码', 'type' => 'string', ], 'CodeServerAuth' => [ 'title' => 'webide鉴权方式', 'type' => 'string', ], ], ], ], ], 'apis' => [ 'CreateInstance' => [ 'summary' => '调用CreateInstance创建一个DSW实例。', 'path' => '/api/v2/instances', 'methods' => [ 'post', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'paid', 'abilityTreeCode' => '118631', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'title' => '实例属性', 'description' => '实例属性。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'title' => '工作空间Id', 'description' => '工作空间ID。如何获取工作空间ID,请参见[ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => false, 'example' => '40823', ], 'InstanceName' => [ 'title' => '实例名称', 'description' => '实例名称。格式要求:'."\n" .'- 只能包含英文字母、数字和下划线(_)。'."\n" .'- 不能超过27个字符。', 'type' => 'string', 'required' => false, 'example' => 'training_data', ], 'EcsSpec' => [ 'title' => '实例对应的Ecs规格', 'description' => '实例对应的ECS规格。如何获取ECS规格,请参见[ListEcsSpecs](~~470423~~)。', 'type' => 'string', 'required' => false, 'example' => 'ecs.c6.large', ], 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。如何获取镜像ID,请参见[ListImages](~~449118~~)。', 'type' => 'string', 'required' => false, 'example' => 'image-05cefd0be2exxxx', ], 'ImageUrl' => [ 'title' => '镜像地址', 'description' => '镜像地址。如何获取镜像地址,请参见[ListImages](~~449118~~)。', 'type' => 'string', 'required' => false, 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'Datasets' => [ 'title' => '数据集集合', 'description' => '数据集列表。', 'type' => 'array', 'items' => [ 'description' => '数据集。', 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集Id', 'description' => '数据集ID,当数据集为只读时,无法通过MountAccess将数据集改为读写。'."\n" ."\n" .'如何获取数据集ID,请参见[ListDatasets](~~457222~~),指定数据集ID时不能指定Uri。', 'type' => 'string', 'required' => false, 'example' => 'd-vsqjvs****rp5l206u', ], 'DatasetVersion' => [ 'title' => '数据集版本,不填默认为v1', 'description' => '数据集版本,需同时指定DatasetId,不填默认为v1。', 'type' => 'string', 'required' => false, 'example' => 'v1', ], 'Uri' => [ 'title' => '数据Uri,支持oss、nas、cpfs。', 'description' => '存储服务目录的Uri,实现直接挂载,该字段与DatasetId互斥。'."\n" ."\n" .'不同类型存储的Uri格式详见:'."\n" .'* OSS: oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/'."\n" .'* NAS: nas://29**d-b12****446.cn-hangzhou.nas.aliyuncs.com/data/path/'."\n" .'* 极速NAS: nas://29****123-y**r.cn-hangzhou.extreme.nas.aliyuncs.com/data/path/'."\n" .'* CPFS: cpfs://cpfs-213***\\*87.cn-wulanchabu/ptc-292****\\*cbb/exp-290*******\\*03e/data/path/'."\n" .'* 智算CPFS: bmcpfs://cpfs-290*****\\*foflh-vpc-x****8r.cn-wulanchabu.cpfs.aliyuncs.com/data/path/', 'type' => 'string', 'required' => false, 'example' => 'oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/', ], 'MountPath' => [ 'title' => '容器内挂载路径', 'description' => '数据集的挂载路径。', 'type' => 'string', 'required' => false, 'example' => '/mnt/data', ], 'MountAccess' => [ 'title' => '读写权限,RW:读写,RO:只读。', 'description' => '数据集挂载后的读写权限,假如数据集是只读,无法修改为读写。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'RW' => '读写', 'RO' => '只读', ], 'example' => 'RW', 'enum' => [ 'RW', 'RO', ], ], 'Options' => [ 'title' => '数据挂载Options', 'description' => '自定义挂载属性,目前仅支持OSS,使用时不能同时指定OptionType,详见:[DSW挂载配置](~~441724~~)。', 'type' => 'string', 'required' => false, 'example' => '{'."\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" .'}'."\n", ], 'OptionType' => [ 'description' => '挂载类型,使用时不能同时指定Options,目前已废弃,不建议使用,建议使用Options参数。', 'type' => 'string', 'deprecated' => true, 'required' => false, 'example' => 'ReadOnly', ], 'Dynamic' => [ 'description' => '是否开启动态挂载,默认为false。'."\n" .'- 目前只支持通用计算资源的实例。'."\n" .'- 目前只支持OSS数据集,挂载后的数据集是只读模式。'."\n" .'- 动态挂载数据集的MountPath必须是动态挂载根路径(默认为/mnt/dynamic/)的子路径(例如/mnt/dynamic/data1/)。'."\n" .'- 动态挂载数据集必须位于非动态挂载数据集的后面。', 'type' => 'boolean', 'required' => false, 'example' => 'true', ], ], 'required' => false, ], 'required' => false, ], 'UserVpc' => [ 'title' => 'user vpc配置', 'description' => 'User VPC配置。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'Vpc Id', 'description' => 'VPC ID。', 'type' => 'string', 'required' => false, 'example' => 'vpc-xxxxx', ], 'VSwitchId' => [ 'title' => 'VSwitch Id', 'description' => '交换机ID。', 'type' => 'string', 'required' => false, 'example' => 'vsw-xxxxx', ], 'SecurityGroupId' => [ 'title' => 'Security Group Id', 'description' => '安全组ID。', 'type' => 'string', 'required' => false, 'example' => 'sg-xxxxxx', ], 'ExtendedCIDRs' => [ 'description' => '扩展网段。'."\n" .'- 当交换机ID为空时,此参数可以不提供,系统会自动获取VPC下的所有网段;'."\n" .'- 当交换机ID不为空时,此参数必须提供,建议填写VPC下的所有网段。', 'type' => 'array', 'items' => [ 'description' => '扩展网段。', 'type' => 'string', 'required' => false, 'example' => '"172.16.19.0/24","172.16.2.0/24","172.16.12.0/24"', ], 'required' => false, 'example' => '["192.168.0.1/24", "192.168.1.1/24"]', ], 'DefaultRoute' => [ 'title' => 'Default Route', 'description' => '默认路由。取值如下:'."\n" ."\n" .'- eth0:表示使用默认网卡,通过公共网关访问外部网络。'."\n" .'- eth1:表示使用用户弹性网卡,通过私有网关访问外部网络。具体配置方法,请参考[配置DSW实例通过专有公网网关访问公网](~~2525343~~)。', 'type' => 'string', 'required' => false, 'example' => 'eth0', ], 'ForwardInfos' => [ 'title' => 'Forward Infos', 'description' => '端口透出信息。', 'type' => 'array', 'items' => [ 'description' => '端口透出信息列表,可配置映射端口、网关ID、SSH 公钥等参数。', 'required' => false, '$ref' => '#/components/schemas/ForwardInfo', ], 'required' => false, ], 'BandwidthLimit' => [ 'required' => false, '$ref' => '#/components/schemas/BandwidthLimit', ], ], 'required' => false, ], 'Accessibility' => [ 'title' => '工作空间内是否他人可见', 'description' => '实例的可见性。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'PUBLIC' => '工作空间所有用户可见', 'PRIVATE' => '工作空间内自己及管理员可见', ], 'example' => 'PRIVATE', ], 'EnvironmentVariables' => [ 'title' => '环境变量', 'description' => '注入DSW实例的环境变量。'."\n" .'>这里传入的环境变量可能会覆盖系统预设的环境变量>', 'type' => 'object', 'required' => false, 'additionalProperties' => [ 'type' => 'string', 'description' => '用户指定环境变量,DSW实例启动后,指定环境变量会被注入到容器中。', 'example' => 'MAAS', ], 'example' => '{userName: "Chris"}', ], 'ResourceId' => [ 'title' => '资源Id,预付费时填写', 'description' => '资源组ID,预付费时配置。如何创建专有资源组,请参见[准备及管理DLC资源组集群](~~202827~~)。', 'type' => 'string', 'required' => false, 'example' => 'dsw-123456789', ], 'Priority' => [ 'title' => '优先级,在分配资源给实例时,优先级越高的实例越优先', 'description' => '优先级,在分配资源给实例时,优先级越高的实例越优先。取值范围为1~9。'."\n" .'- 1为最低优先级。'."\n" .'- 9为最高优先级。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', ], 'RequestedResource' => [ 'title' => '资源配置,弹内或者轻量化时使用', 'description' => '资源配置。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'title' => 'cpu核数', 'description' => 'CPU核数。', 'type' => 'string', 'required' => false, 'example' => '32', ], 'Memory' => [ 'title' => 'memory大小', 'description' => '内存大小。单位为GB。'."\n" .'>传参时请指明单位,如32GB,而不是32。'."\n" .'如果不指明单位,默认是MB。'."\n" .'>', 'type' => 'string', 'required' => false, 'example' => '32GB', ], 'SharedMemory' => [ 'title' => 'shared memory大小', 'description' => '共享内存大小。单位为GB。'."\n" .'>传参时请指明单位,如32GB,而不是32。'."\n" .'如果不指明单位,默认是MB。'."\n" .'>', 'type' => 'string', 'required' => false, 'example' => '32GB', ], 'GPU' => [ 'title' => 'gpu数量', 'description' => 'GPU数量。', 'type' => 'string', 'required' => false, 'example' => '4', ], 'GPUType' => [ 'title' => 'gpu显卡类型', 'description' => 'GPU显卡类型,取值如下:'."\n" .'- V100'."\n" .'- A100'."\n" .'- T4'."\n" .'- A10'."\n" .'- P100', 'type' => 'string', 'required' => false, 'example' => 'v100', ], ], 'required' => false, 'example' => '{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"}', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => '用户自定义标签。', 'type' => 'array', 'items' => [ 'description' => '用户定义标签。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '用户定义标签键', 'description' => '用户定义标签键。', 'type' => 'string', 'required' => false, 'example' => 'stsTokenOwner', ], 'Value' => [ 'title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'required' => false, 'example' => '123xxxxxxxx', ], ], 'required' => false, ], 'required' => false, 'example' => '{\'foo\': \'bar\'}', ], 'CloudDisks' => [ 'title' => '云盘列表', 'description' => '云盘列表。', 'type' => 'array', 'items' => [ 'description' => '云盘列表。', 'type' => 'object', 'properties' => [ 'Capacity' => [ 'title' => '云盘容量', 'description' => '当**资源类型**选择**公共资源**,或当**资源配额**选择预付费通用计算资源(CPU核数≥2且内存≥4G,或配置GPU)时:'."\n" ."\n\n" .'每个实例会赠送100 GiB免费系统盘额度,用于持久化存储。**如果实例停机超过15天,云盘的内容将被清空**。云盘支持扩容,具体扩容价格以控制台界面为准。'."\n" ."\n" .'>'."\n" ."\n" .'- 扩容后不支持缩容,请按需操作扩容。'."\n" ."\n" .'- 扩容后整块系统盘(免费+付费),不再受到停机15天释放的限制,但会持续产生费用。'."\n" ."\n" .'- 实例删除,系统盘同步释放,删除前请确保必要数据备份。'."\n" ."\n" .'>'."\n" ."\n" .'如果您需要永久性存储,可以配置**数据集挂载**,或在**存储路径挂载**中添加OSS、NAS、CPFS路径。', 'type' => 'string', 'required' => false, 'example' => '100Gi', ], 'SubType' => [ 'title' => '云盘使用方式, rootfs 挂载为rootfs', 'description' => '云盘类型:'."\n" .'* rootfs:将挂载为系统盘,系统环境存储在磁盘上。', 'type' => 'string', 'required' => false, 'example' => 'rootfs', ], 'MountPath' => [ 'title' => '容器内挂载云盘路径', 'description' => '云盘的挂载路径。', 'type' => 'string', 'required' => false, 'example' => '/mnt/systemDisk', ], 'Path' => [ 'title' => '云盘内被挂载目录路径', 'description' => '挂载到实例的云盘子路径。', 'type' => 'string', 'required' => false, 'example' => 'workspace', ], 'Status' => [ 'title' => '云盘状态', 'description' => '云盘或者快照使用情况。', 'type' => 'object', 'properties' => [ 'Available' => [ 'description' => '可使用量,单位 Byte。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '31841058816', ], 'Usage' => [ 'description' => '已使用量,单位 Byte。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '371195904', ], 'Capacity' => [ 'description' => '容量,单位 Byte。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '32212254720', ], ], 'required' => false, ], ], 'required' => false, ], 'required' => false, 'example' => '[]', ], 'WorkspaceSource' => [ 'title' => '工作空间指向的存储,如果不指定,则依次使用NAS,CloudDisk或者本地磁盘', 'description' => '指定工作目录对应的存储,支持将云盘或Datasets中的数据集同时挂载到/mnt/workspace工作目录,不支持OSS数据集和动态挂载的数据集。'."\n" ."\n" .'目前可以填写:'."\n" .'* rootfsCloudDisk: 将云盘挂载到工作目录。'."\n" .'* 数据集的挂载路径:Datasets中数据集的MountPath,如/mnt/data,uri格式的数据集只支持通过该方式指定。'."\n" .'* 数据集的id,如d-vsqjvs****rp5l206u,假如同一个数据集挂载到多个路径,会选择第一个,不建议使用该方式,建议使用挂载路径。'."\n" ."\n" .'假如为空:'."\n" .'* 假如实例使用了云盘,会默认选择云盘。'."\n" .'* 假如没有云盘,会选择第一个nas或cpfs数据集作为工作目录。'."\n" .'* 假如没有云盘,且没有nas或cpfs工作目录,会使用宿主机空间。', 'type' => 'string', 'required' => false, 'example' => 'rootfsCloudDisk', ], 'UserId' => [ 'title' => '实例的使用者,可能是子账号或者主账号', 'description' => '实例所有者的账号ID。支持阿里云账号或RAM用户。', 'type' => 'string', 'required' => false, 'example' => '161228528250****', ], 'Driver' => [ 'title' => 'Driver for accelerator', 'description' => 'NVIDIA驱动配置。', 'type' => 'string', 'required' => false, 'example' => '535.54.03', ], 'CredentialConfig' => [ 'description' => '凭据配置。', 'required' => false, '$ref' => '#/components/schemas/CredentialConfig', ], 'Affinity' => [ 'description' => '亲和性配置信息。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'description' => 'CPU亲和性配置信息。仅支持通用计算预付费实例。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'description' => '是否开启CPU亲和性。'."\n" ."\n" .'* false:不开启。'."\n" .'* true:开启。', 'type' => 'boolean', 'required' => false, 'example' => 'true', ], ], 'required' => false, ], ], 'required' => false, ], 'ImageAuth' => [ 'title' => "\0".'用户私有镜像的账号密码信息,如果镜像地址是公共镜像或者归属当前账号的 ACR 镜像,则不需要填写。生成方法: ${username}:${password} base64编码后的值。', 'description' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'type' => 'string', 'required' => false, 'example' => '****', ], 'DynamicMount' => [ 'description' => '动态挂载配置。', 'required' => false, '$ref' => '#/components/schemas/DynamicMount', ], 'Tag' => [ 'description' => 'Tag列表。', 'type' => 'array', 'items' => [ 'description' => 'Tag。', 'type' => 'object', 'properties' => [ 'Key' => [ 'description' => 'Tag的key。', 'type' => 'string', 'required' => false, 'example' => 'tag1', ], 'Value' => [ 'description' => 'Tag的Value。', 'type' => 'string', 'required' => false, 'example' => 'value1', ], ], 'required' => false, ], 'required' => false, ], 'UserCommand' => [ 'description' => '用户自定义的执行命令。', 'type' => 'object', 'properties' => [ 'OnStart' => [ 'description' => '在每次实例启动时都会执行的自定义命令,执行时机是实例环境初始化之后,jupyter-lab、code-server等服务启动之前。', 'type' => 'object', 'properties' => [ 'Content' => [ 'description' => '具体的自定义启动命令内容。', 'type' => 'string', 'required' => false, ], ], 'required' => false, ], ], 'required' => false, ], 'OversoldType' => [ 'title' => '闲时资源的类型:'."\n" .'ForceQuotaOverSold:只使用闲时资源'."\n" .'AcceptQuotaOverSold:可接受闲时资源'."\n" .'ForbiddenQuotaOverSold:使用保障资源', 'description' => '闲时资源的类型:'."\n" .'ForceQuotaOverSold:只使用闲时资源'."\n" .'AcceptQuotaOverSold:可接受闲时资源'."\n" .'ForbiddenQuotaOverSold:使用保障资源', 'type' => 'string', 'required' => false, ], 'AssignNodeSpec' => [ 'title' => '指定节点调度配置', 'description' => '指定节点调度配置', 'type' => 'object', 'properties' => [ 'NodeNames' => [ 'title' => '指定调度的节点:"node-a,node-b"', 'description' => '指定调度的节点:"node-a,node-b"', 'type' => 'string', 'required' => false, 'example' => 'node-a', ], 'AntiAffinityNodeNames' => [ 'title' => '排除调度的节点:"node-a,node-b"', 'description' => '排除调度的节点:"node-a,node-b"', 'type' => 'string', 'required' => false, 'example' => 'node-b', ], ], 'required' => false, ], 'SpotSpec' => [ 'title' => '抢占实例配置', 'description' => '抢占实例配置', 'type' => 'object', 'properties' => [ 'SpotStrategy' => [ 'title' => '抢占策略:'."\n" .'SpotWithPriceLimit:自定义设置抢占实例价格上限。'."\n" .'SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。', 'description' => '抢占策略:'."\n" .'SpotWithPriceLimit:自定义设置抢占实例价格上限。'."\n" .'SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。', 'type' => 'string', 'required' => false, 'example' => 'SpotWithPriceLimit', ], 'SpotPriceLimit' => [ 'title' => '抢占式实例的每小时价格上限,最多支持精确到小数点后三位,抢占策略是SpotWithPriceLimit的时候必填', 'description' => '抢占式实例的每小时价格上限,最多支持精确到小数点后三位,抢占策略是SpotWithPriceLimit的时候必填', 'type' => 'string', 'required' => false, 'example' => '0.12', ], 'SpotDuration' => [ 'title' => '抢占式实例的保护期。默认为1,可设置为0,表示无保护期。灵骏规格无效。', 'description' => '抢占式实例的保护期。默认为1,可设置为0,表示无保护期。灵骏规格无效。', 'type' => 'string', 'required' => false, 'example' => '0', ], 'SpotDiscountLimit' => [ 'title' => '抢占式实例的每小时折扣上限,灵骏规格必填。', 'description' => '抢占式实例的每小时折扣上限,灵骏规格必填。', 'type' => 'string', 'required' => false, 'example' => '0.1', ], ], 'required' => false, ], 'MigrationOptions' => [ 'title' => '实例迁移选项,只支持启用了持久化存储的灵骏实例设置此参数。当前支持:'."\n" .'● EnableProcessesPreservation :是否保留实例运行中的进程。可选值:true , false。启用此能力,需要实例预留进程迁移需要的存储空间。', 'type' => 'object', 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404'."\n" .'- 200', 'type' => 'integer', 'format' => 'int32', 'example' => '200', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 200,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '创建实例', ], 'DeleteInstance' => [ 'summary' => '删除指定DSW实例。', 'path' => '/api/v2/instances/{InstanceId}', 'methods' => [ 'delete', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'abilityTreeCode' => '118633', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'ValidationError', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404'."\n" .'- 200', 'type' => 'integer', 'format' => 'int32', 'example' => '200', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"ValidationError\\",\\n \\"HttpStatusCode\\": 200,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '删除实例', ], 'UpdateInstance' => [ 'summary' => '更新DSW实例的属性。', 'path' => '/api/v2/instances/{InstanceId}', 'methods' => [ 'put', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'paid', 'abilityTreeCode' => '118636', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'title' => '需要更新的实例属性', 'description' => '需要更新的实例属性。', 'type' => 'object', 'properties' => [ 'InstanceName' => [ 'title' => '实例名称', 'description' => '实例名称。格式要求:'."\n" .'- 只能包含英文字母、数字和下划线(_)。'."\n" .'- 不能超过27个字符。', 'type' => 'string', 'required' => false, 'example' => 'training_data', ], 'EcsSpec' => [ 'title' => '实例对应的Ecs规格', 'description' => '实例对应的ECS规格。如何获取ECS规格,请参见[ListEcsSpecs](~~470423~~)。', 'type' => 'string', 'required' => false, 'example' => 'ecs.c6.large', ], 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。如何获取镜像ID,请参见[ListImages](~~449118~~)。', 'type' => 'string', 'required' => false, 'example' => 'image-05cefd0be2exxxx', ], 'ImageUrl' => [ 'title' => '镜像地址', 'description' => '镜像地址。如何获取镜像地址,请参见[ListImages](~~449118~~)。', 'type' => 'string', 'required' => false, 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'UserVpc' => [ 'title' => 'user vpc配置', 'description' => 'User VPC配置。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'Vpc Id', 'description' => 'VPC ID。', 'type' => 'string', 'required' => false, 'example' => 'vpc-xxxxx', ], 'VSwitchId' => [ 'title' => 'VSwitch Id', 'description' => '交换机ID。', 'type' => 'string', 'required' => false, 'example' => 'vsw-xxxxx', ], 'SecurityGroupId' => [ 'title' => 'Security Group Id', 'description' => '安全组ID。', 'type' => 'string', 'required' => false, 'example' => 'sg-xxxxxx', ], 'ExtendedCIDRs' => [ 'description' => '扩展网段。'."\n" .'- 当交换机ID为空时,此参数可以不提供,系统会自动获取VPC下的所有网段;'."\n" .'- 当交换机ID不为空时,此参数必须提供,建议填写VPC下的所有网段。', 'type' => 'array', 'items' => [ 'description' => '扩展网段。', 'type' => 'string', 'required' => false, 'example' => '"172.16.19.0/24","172.16.2.0/24","172.16.12.0/24"', ], 'required' => false, 'example' => '["192.168.0.1/24", "192.168.1.1/24"]', ], 'DefaultRoute' => [ 'title' => 'Default Route', 'description' => '默认路由。取值如下:'."\n" .'- eth0:表示使用默认网卡,通过公共网关访问外部网络。'."\n" .'- eth1:表示使用用户弹性网卡,通过私有网关访问外部网络。', 'type' => 'string', 'required' => false, 'example' => 'eth0', ], 'ForwardInfos' => [ 'title' => 'Forward Infos', 'description' => '实例端口映射配置。', 'type' => 'array', 'items' => [ 'description' => 'ForwardInfo。', 'required' => false, '$ref' => '#/components/schemas/ForwardInfo', ], 'required' => false, ], 'BandwidthLimit' => [ 'required' => false, '$ref' => '#/components/schemas/BandwidthLimit', ], ], 'required' => false, ], 'Accessibility' => [ 'title' => '工作空间内是否他人可见', 'description' => '实例的可见性。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'PUBLIC' => '工作空间所有用户可见', 'PRIVATE' => '工作空间内自己及管理员可见', ], 'example' => 'PRIVATE', ], 'Datasets' => [ 'title' => '数据集集合', 'description' => '数据集列表。', 'type' => 'array', 'items' => [ 'description' => '数据集对象。', 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集Id', 'description' => '数据集ID,当数据集为只读时,无法通过MountAccess将数据集改为读写。'."\n" ."\n" .'如何获取数据集ID,请参见[ListDatasets](~~457222~~),指定数据集ID时不能指定Uri。', 'type' => 'string', 'required' => false, 'example' => 'd-vsqjvs****rp5l206u', ], 'DatasetVersion' => [ 'title' => '数据集版本,默认为v1', 'description' => '数据集版本,需同时指定DatasetId,不填默认为v1。', 'type' => 'string', 'required' => false, 'example' => 'v1', ], 'Uri' => [ 'title' => '数据Uri,支持oss、nas、cpfs。', 'description' => '存储服务目录的Uri,实现直接挂载,该字段与DatasetId互斥。'."\n" ."\n" .'不同类型存储的Uri格式详见:'."\n" .'* OSS: oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/'."\n" .'* NAS: nas://29**d-b12****446.cn-hangzhou.nas.aliyuncs.com/data/path/'."\n" .'* 极速NAS: nas://29****123-y**r.cn-hangzhou.extreme.nas.aliyuncs.com/data/path/'."\n" .'* CPFS: cpfs://cpfs-213***\\*87.cn-wulanchabu/ptc-292****\\*cbb/exp-290*******\\*03e/data/path/'."\n" .'* 智算CPFS: bmcpfs://cpfs-290*****\\*foflh-vpc-x****8r.cn-wulanchabu.cpfs.aliyuncs.com/data/path/', 'type' => 'string', 'required' => false, 'example' => 'oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/', ], 'MountPath' => [ 'title' => '容器内挂载路径', 'description' => '数据集的挂载路径。', 'type' => 'string', 'required' => false, 'example' => '/mnt/data', ], 'MountAccess' => [ 'title' => '读写权限,RW:读写,RO:只读。', 'description' => '数据集挂载后的读写权限,假如数据集是只读,无法修改为读写。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'RW' => '读写', 'RO' => '只读', ], 'example' => 'RW', 'enum' => [ 'RW', 'RO', ], ], 'Options' => [ 'title' => '数据挂载配置项', 'description' => '自定义数据集挂载属性,目前仅支持OSS,使用时不能同时指定OptionType,详见:[DSW挂载配置](~~441724~~)。', 'type' => 'string', 'required' => false, 'example' => '{'."\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' => [ 'description' => '挂载类型,使用时不能同时指定Options,目前已废弃,不建议使用,建议使用Options参数。', 'type' => 'string', 'deprecated' => true, 'required' => false, 'example' => 'ReadOnly', ], 'Dynamic' => [ 'description' => '是否开启动态挂载,默认为false。'."\n" .'- 目前只支持通用计算资源的实例。'."\n" .'- 目前只支持OSS数据集,挂载后的数据集是只读模式。'."\n" .'- 动态挂载数据集的MountPath必须是动态挂载根路径(默认为/mnt/dynamic/)的子路径(例如/mnt/dynamic/data1/)。'."\n" .'- 动态挂载数据集必须位于非动态挂载数据集的后面。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], ], 'required' => false, ], 'required' => false, ], 'DisassociateDatasets' => [ 'title' => '是否删除关联数据集', 'description' => '是否删除关联数据集。'."\n" .'- true:删除关联数据集。'."\n" .'- false:保留关联数据集。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'DisassociateVpc' => [ 'title' => '是否删除关联用户vpc', 'description' => '是否删除关联用户VPC。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'DisassociateForwardInfos' => [ 'title' => '是否删除关联端口透出信息', 'description' => '是否删除关联端口透出信息', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'RequestedResource' => [ 'title' => '资源配置,弹内或者轻量化时使用', 'description' => '资源配置。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'title' => 'cpu核数', 'description' => 'CPU核数。', 'type' => 'string', 'required' => false, 'example' => '32', ], 'Memory' => [ 'title' => 'memory大小', 'description' => '内存大小,单位为GB。', 'type' => 'string', 'required' => false, 'example' => '32', ], 'SharedMemory' => [ 'title' => 'shared memory大小', 'description' => '共享内存大小,单位为GB。', 'type' => 'string', 'required' => false, 'example' => '32', ], 'GPU' => [ 'title' => 'gpu数量', 'description' => 'GPU数量。', 'type' => 'string', 'required' => false, 'example' => '4', ], 'GPUType' => [ 'title' => 'gpu显卡类型', 'description' => 'GPU显卡类型。', 'type' => 'string', 'required' => false, 'example' => 'v100', ], ], 'required' => false, 'example' => '{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"}', ], 'WorkspaceSource' => [ 'title' => '工作空间指向的存储,如果不指定,则依次使用NAS,CloudDisk或者本地磁盘', 'description' => '指定工作目录对应的存储,支持将云盘或Datasets中的数据集同时挂载到/mnt/workspace工作目录,不支持oss数据集和动态挂载的数据集。'."\n" ."\n" .'目前可以填写:'."\n" .'* rootfsCloudDisk: 将云盘挂载到工作目录。'."\n" .'* 数据集的挂载路径:Datasets中数据集的MountPath,如/mnt/data,uri格式的数据集只支持通过该方式指定。'."\n" .'* 数据集的id,如d-vsqjvs****rp5l206u,假如同一个数据集挂载到多个路径,会选择第一个,不建议使用该方式,建议使用挂载路径。'."\n" ."\n" .'假如为空:'."\n" .'* 假如实例使用了云盘,会默认选择云盘。'."\n" .'* 假如没有云盘,会选择第一个nas或cpfs数据集作为工作目录。'."\n" .'* 假如没有云盘,且没有nas或cpfs工作目录,会使用宿主机空间。', 'type' => 'string', 'required' => false, 'example' => '/mnt/data', ], 'UserId' => [ 'title' => '实例的使用者,可能是子账号或者主账号', 'description' => '实例的使用者id。', 'type' => 'string', 'required' => false, 'example' => '16122**********', ], 'CloudDisks' => [ 'title' => '云盘列表', 'description' => '云盘列表。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Capacity' => [ 'title' => '云盘容量', 'description' => '当**资源类型**选择**公共资源**,或当**资源配额**选择预付费通用计算资源(CPU核数≥2且内存≥4G,或配置GPU)时:'."\n" ."\n\n" .'每个实例会赠送100 GiB免费系统盘额度,用于持久化存储。**如果实例停机超过15天,云盘的内容将被清空**。云盘支持扩容,具体扩容价格以控制台界面为准。'."\n" ."\n" .'>'."\n" ."\n" .'- 扩容后不支持缩容,请按需操作扩容。'."\n" ."\n" .'- 扩容后整块系统盘(免费+付费),不再受到停机15天释放的限制,但会持续产生费用。'."\n" ."\n" .'- 实例删除,系统盘同步释放,删除前请确保必要数据备份。'."\n" ."\n" .'>'."\n" ."\n" .'如果您需要永久性存储,可以配置**数据集挂载**,或在**存储路径挂载**中添加OSS、NAS、CPFS路径。', 'type' => 'string', 'required' => false, 'example' => '100Gi', ], 'SubType' => [ 'title' => '云盘类型, rootfs 挂载为rootfs', 'description' => '云盘类型:'."\n" .'* rootfs:将挂载为系统盘,系统环境存储在磁盘上。', 'type' => 'string', 'required' => false, 'example' => 'rootfs', ], ], 'required' => false, ], 'required' => false, 'example' => '[]', ], 'Priority' => [ 'title' => '实例排队优先级', 'description' => '优先级,在分配资源给实例时,优先级越高的实例越优先。取值范围为1~9。'."\n" ."\n" .'* 1为最低优先级。'."\n" .'* 9为最高优先级。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', ], 'Driver' => [ 'title' => 'Driver for accelerator', 'description' => 'NVIDIA 驱动配置。', 'type' => 'string', 'required' => false, 'example' => '535.54.03', ], 'DisassociateDriver' => [ 'title' => '是否删除关联端口透出信息', 'description' => '是否删除 NVIDIA 驱动配置。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'CredentialConfig' => [ 'title' => 'credential注入配置。', 'description' => '凭据配置。', 'required' => false, '$ref' => '#/components/schemas/CredentialConfig', ], 'DisassociateCredential' => [ 'title' => '是否删除credential注入信息。', 'description' => '是否删除credential注入信息。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'Affinity' => [ 'description' => '亲和性配置。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'description' => 'CPU亲和性配置,仅支持通用计算预付费实例。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'description' => '是否开启CPU亲和性。'."\n" ."\n" .'* true:开启。'."\n" .'* false:不开启。', 'type' => 'boolean', 'required' => false, 'example' => 'true', ], ], 'required' => false, ], ], 'required' => false, ], 'ImageAuth' => [ 'title' => '用户私有镜像的账号密码信息,如果镜像地址是公共镜像或者归属当前账号的 ACR 镜像,则不需要填写。生成方法: ${username}:${password} base64编码后的值。', 'description' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'type' => 'string', 'required' => false, 'example' => '****', ], 'DynamicMount' => [ 'description' => '动态挂载配置。', 'required' => false, '$ref' => '#/components/schemas/DynamicMount', ], 'EnvironmentVariables' => [ 'description' => '注入DSW实例的环境变量。'."\n" ."\n" .'>这里传入的环境变量可能会覆盖系统预设的环境变量>', 'type' => 'object', 'required' => false, 'example' => '{'."\n" .'"ENABLE_TRAIN": "true",'."\n" .'"ENABLE_DEBUG":"false",'."\n" .'"INSTANCE_ENV":"prod"'."\n" .'}', ], 'DisassociateEnvironmentVariables' => [ 'description' => '删除用户传入的环境变量。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'UserCommand' => [ 'description' => '用户自定义的执行命令。', 'type' => 'object', 'properties' => [ 'OnStart' => [ 'description' => '在每次实例启动时都会执行的自定义命令,执行时机是实例环境初始化之后,jupyter-lab、code-server等服务启动之前。', 'type' => 'object', 'properties' => [ 'Content' => [ 'description' => '具体的自定义启动命令内容。', 'type' => 'string', 'required' => false, 'example' => 'apt update && echo initialized', ], ], 'required' => false, ], ], 'required' => false, ], 'DisassociateUserCommand' => [ 'description' => '删除用户指定的自定义命令。', 'type' => 'boolean', 'required' => false, 'example' => 'false', ], 'OversoldType' => [ 'title' => '闲时资源的类型:'."\n" .'ForceQuotaOverSold:只使用闲时资源'."\n" .'AcceptQuotaOverSold:可接受闲时资源'."\n" .'ForbiddenQuotaOverSold:使用保障资源', 'description' => '闲时资源的类型', 'type' => 'string', 'required' => false, 'example' => 'ForceQuotaOverSold:只使用闲时资源'."\n" .'AcceptQuotaOverSold:可接受闲时资源'."\n" .'ForbiddenQuotaOverSold:使用保障资源', ], 'DisassociateSpot' => [ 'title' => '是否关闭竞价配置', 'type' => 'boolean', 'required' => false, ], 'SpotSpec' => [ 'title' => '抢占实例配置', 'type' => 'object', 'properties' => [ 'SpotStrategy' => [ 'title' => '抢占策略:'."\n" .'SpotWithPriceLimit:自定义设置抢占实例价格上限。'."\n" .'SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。', 'type' => 'string', 'required' => false, 'example' => 'SpotWithPriceLimit', ], 'SpotPriceLimit' => [ 'title' => '抢占式实例的每小时价格上限,最多支持精确到小数点后三位,抢占策略是SpotWithPriceLimit的时候必填', 'type' => 'string', 'required' => false, 'example' => '0.12', ], 'SpotDuration' => [ 'title' => '抢占式实例的保护期。默认为1,可设置为0,表示无保护期。灵骏规格无效。', 'type' => 'string', 'required' => false, 'example' => '0', ], 'SpotDiscountLimit' => [ 'title' => '抢占式实例的每小时折扣上限,灵骏规格必填。', 'type' => 'string', 'required' => false, 'example' => '0.1', ], ], 'required' => false, ], 'DisassociateAssignNode' => [ 'title' => '是否关闭指定节点调度', 'type' => 'boolean', 'required' => false, ], 'AssignNodeSpec' => [ 'title' => '指定节点调度配置', 'type' => 'object', 'properties' => [ 'NodeNames' => [ 'title' => '指定调度的节点:"node-a,node-b"', 'type' => 'string', 'required' => false, 'example' => 'node-a', ], 'AntiAffinityNodeNames' => [ 'title' => '排除调度的节点:"node-a,node-b"', 'type' => 'string', 'required' => false, 'example' => 'node-b', ], ], 'required' => false, ], 'StartInstance' => [ 'type' => 'boolean', 'required' => false, ], 'MigrationOptions' => [ 'title' => '实例迁移选项,只支持启用了持久化存储的灵骏实例设置此参数。当前支持:'."\n" .'● EnableProcessesPreservation :是否保留实例运行中的进程。可选值:true , false。启用此能力,需要实例预留进程迁移需要的存储空间。', 'type' => 'object', 'required' => false, ], 'DisassociateMigrationOptions' => [ 'title' => '是否删除迁移选项', 'type' => 'boolean', 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '更新实例', ], 'StartInstance' => [ 'summary' => '启动DSW实例。', 'path' => '/api/v2/instances/{InstanceId}/start', 'methods' => [ 'put', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', 'abilityTreeCode' => '118635', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '启动实例', ], 'StopInstance' => [ 'summary' => '调用StopInstance,停止DSW实例。', 'path' => '/api/v2/instances/{InstanceId}/stop', 'methods' => [ 'put', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', 'abilityTreeCode' => '118632', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'SaveImage', 'in' => 'query', 'schema' => [ 'title' => '是否保存环境后再关闭实例', 'description' => '是否保存环境后再关闭实例。'."\n" .'- 打开开关:保存环境后再关闭实例。'."\n" .'- 关闭开关:不保存环境数据,直接关闭实例。', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'default' => 'false', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '停止实例', ], 'GetInstance' => [ 'summary' => '查询DSW实例详情。', 'path' => '/api/v2/instances/{InstanceId}', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '118634', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'Token', 'in' => 'query', 'schema' => [ 'description' => '分享令牌信息。', 'type' => 'string', 'required' => false, 'example' => 'WUzWCMr325LV0bH2JH4C4HoDaKIU6C4S', ], ], [ 'name' => 'Fields', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '实例详情', 'description' => '实例详情。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'title' => '工作空间Id', 'description' => '工作空间ID。', 'type' => 'string', 'example' => '40823', ], 'WorkspaceName' => [ 'title' => '工作空间名称', 'description' => '工作空间名称。', 'type' => 'string', 'example' => 'training_data', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'InstanceName' => [ 'title' => '实例名称', 'description' => '实例名称。', 'type' => 'string', 'example' => 'training_data', ], 'EcsSpec' => [ 'title' => '实例对应的Ecs规格', 'description' => '实例对应的ECS规格。', 'type' => 'string', 'example' => 'ecs.c6.large', ], 'Status' => [ 'title' => '实例状态', 'description' => '实例状态。', 'type' => 'string', 'enumValueTitles' => [ 'Creating' => '创建中', 'SaveFailed' => '镜像保存失败', 'Stopped' => '已停止', 'Failed' => '失败', 'ResourceAllocating' => '资源分配中', 'Stopping' => '停止中', 'Updating' => '更新中', 'Saving' => '镜像保存中', 'Queuing' => '排队中', 'Recovering' => '实例恢复中', 'Starting' => '创建中', 'Running' => '运行中', 'Saved' => '镜像保存成功', 'Deleting' => '删除中', 'EnvPreparing' => '环境准备中', ], 'example' => 'Running', ], 'InstanceUrl' => [ 'title' => '实例Url', 'description' => '实例Url。', 'type' => 'string', 'example' => 'https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=3****#/', ], 'JupyterlabUrl' => [ 'title' => 'Jupyterlab Url', 'description' => 'Jupyterlab Url。', 'type' => 'string', 'example' => 'https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/lab/', ], 'WebIDEUrl' => [ 'title' => 'Web IDE url', 'description' => 'Web IDE Url。', 'type' => 'string', 'example' => 'https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/ide/', ], 'TerminalUrl' => [ 'title' => '终端url', 'description' => '终端Url。', 'type' => 'string', 'example' => 'https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/tty/', ], 'AccumulatedRunningTimeInMs' => [ 'title' => '累计运行时间(ms)', 'description' => '累计运行时间,单位为毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '3600000', ], 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageUrl' => [ 'title' => '镜像地址', 'description' => '镜像地址。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'ImageName' => [ 'title' => '镜像名称', 'description' => '镜像名称。', 'type' => 'string', 'example' => 'py36_cpu_tf1.12_ubuntu', ], 'GmtCreateTime' => [ 'title' => '实例创建时间', 'description' => '实例创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '实例修改时间', 'description' => '实例修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'UserId' => [ 'title' => '用户Id', 'description' => '用户ID。', 'type' => 'string', 'example' => '161228528250****', ], 'UserName' => [ 'title' => '用户名称', 'description' => '用户名称。', 'type' => 'string', 'example' => '测试用户', ], 'Datasets' => [ 'title' => '数据集集合', 'description' => '数据集集合。', 'type' => 'array', 'items' => [ 'description' => '数据集对象,数据集可以是NAS或者OSS类型。'."\n" .'数据集对象属性包括数据集ID以及容器内挂载路径。', 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集Id', 'description' => '数据集ID。', 'type' => 'string', 'example' => 'd-vsqjvsjp4orp5l****', ], 'DatasetVersion' => [ 'title' => '数据集版本', 'description' => '数据集版本。', 'type' => 'string', 'example' => 'v1', ], 'Uri' => [ 'title' => '数据Uri', 'description' => '指定的数据集Uri。', 'type' => 'string', 'example' => 'oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/', ], 'MountPath' => [ 'title' => '容器内挂载路径', 'description' => '容器内挂载路径。', 'type' => 'string', 'example' => '/mnt/data', ], 'MountAccess' => [ 'title' => '读写权限,RW:读写,RO:只读。', 'description' => '读写权限,RW:读写,RO:只读。', 'type' => 'string', 'enumValueTitles' => [ 'RW' => 'RW', 'RO' => 'RO', ], 'example' => 'RW', ], 'Options' => [ 'title' => '数据挂载的配置项', 'description' => '指定的数据集的挂载属性。', 'type' => 'string', 'example' => '{'."\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' => [ 'description' => '指定的数据集的挂载类型(已废弃)。', 'type' => 'string', 'example' => 'FastReadWrite', ], 'Dynamic' => [ 'description' => '是否开启动态挂载,默认为false。', 'type' => 'boolean', 'example' => 'false', ], 'ActualMountAccess' => [ 'title' => '实际读写权限,RW:读写,RO:只读。', 'description' => '实际读写权限,RW:读写,RO:只读。', 'type' => 'string', ], ], ], ], 'UserVpc' => [ 'title' => 'user vpc配置', 'description' => 'User VPC配置。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'Vpc Id', 'description' => 'VPC ID。', 'type' => 'string', 'example' => 'vpc-xxxxx', ], 'VSwitchId' => [ 'title' => 'VSwitch Id', 'description' => '交换机ID。', 'type' => 'string', 'example' => 'vsw-xxxxx', ], 'SecurityGroupId' => [ 'title' => 'Security Group Id', 'description' => '安全组ID。', 'type' => 'string', 'example' => 'sg-xxxxxx', ], 'ExtendedCIDRs' => [ 'description' => '扩展网段。'."\n" .'- 当交换机ID为空时,此参数可以不提供,系统会自动获取VPC下的所有网段。'."\n" .'- 当交换机ID不为空时,此参数必须提供,建议填写VPC下的所有网段。', 'type' => 'array', 'items' => [ 'description' => '扩展网段。', 'type' => 'string', 'example' => '"172.16.19.0/24","172.16.2.0/24","172.16.12.0/24"', ], 'example' => '["192.168.0.1/24", "192.168.1.1/24"]', ], 'DefaultRoute' => [ 'title' => 'Default Route', 'description' => 'Default Route', 'type' => 'string', 'example' => 'eth0 | eth1', ], 'ForwardInfos' => [ 'description' => '端口透出信息。', 'type' => 'array', 'items' => [ 'description' => '端口透出信息列表。', '$ref' => '#/components/schemas/ForwardInfoResponse', ], ], 'BandwidthLimit' => [ 'title' => '公网带宽限速配置', 'description' => '公网带宽限速配置', '$ref' => '#/components/schemas/BandwidthLimit', ], 'Ip' => [ 'title' => '用户VPC的IP地址', 'description' => '用户VPC的IP地址', 'type' => 'string', ], ], ], 'InstanceShutdownTimer' => [ 'title' => '定时关机任务', 'description' => '定时关机任务。', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'GmtCreateTime' => [ 'title' => '创建时间', 'description' => '创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '修改时间', 'description' => '修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'DueTime' => [ 'title' => '设定关机时间', 'description' => '设定关机时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'RemainingTimeInMs' => [ 'title' => '剩余关机时间(ms)', 'description' => '剩余关机时间,单位为毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '3600000', ], ], ], 'ReasonCode' => [ 'title' => '实例错误代码', 'description' => '实例错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例错误原因', 'description' => '实例错误原因。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'PaymentType' => [ 'title' => '支付类型', 'description' => '支付类型。可能值:'."\n" .'- PayAsYouGo:后付费。'."\n" .'- Subscription:预付费。', 'type' => 'string', 'example' => 'PayAsYouGo', ], 'LatestSnapshot' => [ 'title' => '最新保存的用户镜像', 'description' => '最新保存的用户镜像。', 'type' => 'object', 'properties' => [ 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageName' => [ 'title' => '镜像名称', 'description' => '镜像名称。', 'type' => 'string', 'example' => 'py36_cpu_tf1.12_ubuntu', ], 'ImageUrl' => [ 'title' => '镜像Url', 'description' => '镜像Url。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'RepositoryUrl' => [ 'title' => '镜像仓库Url', 'description' => '镜像仓库Url。', 'type' => 'string', 'example' => 'https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images', ], 'GmtCreateTime' => [ 'title' => '快照创建时间', 'description' => '快照创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '快照修改时间', 'description' => '快照修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'ReasonCode' => [ 'title' => '实例快照错误代码', 'description' => '实例快照错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例快照错误消息', 'description' => '实例快照错误消息。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'Status' => [ 'title' => '实例快照状态', 'description' => '实例快照状态。', 'type' => 'string', 'enumValueTitles' => [ 'Committing' => '提交中', 'Pushing' => '推送中', 'Failed' => '保存失败', 'Saved' => '保存成功', ], 'example' => 'Pushing', ], ], ], 'AcceleratorType' => [ 'title' => '实例计算类型', 'description' => '实例计算类型。', 'type' => 'string', 'enumValueTitles' => [ 'CPU' => 'CPU', 'GPU' => 'GPU', ], 'example' => 'CPU', ], 'Accessibility' => [ 'title' => '工作空间内是否他人可见', 'description' => '工作空间内是否他人可见。可能值:'."\n" .'- PRIVATE:表示工作空间内自己及管理员可见。'."\n" .'- PUBLIC:工作空间所有用户可见。', 'type' => 'string', 'enumValueTitles' => [ 'PUBLIC' => '工作空间所有用户可见', 'PRIVATE' => '工作空间内自己及管理员可见', ], 'example' => 'PRIVATE', ], 'EnvironmentVariables' => [ 'title' => '环境变量', 'description' => '环境变量。', 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', 'description' => '用户自定义的环境变量,将会在实例启动后,注入到容器内部。', 'example' => 'app: MAAS', ], 'example' => '{userName: "Chris"}', ], 'ResourceId' => [ 'title' => '资源Id,预付费时填写', 'description' => '资源ID。预付费时填写。', 'type' => 'string', 'example' => 'dsw-12345****', ], 'ResourceName' => [ 'description' => '实例规格。'."\n" .'- 预付费(subscription),是请求的CPU和内存大小。'."\n" .'- 后付费(pay-as-you-go),是选择的ECS规格。', 'type' => 'string', 'example' => 'ecs.g7.xlarge', ], 'Priority' => [ 'title' => '优先级,在分配资源给实例时,优先级越高的实例越优先', 'description' => '优先级,在分配资源给实例时,优先级越高的实例越优先。', 'type' => 'integer', 'format' => 'int64', 'example' => '1', ], 'RequestedResource' => [ 'title' => '资源配置,弹内或者轻量化时使用', 'description' => '资源配置,预付费场景使用。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'title' => 'cpu核数', 'description' => 'CPU核数。', 'type' => 'string', 'example' => '32', ], 'Memory' => [ 'title' => 'memory大小', 'description' => '内存大小,单位GB。', 'type' => 'string', 'example' => '32', ], 'SharedMemory' => [ 'title' => 'shared memory大小', 'description' => '共享内存大小,单位GB。', 'type' => 'string', 'example' => '32', ], 'GPU' => [ 'title' => 'gpu数量', 'description' => 'GPU数量。', 'type' => 'string', 'example' => '4', ], 'GPUType' => [ 'title' => 'gpu显卡类型', 'description' => 'GPU显卡类型。可能值:'."\n" .'- V100'."\n" .'- A100'."\n" .'- T4'."\n" .'- A10'."\n" .'- P100', 'type' => 'string', 'example' => 'v100', ], ], 'example' => '{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"}', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => '用户自定义标签。', 'type' => 'array', 'items' => [ 'description' => '用户可以对实例进行自定义打标,标记实例的一些自定义属性。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '用户定义标签键', 'description' => '用户定义标签键。', 'type' => 'string', 'example' => 'stsTokenOwner', ], 'Value' => [ 'title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'example' => '123xxxxxxxx', ], ], ], 'example' => '{\'foo\': \'bar\'}', ], 'IdleInstanceCuller' => [ 'title' => '实例的空闲资源回收器', 'description' => '闲置实例自动关机设置。', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'CpuPercentThreshold' => [ 'description' => 'CPU使用率阈值,单位是百分比,取值1~100,低于此值则认为实例当前处于闲置。', 'type' => 'integer', 'format' => 'int32', 'example' => '20', ], 'GpuPercentThreshold' => [ 'description' => 'GPU使用率阈值,单位是百分比,取值1~100。如果实例为GPU类型,则此参数生效。CPU和GPU同时低于阈值则认为指定实例处于闲置。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'MaxIdleTimeInMinutes' => [ 'description' => '闲置等待时间阈值,单位是分钟。如果闲置时长超过此值,将自动停止DSW实例。', 'type' => 'integer', 'format' => 'int32', 'example' => '60', ], 'IdleTimeInMinutes' => [ 'description' => '实例当前闲置时长,单位是分钟。', 'type' => 'integer', 'format' => 'int32', 'example' => '30', ], ], 'example' => '{"InstanceId":"dsw-05cefd0be2e5a278","CpuPercentThreshold":20,"GpuPercentThreshold":10,"MaxIdleTimeInMinutes":120,"IdleTimeInMinutes":30}', ], 'InstanceSnapshotList' => [ 'title' => '实例的快照列表', 'description' => '实例快照列表。', 'type' => 'array', 'items' => [ 'description' => '实例快照。', 'type' => 'object', 'properties' => [ 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageName' => [ 'title' => '镜像名称', 'description' => '镜像名称。', 'type' => 'string', 'example' => 'py36_cpu_tf1.12_ubuntu', ], 'ImageUrl' => [ 'title' => '镜像Url', 'description' => '镜像Url。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'RepositoryUrl' => [ 'title' => '镜像仓库Url', 'description' => '镜像仓库Url。', 'type' => 'string', 'example' => 'https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images', ], 'GmtCreateTime' => [ 'title' => '快照创建时间', 'description' => '快照创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '快照修改时间', 'description' => '快照修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'ReasonCode' => [ 'title' => '实例快照错误代码', 'description' => '实例快照错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例快照错误消息', 'description' => '实例快照错误消息。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'Status' => [ 'title' => '实例快照状态', 'description' => '实例快照状态。', 'type' => 'string', 'example' => 'Pushing', ], ], ], 'example' => '[]', ], 'CloudDisks' => [ 'title' => '实例的云盘列表', 'description' => '实例的云盘列表', 'type' => 'array', 'items' => [ 'description' => '云盘信息。', 'type' => 'object', 'properties' => [ 'Capacity' => [ 'title' => '云盘容量', 'description' => '云盘容量', 'type' => 'string', 'example' => '30Gi', ], 'SubType' => [ 'title' => '云盘使用方式, rootfs 挂载为rootfs', 'description' => '云盘使用方式, rootfs 挂载为rootfs', 'type' => 'string', 'example' => 'rootfs', ], 'MountPath' => [ 'title' => '容器内挂载云盘路径', 'description' => '容器内挂载云盘路径', 'type' => 'string', 'example' => '/mmt/workspace', ], 'Path' => [ 'title' => '云盘内被挂载目录路径', 'description' => '云盘内被挂载目录路径', 'type' => 'string', 'example' => '/workspace', ], 'Status' => [ 'type' => 'object', 'properties' => [ 'Available' => [ 'type' => 'integer', 'format' => 'int64', ], 'Usage' => [ 'type' => 'integer', 'format' => 'int64', ], 'Capacity' => [ 'type' => 'integer', 'format' => 'int64', ], ], ], ], ], 'example' => '[]', ], 'WorkspaceSource' => [ 'title' => '工作空间指向的存储,如果不指定,则依次使用NAS,CloudDisk或者本地磁盘', 'description' => '工作空间指向的存储,如果不指定,则依次使用NAS,CloudDisk或者本地磁盘', 'type' => 'string', 'example' => 'd-123456789', ], 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FC****', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '操作结果说明。'."\n" .'- 执行成功时,返回结果为null。'."\n" .'- 执行失败时,描述失败原因。', 'type' => 'string', 'example' => 'null', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'Driver' => [ 'title' => 'NVIDIA 驱动配置', 'description' => 'NVIDIA 驱动配置', 'type' => 'string', 'example' => '535.54.03', ], 'NodeErrorRecovery' => [ 'description' => '节点错误恢复配置。', 'type' => 'object', 'properties' => [ 'hasNodeError' => [ 'description' => '是否有节点错误。', 'type' => 'boolean', 'example' => 'false', ], 'enableAutoSwitchOnNodeError' => [ 'description' => '当出现节点错误时,是否开启自动切换。', 'type' => 'boolean', 'example' => 'true', ], 'autoSwitchCountdownSeconds' => [ 'description' => '自动切换时等待秒数。', 'type' => 'integer', 'format' => 'int64', 'example' => '30', ], ], ], 'CredentialConfig' => [ 'title' => 'Credential注入配置。', 'description' => 'Credential注入配置。', '$ref' => '#/components/schemas/CredentialConfig', ], 'Affinity' => [ 'description' => '亲和性配置。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'description' => 'CPU亲和性配置。仅支持通用计算预付费实例。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'description' => '是否开启CPU亲和性。'."\n" ."\n" .'true:开启。 false:不开启。', 'type' => 'boolean', 'example' => 'true', ], ], ], ], ], 'ImageAuth' => [ 'title' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'description' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'type' => 'string', 'example' => 'YWxpeXVuNjUzMzM5MjIwMzoqKioqKio=', ], 'Tags' => [ 'description' => '标签列表。', 'type' => 'array', 'items' => [ 'description' => '资源标签。', 'type' => 'object', 'properties' => [ 'TagKey' => [ 'description' => '标签 Key。', 'type' => 'string', 'example' => 'tag1', ], 'TagValue' => [ 'description' => '标签值。', 'type' => 'string', 'example' => 'value1', ], ], ], ], 'DynamicMount' => [ 'description' => '动态挂载配置。', '$ref' => '#/components/schemas/DynamicMount', ], 'ProxyPath' => [ 'description' => 'Proxy的路径。', 'type' => 'string', 'example' => 'dsw-170197/proxy/', ], 'UserCommandId' => [ 'description' => '自定义命令ID。可根据此ID调用GetUserCommand接口获取自定义命令具体内容。', 'type' => 'string', 'example' => '1900', ], 'ServiceConfig' => [ '$ref' => '#/components/schemas/ServiceConfig', ], 'PodIps' => [ 'type' => 'array', 'items' => [ '$ref' => '#/components/schemas/PodIp', ], ], 'MigrationOptions' => [ 'title' => '实例迁移选项', 'description' => '实例迁移选项', 'type' => 'object', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"WorkspaceId\\": \\"40823\\",\\n \\"WorkspaceName\\": \\"training_data\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"InstanceName\\": \\"training_data\\",\\n \\"EcsSpec\\": \\"ecs.c6.large\\",\\n \\"Status\\": \\"Running\\",\\n \\"InstanceUrl\\": \\"https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=3****#/\\",\\n \\"JupyterlabUrl\\": \\"https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/lab/\\",\\n \\"WebIDEUrl\\": \\"https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/ide/\\",\\n \\"TerminalUrl\\": \\"https://dsw-gateway-cn-shanghai.aliyun.com/dsw-3****/tty/\\",\\n \\"AccumulatedRunningTimeInMs\\": 3600000,\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"ImageName\\": \\"py36_cpu_tf1.12_ubuntu\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"UserId\\": \\"161228528250****\\",\\n \\"UserName\\": \\"测试用户\\",\\n \\"Datasets\\": [\\n {\\n \\"DatasetId\\": \\"d-vsqjvsjp4orp5l****\\",\\n \\"DatasetVersion\\": \\"v1\\",\\n \\"Uri\\": \\"oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/\\",\\n \\"MountPath\\": \\"/mnt/data\\",\\n \\"MountAccess\\": \\"RW\\",\\n \\"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}\\",\\n \\"OptionType\\": \\"FastReadWrite\\",\\n \\"Dynamic\\": false,\\n \\"ActualMountAccess\\": \\"\\"\\n }\\n ],\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"vpc-xxxxx\\",\\n \\"VSwitchId\\": \\"vsw-xxxxx\\",\\n \\"SecurityGroupId\\": \\"sg-xxxxxx\\",\\n \\"ExtendedCIDRs\\": [\\n \\"\\\\\\"172.16.19.0/24\\\\\\",\\\\\\"172.16.2.0/24\\\\\\",\\\\\\"172.16.12.0/24\\\\\\"\\"\\n ],\\n \\"DefaultRoute\\": \\"eth0 | eth1\\",\\n \\"ForwardInfos\\": [\\n {\\n \\"Enable\\": true,\\n \\"ContainerName\\": \\"dsw-notebook\\",\\n \\"ForwardPort\\": \\"22\\",\\n \\"NatGatewayId\\": \\"ngw-bp1uewa15k4iy5770****\\",\\n \\"EipAllocationId\\": \\"eip-25877c70gddh****\\",\\n \\"SSHPublicKey\\": \\"\\",\\n \\"ConnectInfo\\": {\\n \\"Phase\\": \\"Ready\\",\\n \\"Message\\": \\"DNAT and privateZone are both ready.\\",\\n \\"Intranet\\": {\\n \\"Endpoint\\": \\"dsw-notebook-22-urz3u6cnu0uts7ej9r.dsw-5cc6083084818f60.dsw.pai.alibaba.com\\",\\n \\"Port\\": \\"22\\"\\n },\\n \\"Internet\\": {\\n \\"Endpoint\\": \\"47.111.119.114\\",\\n \\"Port\\": \\"22\\"\\n }\\n },\\n \\"Name\\": \\"ssh\\",\\n \\"ExternalPort\\": \\"1024\\",\\n \\"AccessType\\": [\\n \\"intranet\\"\\n ]\\n }\\n ],\\n \\"BandwidthLimit\\": {\\n \\"EgressWhitelists\\": [\\n \\"\\"\\n ],\\n \\"IngressRate\\": \\"\\",\\n \\"EgressRate\\": \\"\\",\\n \\"IngressWhitelists\\": [\\n \\"\\"\\n ]\\n },\\n \\"Ip\\": \\"\\"\\n },\\n \\"InstanceShutdownTimer\\": {\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"DueTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"RemainingTimeInMs\\": 3600000\\n },\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"PaymentType\\": \\"PayAsYouGo\\",\\n \\"LatestSnapshot\\": {\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageName\\": \\"py36_cpu_tf1.12_ubuntu\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"RepositoryUrl\\": \\"https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"Status\\": \\"Pushing\\"\\n },\\n \\"AcceleratorType\\": \\"CPU\\",\\n \\"Accessibility\\": \\"PRIVATE\\",\\n \\"EnvironmentVariables\\": {\\n \\"key\\": \\"app: MAAS\\"\\n },\\n \\"ResourceId\\": \\"dsw-12345****\\",\\n \\"ResourceName\\": \\"ecs.g7.xlarge\\",\\n \\"Priority\\": 1,\\n \\"RequestedResource\\": {\\n \\"CPU\\": \\"32\\",\\n \\"Memory\\": \\"32\\",\\n \\"SharedMemory\\": \\"32\\",\\n \\"GPU\\": \\"4\\",\\n \\"GPUType\\": \\"v100\\"\\n },\\n \\"Labels\\": [\\n {\\n \\"Key\\": \\"stsTokenOwner\\",\\n \\"Value\\": \\"123xxxxxxxx\\"\\n }\\n ],\\n \\"IdleInstanceCuller\\": {\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"CpuPercentThreshold\\": 20,\\n \\"GpuPercentThreshold\\": 10,\\n \\"MaxIdleTimeInMinutes\\": 60,\\n \\"IdleTimeInMinutes\\": 30\\n },\\n \\"InstanceSnapshotList\\": [\\n {\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageName\\": \\"py36_cpu_tf1.12_ubuntu\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"RepositoryUrl\\": \\"https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"Status\\": \\"Pushing\\"\\n }\\n ],\\n \\"CloudDisks\\": [\\n {\\n \\"Capacity\\": \\"30Gi\\",\\n \\"SubType\\": \\"rootfs\\",\\n \\"MountPath\\": \\"/mmt/workspace\\",\\n \\"Path\\": \\"/workspace\\",\\n \\"Status\\": {\\n \\"Available\\": 0,\\n \\"Usage\\": 0,\\n \\"Capacity\\": 0\\n }\\n }\\n ],\\n \\"WorkspaceSource\\": \\"d-123456789\\",\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FC****\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"null\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"Driver\\": \\"535.54.03\\",\\n \\"NodeErrorRecovery\\": {\\n \\"hasNodeError\\": false,\\n \\"enableAutoSwitchOnNodeError\\": true,\\n \\"autoSwitchCountdownSeconds\\": 30\\n },\\n \\"CredentialConfig\\": {\\n \\"Enable\\": true,\\n \\"AliyunEnvRoleKey\\": \\"0\\",\\n \\"Configs\\": [\\n {\\n \\"Key\\": \\"0\\",\\n \\"Type\\": \\"Role\\",\\n \\"Roles\\": [\\n {\\n \\"RoleArn\\": \\"acs:ram::123******:role/****\\",\\n \\"RoleType\\": \\"service\\",\\n \\"AssumeRoleFor\\": \\"123******\\",\\n \\"Policy\\": \\"{}\\",\\n \\"UserInfo\\": {\\n \\"Id\\": \\"456******\\",\\n \\"Type\\": \\"sub\\",\\n \\"AccessKeyId\\": \\"LT********\\",\\n \\"SecurityToken\\": \\"********\\"\\n }\\n }\\n ]\\n }\\n ]\\n },\\n \\"Affinity\\": {\\n \\"CPU\\": {\\n \\"Enable\\": true\\n }\\n },\\n \\"ImageAuth\\": \\"YWxpeXVuNjUzMzM5MjIwMzoqKioqKio=\\",\\n \\"Tags\\": [\\n {\\n \\"TagKey\\": \\"tag1\\",\\n \\"TagValue\\": \\"value1\\"\\n }\\n ],\\n \\"DynamicMount\\": {\\n \\"Enable\\": true,\\n \\"MountPoints\\": [\\n {\\n \\"RootPath\\": \\"\\",\\n \\"Options\\": \\"\\"\\n }\\n ]\\n },\\n \\"ProxyPath\\": \\"dsw-170197/proxy/\\",\\n \\"UserCommandId\\": \\"1900\\",\\n \\"ServiceConfig\\": {\\n \\"JupyterServerPassword\\": \\"\\",\\n \\"JupyterServerAuth\\": \\"\\",\\n \\"CodeServerPassword\\": \\"\\",\\n \\"CodeServerAuth\\": \\"\\"\\n },\\n \\"PodIps\\": [\\n {\\n \\"Type\\": \\"\\",\\n \\"Ip\\": \\"\\",\\n \\"InterfaceName\\": \\"\\"\\n }\\n ],\\n \\"MigrationOptions\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n}","type":"json"}]', 'title' => '查询实例详情', ], 'ListInstances' => [ 'summary' => '查询DSW实例列表。', 'path' => '/api/v2/instances', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '118637', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'title' => '工作空间Id', 'description' => '按工作空间ID过滤。如何获取工作空间ID,请参见[ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => false, 'example' => '40823', ], ], [ 'name' => 'InstanceName', 'in' => 'query', 'schema' => [ 'title' => '实例名称', 'description' => '按实例名称过滤。', 'type' => 'string', 'required' => false, 'example' => 'training_data', ], ], [ 'name' => 'ResourceId', 'in' => 'query', 'schema' => [ 'title' => '资源组Id', 'description' => '按资源组ID过滤,假如为空,只过滤后付费资源组的实例,填ALL会过滤出所有的实例。', 'type' => 'string', 'required' => false, 'example' => 'ALL', ], ], [ 'name' => 'Status', 'in' => 'query', 'schema' => [ 'title' => '实例状态', 'description' => '根据实例状态过滤。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'Creating' => '创建中', 'SaveFailed' => '镜像保存失败', 'Stopped' => '已停止', 'Failed' => '失败', 'ResourceAllocating' => '资源分配中', 'Stopping' => '停止中', 'Updating' => '更新中', 'Saving' => '镜像保存中', 'Queuing' => '排队中', 'Recovering' => '恢复中', 'Starting' => '启动中', 'Running' => '运行中', 'Saved' => '镜像保存成功', 'Deleting' => '删除中', 'EnvPreparing' => '环境准备中', ], 'example' => 'Running', ], ], [ 'name' => 'PaymentType', 'in' => 'query', 'schema' => [ 'description' => '付费类型。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'PayAsYouGo' => '后付费(后付费/按量付费)', 'Subscription' => '预付费(预付费/包年包月)', ], 'example' => 'PayAsYouGo', ], ], [ 'name' => 'Accessibility', 'in' => 'query', 'schema' => [ 'description' => '工作空间可见度。取值如下:'."\n" .'- PRIVATE(默认值):表示工作空间内自己以及管理员可见。'."\n" .'- PUBLIC:为工作空间所有用户可见。', 'type' => 'string', 'required' => false, 'example' => 'PRIVATE', ], ], [ 'name' => 'AcceleratorType', 'in' => 'query', 'schema' => [ 'description' => '加速器类型。'."\n" .'- CPU:无计算加速,只使用CPU计算。'."\n" .'- GPU:使用GPU进行计算加速。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'CPU' => 'CPU', 'GPU' => 'GPU', ], 'example' => 'CPU', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'title' => '页码', 'description' => '实例列表的页码。起始值为1,默认为1。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'default' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'title' => '分页数量大小', 'description' => '分页查询时设置的每页显示的实例数量。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10', 'default' => '10', ], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'title' => '排序字段', 'description' => '排序字段。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'Priority' => '优先级', 'GmtCreateTime' => '创建时间', 'GmtModifiedTime' => '修改时间', ], 'example' => 'GmtCreateTime', 'default' => 'GmtModifiedTime', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'title' => '排列顺序', 'description' => '排列顺序。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'ASC' => '升序', 'DESC' => '降序', ], 'example' => 'DESC', 'default' => 'DESC', ], ], [ 'name' => 'InstanceId', 'in' => 'query', 'schema' => [ 'description' => '按实例ID过滤。如何获取实例ID,请参见[ListInstances](~~470439~~)。支持以逗号分隔的方式传入多个ID实现多选。', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'Labels', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '用于过滤的实例标签,最多支持4组标签。', 'type' => 'object', 'required' => false, 'example' => '{'."\n" .' "key1": "value1",'."\n" .' "key2": "value2",'."\n" .' "key3": "value3"'."\n" .'}', ], ], [ 'name' => 'CreateUserId', 'in' => 'query', 'schema' => [ 'title' => '创建人的UserId', 'description' => '创建人的UserId', 'type' => 'string', 'required' => false, 'example' => '12345*****67890', ], ], [ 'name' => 'GpuType', 'in' => 'query', 'schema' => [ 'title' => 'Gpu类型', 'description' => 'GPU 型号。', 'type' => 'string', 'required' => false, 'example' => 'NVIDIA A10', ], ], [ 'name' => 'MinCpu', 'in' => 'query', 'schema' => [ 'description' => '最小的Cpu数量,单位是0.001 Cpu,1000表示1个Cpu。', 'type' => 'string', 'required' => false, 'example' => '2000', ], ], [ 'name' => 'MaxCpu', 'in' => 'query', 'schema' => [ 'description' => '最大的Cpu数量,单位是0.001 Cpu,1000表示1个Cpu。', 'type' => 'string', 'required' => false, 'example' => '30000', ], ], [ 'name' => 'MinGpu', 'in' => 'query', 'schema' => [ 'description' => '最小的Gpu数量,单位是0.001 Gpu,1000表示1个Gpu。', 'type' => 'string', 'required' => false, 'example' => '100', ], ], [ 'name' => 'MaxGpu', 'in' => 'query', 'schema' => [ 'description' => '最大的Gpu数量,单位是0.001 Gpu,1000表示1个Gpu。', 'type' => 'string', 'required' => false, 'example' => '8000', ], ], [ 'name' => 'MinMemory', 'in' => 'query', 'schema' => [ 'description' => '最小的机器内存数,单位是G。', 'type' => 'string', 'required' => false, 'example' => '4', ], ], [ 'name' => 'MaxMemory', 'in' => 'query', 'schema' => [ 'description' => '最大的机器内存数,单位是G。', 'type' => 'string', 'required' => false, 'example' => '48', ], ], [ 'name' => 'MinGpuMemory', 'in' => 'query', 'schema' => [ 'description' => '最小单卡Gpu内存大小,单位是G。', 'type' => 'string', 'required' => false, 'example' => '8', ], ], [ 'name' => 'MaxGpuMemory', 'in' => 'query', 'schema' => [ 'description' => '最大单卡Gpu内存大小,单位是G。', 'type' => 'string', 'required' => false, 'example' => '16', ], ], [ 'name' => 'ImageName', 'in' => 'query', 'schema' => [ 'title' => '镜像名', 'description' => '镜像名', 'type' => 'string', 'required' => false, 'example' => 'modelscope:1.9.4-pytorch2.0.1tensorflow2.13.0-cpu-py38-ubuntu20.04', ], ], [ 'name' => 'Tag', 'in' => 'query', 'style' => 'json', 'schema' => [ 'description' => '标签列表。', 'type' => 'array', 'items' => [ 'description' => '标签信息。', 'type' => 'object', 'properties' => [ 'Key' => [ 'description' => '标签Key。', 'type' => 'string', 'required' => false, 'example' => 'tag1', ], 'Value' => [ 'description' => '标签的值。', 'type' => 'string', 'required' => false, 'example' => 'value1', ], ], 'required' => false, ], 'required' => false, ], ], [ 'name' => 'OversoldInfo', 'in' => 'query', 'schema' => [ 'description' => '实例实际使用的闲时资源类型:'."\n" .'+ ForbiddenQuotaOverSold:使用保障资源'."\n" .'+ ForceQuotaOverSold:使用闲时资源'."\n" .'+ PendingQuotaOverSold:待分配', 'type' => 'string', 'required' => false, 'example' => 'ForceQuotaOverSold', ], ], [ 'name' => 'OversoldType', 'in' => 'query', 'schema' => [ 'description' => '用户指定的闲时资源类型:'."\n" .'+ ForceQuotaOverSold:只使用闲时资源'."\n" .'+ AcceptQuotaOverSold:可接受闲时资源'."\n" .'+ ForbiddenQuotaOverSold:使用保障资源', 'type' => 'string', 'required' => false, 'example' => 'AcceptQuotaOverSold', ], ], [ 'name' => 'CreateTimeAfter', 'in' => 'query', 'schema' => [ 'description' => '筛选出创建时间晚于(或等于)该时间的实例', 'type' => 'string', 'required' => false, 'example' => '2024-01-12T14:36:01Z', ], ], [ 'name' => 'CreateTimeBefore', 'in' => 'query', 'schema' => [ 'description' => '筛选出创建时间早于(或等于)该时间的实例', 'type' => 'string', 'required' => false, 'example' => '2024-01-12T15:36:01Z', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '实例列表', 'description' => '实例列表。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'TotalCount' => [ 'title' => '实例总数', 'description' => '实例总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '35', ], 'Instances' => [ 'title' => '本分页中请求的实例列表', 'description' => '本分页中请求的实例列表。', 'type' => 'array', 'items' => [ 'description' => '实例对象。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'title' => '工作空间Id', 'description' => '工作空间ID。', 'type' => 'string', 'example' => '40823', ], 'WorkspaceName' => [ 'title' => '工作空间名称', 'description' => '工作空间名称。', 'type' => 'string', 'example' => 'training_data', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'InstanceName' => [ 'title' => '实例名称', 'description' => '实例名称。', 'type' => 'string', 'example' => 'training_data', ], 'EcsSpec' => [ 'title' => '实例对应的Ecs规格', 'description' => '实例对应的ECS规格。', 'type' => 'string', 'example' => 'ecs.c6.large', ], 'Status' => [ 'title' => '实例状态', 'description' => '实例状态。支持以逗号分隔的方式传入多个Status实现多选。', 'type' => 'string', 'example' => 'Running', ], 'InstanceUrl' => [ 'title' => '实例Url', 'description' => '实例Url。', 'type' => 'string', 'example' => 'https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=39772#/', ], 'JupyterlabUrl' => [ 'title' => 'Jupyterlab Url', 'description' => 'Jupyterlab Url。', 'type' => 'string', 'example' => 'https://dsw-gateway-cn-shanghai.aliyun.com/dsw-39772/lab/', ], 'WebIDEUrl' => [ 'title' => 'Web IDE url', 'description' => 'Web IDE url。', 'type' => 'string', 'example' => 'https://dsw-gateway-cn-shanghai.aliyun.com/dsw-39772/ide/', ], 'TerminalUrl' => [ 'title' => '终端url', 'description' => '终端url。', 'type' => 'string', 'example' => 'https://dsw-gateway-cn-shanghai.aliyun.com/dsw-39772/tty/', ], 'AccumulatedRunningTimeInMs' => [ 'title' => '累计运行时间(ms)', 'description' => '累计运行时间,单位为毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '3600000', ], 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageUrl' => [ 'title' => '镜像地址', 'description' => '镜像地址。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'ImageName' => [ 'title' => '镜像名称', 'description' => '镜像名称。', 'type' => 'string', 'example' => 'py36_cpu_tf1.12_ubuntu', ], 'GmtCreateTime' => [ 'title' => '实例创建时间', 'description' => '实例创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '实例修改时间', 'description' => '实例修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'UserId' => [ 'title' => '用户Id', 'description' => '用户ID。', 'type' => 'string', 'example' => '1612285282502324', ], 'UserName' => [ 'title' => '用户名称', 'description' => '用户名称。', 'type' => 'string', 'example' => '测试用户', ], 'Datasets' => [ 'title' => '数据集集合', 'description' => '数据集集合。', 'type' => 'array', 'items' => [ 'description' => '数据集对象', 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集Id', 'description' => '数据集ID。', 'type' => 'string', 'example' => 'd-vsqjvsjp4orp5l206u', ], 'DatasetVersion' => [ 'title' => '数据集版本', 'description' => '数据集版本。', 'type' => 'string', 'example' => 'v1', ], 'Uri' => [ 'title' => '数据Uri', 'description' => '指定的数据集的Uri。', 'type' => 'string', 'example' => 'oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/', ], 'MountPath' => [ 'title' => '容器内挂载路径', 'description' => '容器内挂载路径。', 'type' => 'string', 'example' => '/mnt/data', ], 'MountAccess' => [ 'title' => '读写权限,RW:读写,RO:只读。', 'description' => '读写权限,RW:读写,RO:只读。', 'type' => 'string', 'enumValueTitles' => [ 'RW' => '读写', 'RO' => '只读', ], 'example' => 'RW', ], 'Options' => [ 'title' => '数据挂载的配置项', 'description' => '数据集的挂载属性。', 'type' => 'string', 'example' => '{'."\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' => [ 'title' => '挂载配置项类型,目前只支持OSS数据集', 'description' => '挂载配置项类型', 'type' => 'string', 'example' => 'FastReadWrite', ], 'Dynamic' => [ 'description' => '是否开启动态挂载,默认为false。', 'type' => 'boolean', 'example' => 'false', ], ], ], ], 'UserVpc' => [ 'title' => 'user vpc配置', 'description' => 'User VPC配置。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'Vpc Id', 'description' => 'VPC ID。', 'type' => 'string', 'example' => 'vpc-xxxxx', ], 'VSwitchId' => [ 'title' => 'VSwitch Id', 'description' => '交换机ID。', 'type' => 'string', 'example' => 'vsw-xxxxx', ], 'SecurityGroupId' => [ 'title' => 'Security Group Id', 'description' => '安全组ID。', 'type' => 'string', 'example' => 'sg-xxxxxx', ], 'ExtendedCIDRs' => [ 'description' => '扩展网络打通网段列表', 'type' => 'array', 'items' => [ 'description' => '扩展网络打通网段', 'type' => 'string', 'example' => '192.168.0.1/24', ], 'example' => '["192.168.0.1/24", "192.168.1.1/24"]', ], 'DefaultRoute' => [ 'title' => 'Default Route', 'description' => 'Default Route', 'type' => 'string', 'example' => 'eth0 | eth1', ], 'ForwardInfos' => [ 'description' => '端口透出信息。', 'type' => 'array', 'items' => [ 'description' => '端口透出信息列表。', '$ref' => '#/components/schemas/ForwardInfoResponse', ], ], 'BandwidthLimit' => [ '$ref' => '#/components/schemas/BandwidthLimit', ], 'Ip' => [ 'type' => 'string', ], ], ], 'InstanceShutdownTimer' => [ 'title' => '定时关机任务', 'description' => '定时关机任务。', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'GmtCreateTime' => [ 'title' => '创建时间', 'description' => '创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '修改时间', 'description' => '修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'DueTime' => [ 'title' => '设定关机时间', 'description' => '设定关机时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'RemainingTimeInMs' => [ 'title' => '剩余关机时间(ms)', 'description' => '剩余关机时间,单位为毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '3600000', ], ], ], 'ReasonCode' => [ 'title' => '实例错误代码', 'description' => '实例错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例错误原因', 'description' => '实例错误原因。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'PaymentType' => [ 'title' => '支付类型', 'description' => '支付类型,可能值:'."\n" .'- PayAsYouGo:后付费(后付费/按量付费)。'."\n" .'- Subscription:预付费(预付费/包年包月)。', 'type' => 'string', 'example' => 'PayAsYouGo', ], 'LatestSnapshot' => [ 'title' => '最新保存的用户镜像', 'description' => '最新保存的用户镜像。', 'type' => 'object', 'properties' => [ 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageName' => [ 'title' => '镜像名称', 'description' => '镜像名称。', 'type' => 'string', 'example' => 'py36_cpu_tf1.12_ubuntu', ], 'ImageUrl' => [ 'title' => '镜像Url', 'description' => '镜像Url。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'RepositoryUrl' => [ 'title' => '镜像仓库Url', 'description' => '镜像仓库Url。', 'type' => 'string', 'example' => 'https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images', ], 'GmtCreateTime' => [ 'title' => '快照创建时间', 'description' => '快照创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '快照修改时间', 'description' => '快照修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'ReasonCode' => [ 'title' => '实例快照错误代码', 'description' => '实例快照错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例快照错误消息', 'description' => '实例快照错误消息。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'Status' => [ 'title' => '实例快照状态', 'description' => '实例快照状态。', 'type' => 'string', 'example' => 'Pushing', ], ], ], 'AcceleratorType' => [ 'title' => '实例计算类型', 'description' => '实例计算类型。可能值:'."\n" .'- CPU'."\n" .'- GPU', 'type' => 'string', 'example' => 'CPU', ], 'Accessibility' => [ 'title' => '工作空间内是否他人可见', 'description' => '工作空间内是否他人可见。可能值:'."\n" .'- PRIVATE(默认值):表示工作空间内自己以及管理员可见。'."\n" .'- PUBLIC:为工作空间所有用户可见。', 'type' => 'string', 'example' => 'PRIVATE', ], 'EnvironmentVariables' => [ 'title' => '环境变量', 'description' => '环境变量。', 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', 'example' => 'MAAS', 'description' => '用户指定环境变量。DSW实例启动后,指定环境变量会被注入到容器中。', ], 'example' => '{userName: "Chris"}', ], 'ResourceId' => [ 'title' => '资源Id,预付费时填写', 'description' => '资源ID,预付费时填写。', 'type' => 'string', 'example' => 'dsw-123456789', ], 'ResourceName' => [ 'description' => '资源规格。'."\n" .'- 后付费场景,资源规格为购买的ECS规格。'."\n" .'- 预付费场景,资源规格为请求的CPU核数与内存大小。', 'type' => 'string', 'example' => 'resource_group', ], 'Priority' => [ 'title' => '优先级,在分配资源给实例时,优先级越高的实例越优先', 'description' => '优先级,在分配资源给实例时,优先级越高的实例越优先。', 'type' => 'integer', 'format' => 'int64', 'example' => '1', ], 'RequestedResource' => [ 'title' => '资源配置,弹内或者轻量化时使用', 'description' => '资源配置。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'title' => 'cpu核数', 'description' => 'CPU核数。', 'type' => 'string', 'example' => '32', ], 'Memory' => [ 'title' => 'memory大小', 'description' => '内存大小。', 'type' => 'string', 'example' => '32', ], 'SharedMemory' => [ 'title' => 'shared memory大小', 'description' => '共享内存大小。', 'type' => 'string', 'example' => '32', ], 'GPU' => [ 'title' => 'gpu数量', 'description' => 'GPU数量。', 'type' => 'string', 'example' => '4', ], 'GPUType' => [ 'title' => 'gpu显卡类型', 'description' => 'GPU显卡类型。', 'type' => 'string', 'example' => 'NVIDIA A10', ], ], 'example' => '{"CPU":"4","Memory":"8Gi","SharedMemory":"4Gi","GPU":"1","GPUType":"Tesla-V100-16G"}', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => '用户自定义标签。', 'type' => 'array', 'items' => [ 'description' => '用户定义标签。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '用户定义标签键', 'description' => '用户定义标签键值。', 'type' => 'string', 'example' => 'stsTokenOwner', ], 'Value' => [ 'title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'example' => '123xxxxxxxx', ], ], ], 'example' => '{\'foo\': \'bar\'}', ], 'IdleInstanceCuller' => [ 'title' => '实例的空闲资源回收器', 'description' => '实例闲置关机规则。', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'CpuPercentThreshold' => [ 'description' => 'CPU使用率阈值,单位是百分比,取值1~100,低于此值则认为实例当前处于闲置。', 'type' => 'integer', 'format' => 'int32', 'example' => '20', ], 'GpuPercentThreshold' => [ 'description' => 'GPU使用率阈值,单位是百分比,取值1~100。如果实例为GPU类型,则此参数生效。CPU和GPU同时低于阈值则认为指定实例处于闲置。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'MaxIdleTimeInMinutes' => [ 'description' => '闲置等待时间阈值,单位是分钟。如果闲置时长超过此值,将自动停止DSW实例。', 'type' => 'integer', 'format' => 'int32', 'example' => '60', ], 'IdleTimeInMinutes' => [ 'description' => '实例当前闲置时长,单位是分钟。', 'type' => 'integer', 'format' => 'int32', 'example' => '30', ], ], 'example' => '{"InstanceId":"dsw-05cefd0be2e5a278","CpuPercentThreshold":20,"GpuPercentThreshold":10,"MaxIdleTimeInMinutes":120,"IdleTimeInMinutes":30}', ], 'InstanceSnapshotList' => [ 'title' => '实例的快照列表', 'description' => '实例快照列表。', 'type' => 'array', 'items' => [ 'description' => '实例快照。', 'type' => 'object', 'properties' => [ 'ImageId' => [ 'title' => '镜像Id', 'description' => '镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageName' => [ 'title' => '镜像名称', 'description' => '镜像名称。', 'type' => 'string', 'example' => 'py36_cpu_tf1.12_ubuntu', ], 'ImageUrl' => [ 'title' => '镜像Url', 'description' => '镜像Url。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'RepositoryUrl' => [ 'title' => '镜像仓库Url', 'description' => '镜像仓库Url。', 'type' => 'string', 'example' => 'https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images', ], 'GmtCreateTime' => [ 'title' => '快照创建时间', 'description' => '快照创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '快照修改时间', 'description' => '快照修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'ReasonCode' => [ 'title' => '实例快照错误代码', 'description' => '实例快照错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例快照错误消息', 'description' => '实例快照错误消息。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'Status' => [ 'title' => '实例快照状态', 'description' => '实例快照状态。', 'type' => 'string', 'example' => 'Pushing', ], ], ], 'example' => '[]', ], 'CloudDisks' => [ 'title' => '实例的云盘列表', 'description' => '实例的云盘列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Capacity' => [ 'title' => '云盘容量', 'description' => '云盘容量', 'type' => 'string', 'example' => '30Gi', ], 'SubType' => [ 'title' => '云盘使用方式, rootfs 挂载为rootfs', 'description' => '云盘使用方式, rootfs 挂载为rootfs', 'type' => 'string', 'example' => 'rootfs', ], 'MountPath' => [ 'title' => '容器内挂载云盘路径', 'description' => '容器内挂载云盘路径', 'type' => 'string', 'example' => '/mmt/workspace', ], 'Path' => [ 'title' => '云盘内被挂载目录路径', 'description' => '云盘内被挂载目录路径', 'type' => 'string', 'example' => '/workspace', ], ], ], 'example' => '[]', ], 'WorkspaceSource' => [ 'title' => '工作空间指向的存储,如果不指定,则依次使用NAS,CloudDisk或者本地磁盘', 'description' => '工作空间指向的存储,如果不指定,则依次使用NAS,CloudDisk或者本地磁盘', 'type' => 'string', 'example' => 'd-123456789', ], 'Driver' => [ 'title' => 'NVIDIA 驱动配置', 'description' => 'NVIDIA 驱动配置', 'type' => 'string', 'example' => '535.54.03', ], 'CredentialConfig' => [ 'title' => 'Credential注入配置。', 'description' => 'Credential注入配置。', '$ref' => '#/components/schemas/CredentialConfig', ], 'Affinity' => [ 'description' => '亲和性配置。', 'type' => 'object', 'properties' => [ 'CPU' => [ 'description' => 'CPU亲和性配置。仅支持通用计算预付费实例。', 'type' => 'object', 'properties' => [ 'Enable' => [ 'description' => '是否开启CPU亲和性。'."\n" ."\n" .'true:开启。 false:不开启。', 'type' => 'boolean', 'example' => 'true', ], ], ], ], ], 'ImageAuth' => [ 'title' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'description' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'type' => 'string', 'example' => 'aGFyYm9yYWlAeGltYWxheWE6KioqKioq', ], 'Tags' => [ 'description' => '标签列表。', 'type' => 'array', 'items' => [ 'description' => '标签信息。', 'type' => 'object', 'properties' => [ 'TagKey' => [ 'description' => '标签 Key。', 'type' => 'string', 'example' => 'tag1', ], 'TagValue' => [ 'description' => '标签值。', 'type' => 'string', 'example' => 'value1', ], ], ], ], 'DynamicMount' => [ 'description' => '动态挂载配置。', '$ref' => '#/components/schemas/DynamicMount', ], 'OversoldType' => [ 'description' => '实例闲时资源的类型。', 'type' => 'string', ], 'OversoldInfo' => [ 'description' => '实例实际使用的闲时资源信息。', 'type' => 'string', ], 'ServiceConfig' => [ 'description' => '实例的服务(包括ide、jupyter等)配置信息。', '$ref' => '#/components/schemas/ServiceConfig', ], ], ], ], 'MigrationOptions' => [ 'title' => '实例迁移选项', 'description' => '实例迁移选项', 'type' => 'object', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"TotalCount\\": 35,\\n \\"Instances\\": [\\n {\\n \\"WorkspaceId\\": \\"40823\\",\\n \\"WorkspaceName\\": \\"training_data\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"InstanceName\\": \\"training_data\\",\\n \\"EcsSpec\\": \\"ecs.c6.large\\",\\n \\"Status\\": \\"Running\\",\\n \\"InstanceUrl\\": \\"https://dsw-cn-shanghai.data.aliyun.com/notebook.htm?instance=39772#/\\",\\n \\"JupyterlabUrl\\": \\"https://dsw-gateway-cn-shanghai.aliyun.com/dsw-39772/lab/\\",\\n \\"WebIDEUrl\\": \\"https://dsw-gateway-cn-shanghai.aliyun.com/dsw-39772/ide/\\",\\n \\"TerminalUrl\\": \\"https://dsw-gateway-cn-shanghai.aliyun.com/dsw-39772/tty/\\",\\n \\"AccumulatedRunningTimeInMs\\": 3600000,\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"ImageName\\": \\"py36_cpu_tf1.12_ubuntu\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"UserId\\": \\"1612285282502324\\",\\n \\"UserName\\": \\"测试用户\\",\\n \\"Datasets\\": [\\n {\\n \\"DatasetId\\": \\"d-vsqjvsjp4orp5l206u\\",\\n \\"DatasetVersion\\": \\"v1\\",\\n \\"Uri\\": \\"oss://bucket-name.oss-cn-shanghai-internal.aliyuncs.com/data/path/\\",\\n \\"MountPath\\": \\"/mnt/data\\",\\n \\"MountAccess\\": \\"RW\\",\\n \\"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}\\",\\n \\"OptionType\\": \\"FastReadWrite\\",\\n \\"Dynamic\\": false\\n }\\n ],\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"vpc-xxxxx\\",\\n \\"VSwitchId\\": \\"vsw-xxxxx\\",\\n \\"SecurityGroupId\\": \\"sg-xxxxxx\\",\\n \\"ExtendedCIDRs\\": [\\n \\"192.168.0.1/24\\"\\n ],\\n \\"DefaultRoute\\": \\"eth0 | eth1\\",\\n \\"ForwardInfos\\": [\\n {\\n \\"Enable\\": true,\\n \\"ContainerName\\": \\"dsw-notebook\\",\\n \\"ForwardPort\\": \\"22\\",\\n \\"NatGatewayId\\": \\"ngw-bp1uewa15k4iy5770****\\",\\n \\"EipAllocationId\\": \\"eip-25877c70gddh****\\",\\n \\"SSHPublicKey\\": \\"\\",\\n \\"ConnectInfo\\": {\\n \\"Phase\\": \\"Ready\\",\\n \\"Message\\": \\"DNAT and privateZone are both ready.\\",\\n \\"Intranet\\": {\\n \\"Endpoint\\": \\"dsw-notebook-22-urz3u6cnu0uts7ej9r.dsw-5cc6083084818f60.dsw.pai.alibaba.com\\",\\n \\"Port\\": \\"22\\"\\n },\\n \\"Internet\\": {\\n \\"Endpoint\\": \\"47.111.119.114\\",\\n \\"Port\\": \\"22\\"\\n }\\n },\\n \\"Name\\": \\"ssh\\",\\n \\"ExternalPort\\": \\"1024\\",\\n \\"AccessType\\": [\\n \\"intranet\\"\\n ]\\n }\\n ],\\n \\"BandwidthLimit\\": {\\n \\"EgressWhitelists\\": [\\n \\"\\"\\n ],\\n \\"IngressRate\\": \\"\\",\\n \\"EgressRate\\": \\"\\",\\n \\"IngressWhitelists\\": [\\n \\"\\"\\n ]\\n },\\n \\"Ip\\": \\"\\"\\n },\\n \\"InstanceShutdownTimer\\": {\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"DueTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"RemainingTimeInMs\\": 3600000\\n },\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"PaymentType\\": \\"PayAsYouGo\\",\\n \\"LatestSnapshot\\": {\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageName\\": \\"py36_cpu_tf1.12_ubuntu\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"RepositoryUrl\\": \\"https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"Status\\": \\"Pushing\\"\\n },\\n \\"AcceleratorType\\": \\"CPU\\",\\n \\"Accessibility\\": \\"PRIVATE\\",\\n \\"EnvironmentVariables\\": {\\n \\"key\\": \\"MAAS\\"\\n },\\n \\"ResourceId\\": \\"dsw-123456789\\",\\n \\"ResourceName\\": \\"resource_group\\",\\n \\"Priority\\": 1,\\n \\"RequestedResource\\": {\\n \\"CPU\\": \\"32\\",\\n \\"Memory\\": \\"32\\",\\n \\"SharedMemory\\": \\"32\\",\\n \\"GPU\\": \\"4\\",\\n \\"GPUType\\": \\"NVIDIA A10\\"\\n },\\n \\"Labels\\": [\\n {\\n \\"Key\\": \\"stsTokenOwner\\",\\n \\"Value\\": \\"123xxxxxxxx\\"\\n }\\n ],\\n \\"IdleInstanceCuller\\": {\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"CpuPercentThreshold\\": 20,\\n \\"GpuPercentThreshold\\": 10,\\n \\"MaxIdleTimeInMinutes\\": 60,\\n \\"IdleTimeInMinutes\\": 30\\n },\\n \\"InstanceSnapshotList\\": [\\n {\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageName\\": \\"py36_cpu_tf1.12_ubuntu\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"RepositoryUrl\\": \\"https://cr.console.aliyun.com/repository/cn-hangzhou/zouxu/kf/images\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"Status\\": \\"Pushing\\"\\n }\\n ],\\n \\"CloudDisks\\": [\\n {\\n \\"Capacity\\": \\"30Gi\\",\\n \\"SubType\\": \\"rootfs\\",\\n \\"MountPath\\": \\"/mmt/workspace\\",\\n \\"Path\\": \\"/workspace\\"\\n }\\n ],\\n \\"WorkspaceSource\\": \\"d-123456789\\",\\n \\"Driver\\": \\"535.54.03\\",\\n \\"CredentialConfig\\": {\\n \\"Enable\\": true,\\n \\"AliyunEnvRoleKey\\": \\"0\\",\\n \\"Configs\\": [\\n {\\n \\"Key\\": \\"0\\",\\n \\"Type\\": \\"Role\\",\\n \\"Roles\\": [\\n {\\n \\"RoleArn\\": \\"acs:ram::123******:role/****\\",\\n \\"RoleType\\": \\"service\\",\\n \\"AssumeRoleFor\\": \\"123******\\",\\n \\"Policy\\": \\"{}\\",\\n \\"UserInfo\\": {\\n \\"Id\\": \\"456******\\",\\n \\"Type\\": \\"sub\\",\\n \\"AccessKeyId\\": \\"LT********\\",\\n \\"SecurityToken\\": \\"********\\"\\n }\\n }\\n ]\\n }\\n ]\\n },\\n \\"Affinity\\": {\\n \\"CPU\\": {\\n \\"Enable\\": true\\n }\\n },\\n \\"ImageAuth\\": \\"aGFyYm9yYWlAeGltYWxheWE6KioqKioq\\",\\n \\"Tags\\": [\\n {\\n \\"TagKey\\": \\"tag1\\",\\n \\"TagValue\\": \\"value1\\"\\n }\\n ],\\n \\"DynamicMount\\": {\\n \\"Enable\\": true,\\n \\"MountPoints\\": [\\n {\\n \\"RootPath\\": \\"\\",\\n \\"Options\\": \\"\\"\\n }\\n ]\\n },\\n \\"OversoldType\\": \\"\\",\\n \\"OversoldInfo\\": \\"\\",\\n \\"ServiceConfig\\": {\\n \\"JupyterServerPassword\\": \\"\\",\\n \\"JupyterServerAuth\\": \\"\\",\\n \\"CodeServerPassword\\": \\"\\",\\n \\"CodeServerAuth\\": \\"\\"\\n }\\n }\\n ],\\n \\"MigrationOptions\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n}","type":"json"}]', 'title' => '查询实例列表', ], 'GetInstanceEvents' => [ 'summary' => '获取DSW实例的系统事件。', 'path' => '/api/v2/instances/{InstanceId}/events', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '191013', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '实例ID。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'MaxEventsNum', 'in' => 'query', 'schema' => [ 'description' => '获取事件的最大数目,默认值:2000。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2000', ], ], [ 'name' => 'StartTime', 'in' => 'query', 'schema' => [ 'description' => '查询的起始时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'EndTime', 'in' => 'query', 'schema' => [ 'description' => '查询的结束时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'Token', 'in' => 'query', 'schema' => [ 'description' => '用于分享url', 'type' => 'string', 'required' => false, ], ], [ 'name' => 'EventLevel', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'InstanceEventListResult', 'description' => 'DSW实例的事件列表。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => 'XXX'."\n", ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'None', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400:输入参数错误'."\n" .'- 404:实例不存在'."\n" .'- 200:请求正常', 'type' => 'integer', 'format' => 'int32', 'example' => '200', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'Events' => [ 'title' => '实例事件列表', 'description' => '实例事件列表。', 'type' => 'array', 'items' => [ 'description' => '事件信息内容。', 'type' => 'string', 'example' => 'You are using pip version 9.0.1, however version 20.2.4 is available. ', ], ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"XXX\\\\n\\",\\n \\"Code\\": \\"None\\",\\n \\"HttpStatusCode\\": 200,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"Events\\": [\\n \\"You are using pip version 9.0.1, however version 20.2.4 is available. \\"\\n ]\\n}","type":"json"}]', 'title' => '获取实例的事件列表', ], 'UpdateInstanceLabels' => [ 'summary' => '更新DSW实例的标签,假如标签不存在则新增,假如标签存在则修改。', 'path' => '/api/v2/instances/{InstanceId}/labels', 'methods' => [ 'put', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '228178', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求body。', 'type' => 'object', 'properties' => [ 'Labels' => [ 'title' => '需要更新的标签', 'description' => '需要更新的标签列表。', 'type' => 'array', 'items' => [ 'description' => '用户定义标签。', 'type' => 'object', 'properties' => [ 'Key' => [ 'description' => '用户自定义标签的Key。', 'type' => 'string', 'required' => true, 'example' => 'customLabelKey', ], 'Value' => [ 'description' => '用户自定义标签的Value。', 'type' => 'string', 'required' => true, 'example' => 'labelValue', ], ], 'required' => false, ], 'required' => true, ], ], 'required' => false, ], ], [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => 'DSW实例Id', 'description' => 'DSW实例ID。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => '请求的响应。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\"\\n}","type":"json"}]', 'title' => '更新实例的标签', ], 'DeleteInstanceLabels' => [ 'summary' => '删除DSW实例的标签。', 'path' => '/api/v2/instances/{InstanceId}/labels', 'methods' => [ 'delete', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '228180', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => 'DSW实例Id', 'description' => 'DSW实例ID。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'LabelKeys', 'in' => 'query', 'schema' => [ 'title' => '需要删除的标签的Key,多个标签以半角逗号隔开', 'description' => '需要删除的标签的Key,多个标签以半角逗号隔开。', 'type' => 'string', 'required' => true, 'example' => 'labelKey1,labelKey2,labelKey3', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => '响应结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => '473469C7-AA6F-4DC5-B3DB-A3DC0DE3****', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\\"\\n}","type":"json"}]', 'title' => '删除实例标签', ], 'DeleteInstances' => [ 'summary' => '批量删除实例', 'path' => '/api/v2/batch/instances/delete', 'methods' => [ 'put', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'abilityTreeCode' => '247984', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求body。', 'type' => 'object', 'properties' => [ 'InstanceIds' => [ 'description' => '需要删除的实例ID列表', 'type' => 'array', 'items' => [ 'description' => '需要删除的实例ID', 'type' => 'string', 'required' => false, 'example' => '[\'dsw-13cb3d2e173cb74e\']', ], 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AA527C1A-F259-5E53-A4DD-D0941193F02D', ], 'Success' => [ 'description' => '调用是否成功。', 'type' => 'boolean', 'example' => 'True', ], 'Message' => [ 'description' => '错误信息。', 'type' => 'string', 'example' => 'The instance can not be deleted.', ], 'Code' => [ 'description' => '错误码。', 'type' => 'string', 'example' => 'PermissionError', ], 'HttpStatusCode' => [ 'description' => 'HTTP状态码'."\n" .'。', 'type' => 'integer', 'format' => 'int32', 'example' => '200', ], 'InstanceIds' => [ 'description' => '成功删除的实例ID列表。', 'type' => 'array', 'items' => [ 'description' => '成功删除的实例ID。', 'type' => 'string', 'example' => '[\'dsw-6lo809wgmnfcl9sn34\']', ], ], 'AccessDeniedDetail' => [ 'description' => '权限校验失败详情。', 'type' => 'object', 'example' => '{}', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"AA527C1A-F259-5E53-A4DD-D0941193F02D\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"The instance can not be deleted.\\",\\n \\"Code\\": \\"PermissionError\\",\\n \\"HttpStatusCode\\": 200,\\n \\"InstanceIds\\": [\\n \\"[\'dsw-6lo809wgmnfcl9sn34\']\\"\\n ],\\n \\"AccessDeniedDetail\\": {}\\n}","type":"json"}]', 'title' => '批量删除实例', ], 'StopInstances' => [ 'summary' => '批量停止实例', 'path' => '/api/v2/batch/instances/stop', 'methods' => [ 'put', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'none', 'abilityTreeCode' => '247825', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求body。', 'type' => 'object', 'properties' => [ 'InstanceIds' => [ 'description' => '需要停止的实例ID列表。', 'type' => 'array', 'items' => [ 'description' => '需要停止的实例ID。', 'type' => 'string', 'required' => false, 'example' => '[\'dsw-msq7tjk9kox7v26il3\']', ], 'required' => true, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'description' => '请求是否成功。', 'type' => 'boolean', 'example' => 'True', ], 'Message' => [ 'description' => '返回信息。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'description' => '实例操作结果错误码。', 'type' => 'string', 'example' => 'PermissionError', ], 'HttpStatusCode' => [ 'description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200', ], 'AccessDeniedDetail' => [ 'description' => '访问被拒绝详细信息。', 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', 'example' => '{}', 'description' => '访问被拒绝详细信息。', ], ], 'InstanceIds' => [ 'description' => '被停止的实例ID列表。', 'type' => 'array', 'items' => [ 'description' => '被停止的实例ID。', 'type' => 'string', 'example' => '[\'dsw-fcbhy7b9nseilom7fw\']', ], ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"PermissionError\\",\\n \\"HttpStatusCode\\": 200,\\n \\"AccessDeniedDetail\\": {\\n \\"key\\": \\"{}\\"\\n },\\n \\"InstanceIds\\": [\\n \\"[\'dsw-fcbhy7b9nseilom7fw\']\\"\\n ]\\n}","type":"json"}]', 'title' => '批量停止实例', ], 'GetLifecycle' => [ 'summary' => '获取实例的生命周期。', 'path' => '/api/v2/instances/{InstanceId}/lifecycle', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '158370', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-9698d842b6***', ], ], [ 'name' => 'SessionNumber', 'in' => 'query', 'schema' => [ 'description' => '一个Session为实例从启动到失败或停止的过程,sessionNumber表示实例Session的序号偏移值。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'StartTime', 'in' => 'query', 'schema' => [ 'description' => '查询的起始时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'EndTime', 'in' => 'query', 'schema' => [ 'description' => '查询的结束时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'Limit', 'in' => 'query', 'schema' => [ 'description' => '查询获取的Session数量限制。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'description' => '结果的排序方式,取值如下:'."\n" .'- ASC:按时间升序。'."\n" .'- DESC:按时间降序。', 'type' => 'string', 'required' => false, 'example' => 'DESC', ], ], [ 'name' => 'Token', 'in' => 'query', 'schema' => [ 'description' => '用于分享url', 'type' => 'string', 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'LifecycleResult', 'description' => '生命周期查询结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FC****', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '操作结果信息。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'Lifecycle' => [ 'description' => '获取到的实例生命周期详情。', 'type' => 'array', 'items' => [ 'description' => '生命周期结果列表,每一个子项为一个Session对应的生命周期。', 'type' => 'array', 'items' => [ 'description' => '其中一个Session对应的生命周期详情。', 'type' => 'object', 'properties' => [ 'Status' => [ 'description' => '实例所处的状态。可能值:'."\n" .'- Creating:创建中。'."\n" .'- SaveFailed:实例镜像保存失败。'."\n" .'- Stopped:已停止。'."\n" .'- Failed:实例创建失败。'."\n" .'- ResourceAllocating:资源准备中。'."\n" .'- Stopping:停止中。'."\n" .'- Updating:更新中。'."\n" .'- Saving:保存中。'."\n" .'- Starting:启动中。'."\n" .'- Running:运行中。'."\n" .'- Saved:已保存。'."\n" .'- EnvPreparing:环境准备中。'."\n" .'- ArrearStopping:欠费停机中。'."\n" .'- Arrearge:欠费停机。'."\n" .'- Queuing:排队中。'."\n" .'- Recovering:恢复中。', 'type' => 'string', 'enumValueTitles' => [ 'ArrearStopping' => 'ArrearStopping', 'Creating' => 'Creating', 'SaveFailed' => 'SaveFailed', 'Stopped' => 'Stopped', 'Failed' => 'Failed', 'ResourceAllocating' => 'ResourceAllocating', 'Stopping' => 'Stopping', 'Updating' => 'Updating', 'Saving' => 'Saving', 'Arrearge' => 'Arrearge', 'Queuing' => 'Queuing', 'Recovering' => 'Recovering', 'Starting' => 'Starting', 'Running' => 'Running', 'Saved' => 'Saved', 'EnvPreparing' => 'EnvPreparing', ], 'example' => 'Starting', ], 'ReasonCode' => [ 'description' => '发生某种事件的原因对应的代码。', 'type' => 'string', 'example' => '“”', ], 'ReasonMessage' => [ 'description' => '发生某种事件的原因描述。', 'type' => 'string', 'example' => '“”', ], 'GmtCreateTime' => [ 'description' => '该状态创建的时间,即流转到该状态的时间(GMT)。', 'type' => 'string', 'example' => '2022-10-21T07:27:44Z', ], 'GmtEndTime' => [ 'type' => 'string', ], 'LifecycleId' => [ 'type' => 'string', ], ], ], ], 'example' => '[[{"Status":"Creating","GmtCreateTime":"2022-09-19T22:38:00Z","Reason":"","ReasonCode":""}]]', ], 'TotalCount' => [ 'description' => '查询得到的Session总数。', 'type' => 'integer', 'format' => 'int32', 'example' => '35', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FC****\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"Lifecycle\\": [\\n [\\n {\\n \\"Status\\": \\"Starting\\",\\n \\"ReasonCode\\": \\"“”\\",\\n \\"ReasonMessage\\": \\"“”\\",\\n \\"GmtCreateTime\\": \\"2022-10-21T07:27:44Z\\",\\n \\"GmtEndTime\\": \\"\\",\\n \\"LifecycleId\\": \\"\\"\\n }\\n ]\\n ],\\n \\"TotalCount\\": 35\\n}","type":"json"}]', 'title' => '获取实例生命周期', 'description' => '获取实例的生命周期流转信息,可以获取实例在某个时间点流转到某个状态的详情。', ], 'GetInstanceMetrics' => [ 'path' => '/api/v2/instance/{InstanceId}/metrics', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '152077', 'abilityTreeNodes' => [ 'FEATURElearnTBR2KU', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'MetricType', 'in' => 'query', 'schema' => [ 'description' => '实例指标类型,取值如下:'."\n" .'- GpuCoreUsage:GPU使用率。'."\n" .'- GpuMemoryUsage:GPU Memory使用率。'."\n" .'- CpuCoreUsage:CPU使用率。'."\n" .'- MemoryUsage:Memory使用率。'."\n" .'- NetworkInputRate:网络写入速率。'."\n" .'- NetworkOutputRate:网络写出速率。'."\n" .'- DiskReadRate:磁盘读取速率。'."\n" .'- DiskWriteRate:磁盘写入速率。', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'GpuCoreUsage' => 'GPU使用率', 'NetworkInputRate' => '网络写入速率', 'DiskWriteRate' => '磁盘写入速率', 'CpuCoreUsage' => 'CPU使用率', 'GpuMemoryUsage' => 'GPU Memory使用率', 'NetworkOutputRate' => '网络写出速率', 'DiskReadRate' => '磁盘读取速率', 'MemoryUsage' => 'Memory使用率', ], 'example' => 'GpuCoreUsage', ], ], [ 'name' => 'StartTime', 'in' => 'query', 'schema' => [ 'description' => '获取实例指标的起始时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'EndTime', 'in' => 'query', 'schema' => [ 'description' => '获取实例指标的结束时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'TimeStep', 'in' => 'query', 'schema' => [ 'description' => '指标获取的时间间隔。单位为分钟。', 'type' => 'string', 'required' => false, 'example' => '15m', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'MetricResult', 'description' => '实例指标结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'PodMetrics' => [ 'description' => '实例对应的Pod指标详情。', 'type' => 'array', 'items' => [ 'description' => '实例对应的某个Pod指标详情。', 'type' => 'object', 'properties' => [ 'PodId' => [ 'description' => '实例对应的某个Pod ID。', 'type' => 'string', 'example' => 'dsw-15870-695f44c5bc-hd6xm', ], 'Metrics' => [ 'description' => '实例对应的Pod指标。', 'type' => 'array', 'items' => [ 'description' => '获取到的Pod指标列表。', 'type' => 'object', 'properties' => [ 'Time' => [ 'description' => '该指标对应的时间戳。', 'type' => 'integer', 'format' => 'int64', 'example' => '1670890560', ], 'Value' => [ 'description' => '指标的值。', 'type' => 'number', 'format' => 'float', 'example' => '25.901031', ], ], ], ], ], ], ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"PodMetrics\\": [\\n {\\n \\"PodId\\": \\"dsw-15870-695f44c5bc-hd6xm\\",\\n \\"Metrics\\": [\\n {\\n \\"Time\\": 1670890560,\\n \\"Value\\": 25.901031\\n }\\n ]\\n }\\n ]\\n}","type":"json"}]', 'title' => '获取实例指标', 'summary' => '获取实例运行的资源指标。', ], 'CreateInstanceSnapshot' => [ 'summary' => '创建实例快照。', 'path' => '/api/v2/instances/{InstanceId}/snapshots', 'methods' => [ 'post', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'abilityTreeCode' => '118641', 'abilityTreeNodes' => [ 'FEATURElearnE5ZUBR', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'title' => '实例快照属性', 'description' => '实例快照属性。', 'type' => 'object', 'properties' => [ 'SnapshotName' => [ 'title' => '实例快照名称', 'description' => '实例快照名称。仅支持小写字母、数字和中横线,用于自定义镜像名称展示以及ACR中镜像版本名称。', 'type' => 'string', 'required' => true, 'example' => 'snapshot-v1', ], 'SnapshotDescription' => [ 'title' => '实例快照描述', 'description' => '实例快照描述。', 'type' => 'string', 'required' => false, 'example' => 'snapshot-v1', ], 'ImageUrl' => [ 'title' => '镜像地址', 'description' => '镜像地址。如何获取镜像地址,请参见[ListImages](~~449118~~)。', 'type' => 'string', 'required' => true, 'example' => 'registry.cn-shanghai.aliyuncs.com/test/example:snapshot-v1', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => '用户自定义标签。', 'type' => 'array', 'items' => [ 'description' => '用户定义标签键值对。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '用户定义标签键', 'description' => '用户定义标签键。', 'type' => 'string', 'required' => false, 'example' => 'stsTokenOwner', ], 'Value' => [ 'title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'required' => false, 'example' => '123xxxxxxxx', ], ], 'required' => false, ], 'required' => false, 'example' => '{\'foo\': \'bar\'}', ], 'ExcludePaths' => [ 'title' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件。', 'description' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件。', 'type' => 'array', 'items' => [ 'type' => 'string', 'required' => false, ], 'required' => false, ], 'Overwrite' => [ 'title' => '是否覆盖更新镜像仓库中已存在的镜像 tag。', 'description' => '是否覆盖更新镜像仓库中已存在的镜像 tag。', 'type' => 'boolean', 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'SnapshotId' => [ 'title' => '实例快照Id', 'description' => '实例快照ID。', 'type' => 'string', 'example' => 'snp-05cexxxxxxxxx', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"SnapshotId\\": \\"snp-05cexxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '创建实例快照', ], 'DeleteInstanceSnapshot' => [ 'summary' => '删除实例快照。', 'path' => '/api/v2/instances/{InstanceId}/snapshots/{SnapshotId}', 'methods' => [ 'delete', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'abilityTreeCode' => '118643', 'abilityTreeNodes' => [ 'FEATURElearnE5ZUBR', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'SnapshotId', 'in' => 'path', 'schema' => [ 'title' => '实例快照Id', 'description' => '实例快照ID。如何获取实例快照ID,请参见[ListInstanceSnapshot](~~470434~~)。', 'type' => 'string', 'required' => true, 'example' => 'snp-05cexxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '实例快照详情', 'description' => '实例快照详情。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'SnapshotId' => [ 'title' => '实例快照Id', 'description' => '实例快照ID。', 'type' => 'string', 'example' => 'snp-05cexxxxxxxxx', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"SnapshotId\\": \\"snp-05cexxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '删除实例快照', ], 'GetInstanceSnapshot' => [ 'summary' => '调用GetInstanceSnapshot,获取用户实例快照。', 'path' => '/api/v2/instances/{InstanceId}/snapshots/{SnapshotId}', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '118644', 'abilityTreeNodes' => [ 'FEATURElearnE5ZUBR', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'SnapshotId', 'in' => 'path', 'schema' => [ 'title' => '实例快照Id', 'description' => '实例快照ID。如何获取实例快照ID,请参见[ListInstanceSnapshot](~~470434~~)。', 'type' => 'string', 'required' => true, 'example' => 'snp-05cexxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '实例快照详情', 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'SnapshotId' => [ 'title' => '实例快照Id', 'description' => '实例快照ID。', 'type' => 'string', 'example' => 'snp-05cexxxxxxxxx', ], 'SnapshotName' => [ 'title' => '实例快照名称', 'description' => '实例快照名称。', 'type' => 'string', 'example' => 'training_data_env', ], 'Status' => [ 'title' => '实例快照状态', 'description' => '实例快照状态。', 'type' => 'string', 'example' => 'Pushing', ], 'ImageId' => [ 'title' => '实例快照的镜像Id', 'description' => '实例快照的镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageUrl' => [ 'title' => '实例快照的镜像地址', 'description' => '实例快照的镜像地址。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'ReasonCode' => [ 'title' => '实例快照错误代码', 'description' => '实例快照错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例快照错误消息', 'description' => '实例快照错误消息。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'GmtCreateTime' => [ 'title' => '实例快照创建时间', 'description' => '实例快照创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '实例快照修改时间', 'description' => '实例快照修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => '用户自定义标签', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '用户定义标签键', 'description' => '用户定义标签键', 'type' => 'string', 'example' => 'stsTokenOwner', ], 'Value' => [ 'title' => '用户定义标签值', 'description' => '用户定义标签值', 'type' => 'string', 'example' => '123xxxxxxxx', ], ], ], 'example' => '{\'foo\': \'bar\'}', ], 'ExcludePaths' => [ 'title' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件', 'description' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件', 'type' => 'array', 'items' => [ 'type' => 'string', ], ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"SnapshotId\\": \\"snp-05cexxxxxxxxx\\",\\n \\"SnapshotName\\": \\"training_data_env\\",\\n \\"Status\\": \\"Pushing\\",\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"Labels\\": [\\n {\\n \\"Key\\": \\"stsTokenOwner\\",\\n \\"Value\\": \\"123xxxxxxxx\\"\\n }\\n ],\\n \\"ExcludePaths\\": [\\n \\"\\"\\n ]\\n}","type":"json"}]', 'title' => '获取实例快照', ], 'ListInstanceSnapshot' => [ 'summary' => '查询实例快照列表。', 'path' => '/api/v2/instances/{InstanceId}/snapshots', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '实例快照列表的页码。起始值为1,默认为1。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'default' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'description' => '分页查询时设置的每页显示的实例快照列表数量,默认为10。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10', 'default' => '10', ], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'description' => '按排序字段gmtCreae排序。', 'type' => 'string', 'required' => false, 'example' => 'gmtCreate', 'default' => 'gmtCreate', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'description' => '排列顺序,取值如下:'."\n" .'- Desc: 降序排列。'."\n" .'- Asc: 升序排列。', 'type' => 'string', 'required' => false, 'example' => 'DESC', 'default' => 'DESC', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '实例快照列表', 'description' => '实例快照列表。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'TotalCount' => [ 'title' => '实例总数', 'description' => '实例总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '35', ], 'Snapshots' => [ 'title' => '本分页中请求的实例镜像列表', 'description' => '本分页中请求的实例镜像列表。', 'type' => 'array', 'items' => [ 'description' => '实例快照对象', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'SnapshotId' => [ 'title' => '实例快照Id', 'description' => '实例快照ID。', 'type' => 'string', 'example' => 'snp-05cexxxxxxxxx', ], 'SnapshotName' => [ 'title' => '实例快照名称', 'description' => '实例快照名称。', 'type' => 'string', 'example' => 'training_data_env', ], 'Status' => [ 'title' => '实例快照状态', 'description' => '实例快照状态。', 'type' => 'string', 'example' => 'Pushing', ], 'ImageId' => [ 'title' => '实例快照的镜像Id', 'description' => '实例快照的镜像ID。', 'type' => 'string', 'example' => 'image-05cefd0be2exxxx', ], 'ImageUrl' => [ 'title' => '实例快照的镜像地址', 'description' => '实例快照的镜像地址。', 'type' => 'string', 'example' => 'registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu', ], 'ReasonCode' => [ 'title' => '实例快照错误代码', 'description' => '实例快照错误代码。', 'type' => 'string', 'example' => 'Internal Error', ], 'ReasonMessage' => [ 'title' => '实例快照错误消息', 'description' => '实例快照错误消息。', 'type' => 'string', 'example' => 'ImagePullBackOff', ], 'GmtCreateTime' => [ 'title' => '实例快照创建时间', 'description' => '实例快照创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '实例快照修改时间', 'description' => '实例快照修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => '用户自定义标签。', 'type' => 'array', 'items' => [ 'description' => '用户定义标签键值对。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '用户定义标签键', 'description' => '用户定义标签键。', 'type' => 'string', 'example' => 'stsTokenOwner', ], 'Value' => [ 'title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'example' => '123xxxxxxxx', ], ], ], 'example' => '{\'foo\': \'bar\'}', ], 'ExcludePaths' => [ 'title' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件', 'description' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件', 'type' => 'array', 'items' => [ 'type' => 'string', ], 'example' => '["/path1","/path2"]', ], ], ], ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"TotalCount\\": 35,\\n \\"Snapshots\\": [\\n {\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"SnapshotId\\": \\"snp-05cexxxxxxxxx\\",\\n \\"SnapshotName\\": \\"training_data_env\\",\\n \\"Status\\": \\"Pushing\\",\\n \\"ImageId\\": \\"image-05cefd0be2exxxx\\",\\n \\"ImageUrl\\": \\"registry.cn-shanghai.aliyuncs.com/pai_product/tensorflow:py36_cpu_tf1.12_ubuntu\\",\\n \\"ReasonCode\\": \\"Internal Error\\",\\n \\"ReasonMessage\\": \\"ImagePullBackOff\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"Labels\\": [\\n {\\n \\"Key\\": \\"stsTokenOwner\\",\\n \\"Value\\": \\"123xxxxxxxx\\"\\n }\\n ],\\n \\"ExcludePaths\\": [\\n \\"\\"\\n ]\\n }\\n ]\\n}","type":"json"}]', 'title' => '查询实例快照列表', ], 'GetResourceGroupStatistics' => [ 'path' => '/api/v2/resourcegroupstatistics', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '166697', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'WorkspaceIds', 'in' => 'query', 'schema' => [ 'description' => '工作空间ID列表,多个ID间使用半角逗号(,)分隔。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '27218,34956', ], ], [ 'name' => 'ResourceId', 'in' => 'query', 'schema' => [ 'description' => '资源组ID,唯一标识客户的资源组(机器组)。', 'type' => 'string', 'required' => true, 'example' => 'rg-123456789', ], ], [ 'name' => 'StartTime', 'in' => 'query', 'schema' => [ 'description' => '统计开始时间。', 'type' => 'string', 'required' => true, 'example' => '2020-11-08T15:00:00Z', ], ], [ 'name' => 'EndTime', 'in' => 'query', 'schema' => [ 'description' => '统计结束时间。', 'type' => 'string', 'required' => true, 'example' => '2020-11-08T15:00:00Z', ], ], ], 'responses' => [ 200 => [ 'headers' => [], 'schema' => [ 'title' => 'ResourceGroupStatisticsResult', 'description' => '资源组统计信息。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'InternalError', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" ."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => '400', ], 'Statistics' => [ 'title' => '统计信息', 'description' => '统计信息。', 'type' => 'object', 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'integer', 'format' => 'int64', 'example' => '5', 'description' => '统计值。', ], 'description' => '- 运行中的DSW任务:Running:3。'."\n" .'- 被停止的DSW任务:Stopped:4。', ], ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"InternalError\\",\\n \\"HttpStatusCode\\": 400,\\n \\"Statistics\\": {\\n \\"key\\": {\\n \\"key\\": 5\\n }\\n }\\n}","type":"json"}]', 'title' => '获取资源组统计信息', 'summary' => '资源组是特定用户。在使用PAI产品前,预先购买的一组机器资源;这些机器资源专属于此客户,不会被其他客户分享。用户后续的PAI计算任务,或算法开发环境,将运行在这组机器上。此功能用于统计在指定资源组上,运行的 DSW 实例(算法开发环境)的当前和历史运行状态(成功,失败,停止等等),以帮助用户了解在资源组内运行任务的历史状态,更有效率的利用资源组内的机器资源。', 'description' => '输入用户的工作空间ID和资源组ID,以及统计时间区间,就可获取在指定工作空间和资源组下DSW实例运行状态统计数据。', ], 'ListInstanceStatistics' => [ 'summary' => '获取实例统计信息。', 'path' => '/api/v2/instancestatistics', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '118645', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'WorkspaceIds', 'in' => 'query', 'schema' => [ 'title' => '工作空间列表', 'description' => '工作空间ID列表。多个ID间使用半角逗号(,)分隔。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '27218,34956', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '实例统计信息', 'description' => '实例统计信息。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'InternalError', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => '400', ], 'Statistics' => [ 'title' => '统计信息', 'description' => '统计信息。', 'type' => 'object', 'additionalProperties' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'integer', 'format' => 'int64', 'example' => '5', 'description' => '统计值。', ], 'description' => '某项统计信息:RunningCount:3。', ], ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"InternalError\\",\\n \\"HttpStatusCode\\": 400,\\n \\"Statistics\\": {\\n \\"key\\": {\\n \\"key\\": 5\\n }\\n }\\n}","type":"json"}]', 'title' => '获取实例统计信息', ], 'CreateInstanceShutdownTimer' => [ 'summary' => '调用CreateInstanceShutdownTimer,创建实例定时关机任务。', 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', 'methods' => [ 'post', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'abilityTreeCode' => '118640', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '定时关机任务对应实例的Id', 'description' => '定时关机任务对应实例的ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'title' => '定时关机属性', 'description' => '定时关机属性。', 'type' => 'object', 'properties' => [ 'DueTime' => [ 'title' => '定时关机设定时间', 'description' => '定时关机设定时间。', 'type' => 'string', 'required' => false, 'example' => '2021-01-12T14:36:01Z', ], 'RemainingTimeInMs' => [ 'title' => '距离定时关机时间段', 'description' => '距离定时关机的时间段,单位为毫秒。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '3600000', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '创建实例定时关机任务', ], 'DeleteInstanceShutdownTimer' => [ 'summary' => '删除实例定时关机任务。', 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', 'methods' => [ 'delete', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'abilityTreeCode' => '118638', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '执行结果', 'description' => '执行结果', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '删除实例定时关机任务', ], 'GetInstanceShutdownTimer' => [ 'summary' => '获取实例定时关机任务详情。', 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '118639', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '定时关机任务', 'description' => '定时关机任务。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'InstanceId' => [ 'title' => '实例Id', 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'GmtCreateTime' => [ 'title' => '创建时间', 'description' => '创建时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'GmtModifiedTime' => [ 'title' => '修改时间', 'description' => '修改时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'DueTime' => [ 'title' => '设定关机时间', 'description' => '设定关机时间。', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z', ], 'RemainingTimeInMs' => [ 'title' => '剩余关机时间(ms)', 'description' => '剩余关机时间,单位为毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '3600000', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"DueTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"RemainingTimeInMs\\": 3600000\\n}","type":"json"}]', 'title' => '获取实例定时关机任务详情', ], 'CreateIdleInstanceCuller' => [ 'path' => '/api/v2/instances/{InstanceId}/idleinstanceculler', 'methods' => [ 'post', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'abilityTreeCode' => '154060', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '设定自动关机的实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求body。', 'type' => 'object', 'properties' => [ 'CpuPercentThreshold' => [ 'description' => 'CPU使用率阈值,单位是百分比,取值1~100,低于此值则认为实例当前处于闲置。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20', ], 'GpuPercentThreshold' => [ 'description' => 'GPU使用率阈值,单位是百分比,取值1~100。如果实例为GPU类型,则此参数生效。CPU和GPU同时低于阈值则认为指定实例处于闲置。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], 'MaxIdleTimeInMinutes' => [ 'description' => '闲置等待时间阈值,单位是分钟。如果闲置时长超过此值,将自动停止DSW实例。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '60', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'IdleInstanceCullerIdResult', 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'enumValueTitles' => [ 'true' => 'true', 'false' => 'false', ], 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '错误信息。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'InstanceId' => [ 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '创建闲置实例自动关机策略', 'summary' => '创建指定实例的自动关机策略,满足条件时将自动停止DSW实例。一个DSW实例只支持创建一个闲置自动关机策略,如果指定实例已设定过闲置自动关机策略,请先调用DeleteIdleInstanceCuller将其删除。', ], 'DeleteIdleInstanceCuller' => [ 'path' => '/api/v2/instances/{InstanceId}/idleinstanceculler', 'methods' => [ 'delete', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'abilityTreeCode' => '154058', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'IdleInstanceCullerIdResult', 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FC****', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'enumValueTitles' => [ 'true' => 'true', 'false' => 'false', ], 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '操作结果信息。'."\n" .'- 执行成功时,返回结果为null。'."\n" .'- 执行失败时,描述失败原因。', 'type' => 'string', 'example' => 'null', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'ValidationError', ], 'InstanceId' => [ 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FC****\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"null\\",\\n \\"Code\\": \\"ValidationError\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', 'title' => '删除实例闲置关机策略', 'summary' => '删除实例闲置关机策略。', ], 'GetIdleInstanceCuller' => [ 'path' => '/api/v2/instances/{InstanceId}/idleinstanceculler', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '154059', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'IdleInstanceCullerResult', 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'enumValueTitles' => [ 'true' => 'true', 'false' => 'false', ], 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '错误信息。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'ValidationError', ], 'InstanceId' => [ 'description' => '实例ID。', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'CpuPercentThreshold' => [ 'description' => 'CPU使用率阈值,单位是百分比,取值1~100,低于此值则认为实例当前处于闲置。', 'type' => 'integer', 'format' => 'int32', 'example' => '20', ], 'GpuPercentThreshold' => [ 'description' => 'GPU使用率阈值,单位是百分比,取值1~100。如果实例为GPU类型,则此参数生效。CPU和GPU同时低于阈值则认为指定实例处于闲置。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'MaxIdleTimeInMinutes' => [ 'description' => '闲置等待时间阈值,单位是分钟。如果闲置时长超过此值,将自动停止DSW实例。', 'type' => 'integer', 'format' => 'int32', 'example' => '60', ], 'IdleTimeInMinutes' => [ 'description' => '实例当前闲置时长,单位是分钟。', 'type' => 'integer', 'format' => 'int32', 'example' => '30', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"ValidationError\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"CpuPercentThreshold\\": 20,\\n \\"GpuPercentThreshold\\": 10,\\n \\"MaxIdleTimeInMinutes\\": 60,\\n \\"IdleTimeInMinutes\\": 30\\n}","type":"json"}]', 'title' => '获取闲置实例自动关机策略', 'summary' => '获取指定实例的闲置自动关机策略。', ], 'ListEcsSpecs' => [ 'summary' => '获取ECS规格列表。', 'path' => '/api/v2/ecsspecs', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '118542', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [ [ 'name' => 'AcceleratorType', 'in' => 'query', 'schema' => [ 'title' => '加速类型', 'description' => '加速器类型。 '."\n" .'- CPU:无计算加速,只使用CPU计算。'."\n" .'- GPU:使用GPU进行计算加速。', 'type' => 'string', 'required' => true, 'example' => 'CPU', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'title' => '页数', 'description' => 'ECS规格列表的页码。起始值为1,默认为1。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'default' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'title' => '每页大小', 'description' => '分页查询时设置的每页显示的EC规格数量。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10', 'default' => '10', ], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'title' => '排序字段', 'description' => '该字段已废弃,不要使用。', 'type' => 'string', 'required' => false, 'example' => 'gmtCreate', 'default' => 'gmtCreate', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'title' => '排序顺序', 'description' => '排序顺序。取值如下:'."\n" .'- ASC:升序。'."\n" .'- DESC:降序。', 'type' => 'string', 'required' => false, 'example' => 'DESC', 'default' => 'DESC', ], ], [ 'name' => 'ResourceType', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'ECS规格列表', 'description' => 'ECS规格列表。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], 'TotalCount' => [ 'title' => '实例总数', 'description' => '实例总数。', 'type' => 'integer', 'format' => 'int64', 'example' => '35', ], 'EcsSpecs' => [ 'title' => '本分页中请求的实例列表', 'description' => '本分页中请求的实例列表。', 'type' => 'array', 'items' => [ 'description' => 'Ecs规格。', 'type' => 'object', 'properties' => [ 'InstanceType' => [ 'title' => '实例规格', 'description' => '实例规格。', 'type' => 'string', 'example' => 'ecs.gn5-c28g1.7xlarge', ], 'GPUType' => [ 'title' => '显卡类型', 'description' => '显卡类型。可能值:'."\n" .'- V100'."\n" .'- A100'."\n" .'- A10'."\n" .'- T4'."\n" .'- P100', 'type' => 'string', 'example' => 'v100', ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。', 'type' => 'integer', 'format' => 'int64', 'example' => '32', ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。', 'type' => 'integer', 'format' => 'int64', 'example' => '4', ], 'Memory' => [ 'title' => '内存大小(GB)', 'description' => '内存大小(GB)。', 'type' => 'number', 'format' => 'float', 'example' => '32', ], 'SystemDiskCapacity' => [ 'title' => '系统盘大小(GB)', 'description' => '系统盘大小(GB)。', 'type' => 'integer', 'format' => 'int64', 'example' => '500', ], 'AcceleratorType' => [ 'title' => '资源类型', 'description' => '资源类型。', 'type' => 'string', 'example' => 'CPU', ], 'Price' => [ 'title' => '价格', 'description' => '价格。', 'type' => 'number', 'format' => 'double', 'example' => '22.8', ], 'Currency' => [ 'title' => '货币单位', 'description' => '货币单位。', 'type' => 'string', 'example' => 'CNY', ], 'InstanceBandwidthRx' => [ 'title' => '实例接收带宽', 'description' => '实例接收带宽。', 'type' => 'integer', 'format' => 'int64', 'example' => '5120000', ], 'Labels' => [ 'title' => '用户自定义标签', 'description' => 'ECS规格标签列表。', 'type' => 'array', 'items' => [ 'description' => '标签。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => 'Ecs规格标签键', 'description' => 'ECS规格标签键。', 'type' => 'string', 'example' => 'SupportResourcePackDeduction', ], 'Value' => [ 'description' => 'ECS规格标签值。', 'type' => 'string', 'example' => 'true', ], ], ], 'example' => '{\'foo\': \'bar\'}', ], 'IsAvailable' => [ 'title' => '资源是否可用', 'description' => '资源是否可用', 'type' => 'boolean', 'example' => 'True', 'default' => 'true', ], 'GPUMemorySize' => [ 'type' => 'number', 'format' => 'float', ], 'SpotStockStatus' => [ 'type' => 'string', ], ], ], ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0,\\n \\"TotalCount\\": 35,\\n \\"EcsSpecs\\": [\\n {\\n \\"InstanceType\\": \\"ecs.gn5-c28g1.7xlarge\\",\\n \\"GPUType\\": \\"v100\\",\\n \\"CPU\\": 32,\\n \\"GPU\\": 4,\\n \\"Memory\\": 32,\\n \\"SystemDiskCapacity\\": 500,\\n \\"AcceleratorType\\": \\"CPU\\",\\n \\"Price\\": 22.8,\\n \\"Currency\\": \\"CNY\\",\\n \\"InstanceBandwidthRx\\": 5120000,\\n \\"Labels\\": [\\n {\\n \\"Key\\": \\"SupportResourcePackDeduction\\",\\n \\"Value\\": \\"true\\"\\n }\\n ],\\n \\"IsAvailable\\": true,\\n \\"GPUMemorySize\\": 0,\\n \\"SpotStockStatus\\": \\"\\"\\n }\\n ]\\n}","type":"json"}]', 'title' => '获取ECS规格列表', ], 'GetUserConfig' => [ 'summary' => '调用GetUserConfig,查询用户信息。', 'path' => '/api/v2/userconfig', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'abilityTreeCode' => '118609', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], ], 'parameters' => [], 'responses' => [ 200 => [ 'schema' => [ 'title' => '用户配置', 'description' => '用户配置。', 'type' => 'object', 'properties' => [ 'AccountSufficient' => [ 'title' => '用户账号金额是否充足', 'description' => '用户账号金额是否充足。', 'type' => 'boolean', 'example' => 'false', ], 'FreeTierSpecAvailable' => [ 'title' => '是否可以购买free tier规格的实例', 'description' => '是否可以购买free tier规格的实例。', 'type' => 'boolean', 'example' => 'true', ], 'FreeTier' => [ 'title' => 'free tier属性', 'description' => 'free tier属性。', 'type' => 'object', 'properties' => [ 'IsFreeTierUser' => [ 'title' => '是否是free tier用户', 'description' => '是否是free tier用户。', 'type' => 'boolean', 'example' => 'true', ], 'StartTime' => [ 'title' => 'free tier开始时间', 'description' => 'free tier开始时间。', 'type' => 'string', 'example' => '2020-11-08T15:00:00Z', ], 'EndTime' => [ 'title' => 'free tier结束时间', 'description' => 'free tier结束时间。', 'type' => 'string', 'example' => '2020-11-08T15:00:00Z', ], 'Status' => [ 'title' => 'free tier状态,有效或者无效', 'description' => 'free tier状态,有效或者无效。', 'type' => 'string', 'example' => 'valid', ], 'InitBaseValue' => [ 'title' => 'free tier,资源初始值', 'description' => 'free tier,资源初始值。', 'type' => 'number', 'format' => 'double', 'example' => '5000', ], 'InitShowValue' => [ 'title' => 'free tier,资源初始显示值', 'description' => 'free tier,资源初始显示值。', 'type' => 'string', 'example' => '5000', ], 'InitBaseUnit' => [ 'title' => 'free tier,资源初始值单位', 'description' => 'free tier,资源初始值单位。', 'type' => 'string', 'example' => '个', ], 'InitShowUnit' => [ 'title' => 'free tier,资源初始显示单位', 'description' => 'free tier,资源初始显示单位。', 'type' => 'string', 'example' => '个', ], 'PeriodBaseValue' => [ 'title' => 'free tier,资源当前值', 'description' => 'free tier,资源当前值。', 'type' => 'number', 'format' => 'double', 'example' => '3000', ], 'PeriodShowValue' => [ 'title' => 'free tier,资源当前显示值', 'description' => 'free tier,资源当前显示值。', 'type' => 'string', 'example' => '3000', ], 'PeriodBaseUnit' => [ 'title' => 'free tier,资源当前值单位', 'description' => 'free tier,资源当前值单位。', 'type' => 'string', 'example' => '个', ], 'PeriodShowUnit' => [ 'title' => 'free tier, 资源当前显示单位', 'description' => 'free tier, 资源当前显示单位。', 'type' => 'string', 'example' => '个', ], ], ], 'EnableEciDisk' => [ 'title' => '是否打开eciDisk', 'description' => '是否打开eciDisk。', 'type' => 'boolean', 'example' => 'true', ], 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '返回结果说明。', 'type' => 'string', 'example' => '"Access denied"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'null', ], 'HttpStatusCode' => [ 'title' => 'http状态码', 'description' => 'HTTP状态码,可能值:'."\n" .'- 400'."\n" .'- 404', 'type' => 'integer', 'format' => 'int32', 'example' => 'null', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"AccountSufficient\\": false,\\n \\"FreeTierSpecAvailable\\": true,\\n \\"FreeTier\\": {\\n \\"IsFreeTierUser\\": true,\\n \\"StartTime\\": \\"2020-11-08T15:00:00Z\\",\\n \\"EndTime\\": \\"2020-11-08T15:00:00Z\\",\\n \\"Status\\": \\"valid\\",\\n \\"InitBaseValue\\": 5000,\\n \\"InitShowValue\\": \\"5000\\",\\n \\"InitBaseUnit\\": \\"个\\",\\n \\"InitShowUnit\\": \\"个\\",\\n \\"PeriodBaseValue\\": 3000,\\n \\"PeriodShowValue\\": \\"3000\\",\\n \\"PeriodBaseUnit\\": \\"个\\",\\n \\"PeriodShowUnit\\": \\"个\\"\\n },\\n \\"EnableEciDisk\\": true,\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"Access denied\\\\\\"\\",\\n \\"Code\\": \\"null\\",\\n \\"HttpStatusCode\\": 0\\n}","type":"json"}]', 'title' => '查询用户信息', ], 'CreateDiagnosis' => [ 'summary' => '诊断实例问题', 'path' => '/api/v2/diagnoses', 'methods' => [ 'post', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '195184', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'title' => '分享信息', 'description' => '诊断输入。', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'title' => '分享文件名称', 'description' => '实例ID。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'dsw-5bk19******n97w', ], 'ProblemCategory' => [ 'title' => '分享文件版本', 'description' => '问题分类,目前支持如下值:'."\n" ."\n" .'- InstanceStartFailed 实例失败'."\n" .'- SshConnectFailed Ssh连接失败', 'type' => 'string', 'required' => true, 'example' => 'InstanceStartFailed', ], 'GmtFailureTime' => [ 'description' => '待诊断实例出问题时间。', 'type' => 'string', 'format' => 'iso8601_normal', 'required' => false, 'example' => '2021-01-12T14:36:01Z', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '分享结果', 'description' => '实例诊断结果。', 'type' => 'object', 'properties' => [ 'ReasonCode' => [ 'title' => '分享文件名称', 'description' => '错误代码'."\n" ."\n" .'- 如果为Unknown,代表未知错误'."\n" .'- 如果为空,代表没找到问题', 'type' => 'string', 'example' => 'Resource.InsufficientResource', ], 'SolutionMessage' => [ 'title' => '分享文件版本', 'description' => '解决方案。', 'type' => 'string', 'example' => 'Switch resource config', ], 'ReasonMessage' => [ 'title' => '分享资源链接', 'description' => '错误原因。', 'type' => 'string', 'example' => 'Insufficient resource', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"ReasonCode\\": \\"Resource.InsufficientResource\\",\\n \\"SolutionMessage\\": \\"Switch resource config\\",\\n \\"ReasonMessage\\": \\"Insufficient resource\\"\\n}","type":"json"}]', 'title' => '诊断实例问题', ], 'GetToken' => [ 'summary' => '获取指定DSW实例的临时鉴权信息。', 'path' => '/api/v2/tokens', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '147022', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'query', 'schema' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'ExpireTime', 'in' => 'query', 'schema' => [ 'description' => '过期时间,单位为秒。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '60', ], ], [ 'name' => 'Type', 'in' => 'query', 'schema' => [ 'description' => '签发的token类型'."\n" .'* Access : 用于进入DSW实例内部执行操作。具备操作权限。'."\n" .'* View:用于只读分享 DSW 实例信息(如状态、配置、日志等),不具备修改或控制权限,适用于协作者或外部查看者。', 'type' => 'string', 'required' => false, 'example' => 'Access', 'default' => 'Access', 'enum' => [ 'Access', 'View', ], ], ], [ 'name' => 'Audience', 'in' => 'query', 'schema' => [ 'description' => 'Audience 用于指定 Token 的预期持有者(即使用方)。'."\n" .'当您通过自建 Web 应用接入 DSW页面 时,请将 audience 设置为 ThirdParty。', 'type' => 'string', 'required' => false, 'example' => 'Aliyun', 'default' => 'Aliyun', 'enum' => [ 'Aliyun', 'ThirdParty', ], ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'TokenResult', 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求Id', 'description' => '请求ID。', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', ], 'Success' => [ 'title' => '成功标志', 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'enumValueTitles' => [ 'true' => 'true', 'false' => 'false', ], 'example' => 'true', ], 'Message' => [ 'title' => '说明', 'description' => '错误信息。', 'type' => 'string', 'example' => '"XXX"', ], 'Code' => [ 'title' => '状态码', 'description' => '状态码,可能值:'."\n" .'- InternalError:内部错误(除了参数验证错误外的其他错误,目前都归类到内部错误)。'."\n" .'- ValidationError:参数验证错误。', 'type' => 'string', 'example' => 'ValidationError', ], 'Token' => [ 'title' => 'token', 'description' => '访问DSW实例的临时鉴权信息。', 'type' => 'string', 'example' => '*******', ], ], ], ], ], 'eventInfo' => [ 'enable' => false, 'eventNames' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"ValidationError\\",\\n \\"Token\\": \\"*******\\"\\n}","type":"json"}]', 'title' => '获取实例临时鉴权信息', ], 'GetMetrics' => [ 'summary' => '获取实例的Metrics指标。', 'path' => '/api/v2/instance/{InstanceId}/cms/metrics', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '223121', 'abilityTreeNodes' => [ 'FEATURElearnTBR2KU', ], ], 'parameters' => [ [ 'name' => 'Namespace', 'in' => 'query', 'schema' => [ 'description' => '(必填)指标保存的云监控的空间。', 'type' => 'string', 'required' => false, 'example' => 'acs_pai_dsw', ], ], [ 'name' => 'InstanceId', 'in' => 'path', 'schema' => [ 'description' => '(必填)DSW 实例 ID。', 'type' => 'string', 'required' => false, 'example' => 'dsw-328d2bbf605*****', ], ], [ 'name' => 'Dimensions', 'in' => 'query', 'schema' => [ 'description' => '(必填)请求参数。', 'type' => 'string', 'required' => false, 'example' => '{"userId":"16122852825*****","jobId":"dsw-328d2bbf605*****","regionId":"cn-wulanchabu","pod":"dsw-45680-76766f8778-95gxh"}', ], ], [ 'name' => 'Length', 'in' => 'query', 'schema' => [ 'description' => '每一页显示的最大记录数,不超过1440。', 'type' => 'string', 'required' => false, 'example' => '10', ], ], [ 'name' => 'EndTime', 'in' => 'query', 'schema' => [ 'description' => '截止时间,默认是当前。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T16:00:00Z', ], ], [ 'name' => 'Period', 'in' => 'query', 'schema' => [ 'description' => '时间间隔。', 'type' => 'string', 'required' => false, 'example' => '60', ], ], [ 'name' => 'NextToken', 'in' => 'query', 'schema' => [ 'description' => '分页游标标识。', 'type' => 'string', 'required' => false, 'example' => '15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****', ], ], [ 'name' => 'MetricName', 'in' => 'query', 'schema' => [ 'description' => '(必填)监控指标的名字。请参考 [指标名字](https://cms.console.aliyun.com/metric-meta/acs_pai_dsw/dsw)', 'type' => 'string', 'required' => false, 'example' => 'INSTANCE_SPEC_MEMORY_SWAP', ], ], [ 'name' => 'StartTime', 'in' => 'query', 'schema' => [ 'description' => '起始时间,默认是1小时前。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'NextToken' => [ 'title' => 'Id of the request', 'description' => '分页游标标识。', 'type' => 'string', 'example' => '15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****', ], 'Success' => [ 'description' => '请求是否成功。', 'type' => 'boolean', 'example' => 'true', ], 'Datapoints' => [ 'description' => '指标的数据点', 'type' => 'string', 'example' => '[{\'timestamp\': 1740452220000, \'jobId\': \'dsw-94ed9f9********\', \'pod\': \'dsw-871***-764fdf******\', \'regionId\': \'cn-hangzhou\', \'userId\': \'1042612********\', \'workspaceId\': \'1445***\', \'Value\': 0.0}]', ], 'Code' => [ 'description' => '请求代码。', 'type' => 'string', 'example' => '200', ], 'Message' => [ 'description' => '请求信息。', 'type' => 'string', 'example' => 'Succeed', ], 'Period' => [ 'description' => '时间间隔。', 'type' => 'string', 'example' => '60', ], 'RequestId' => [ 'description' => '请求ID。', 'type' => 'string', 'example' => '473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"NextToken\\": \\"15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****\\",\\n \\"Success\\": true,\\n \\"Datapoints\\": \\"[{\'timestamp\': 1740452220000, \'jobId\': \'dsw-94ed9f9********\', \'pod\': \'dsw-871***-764fdf******\', \'regionId\': \'cn-hangzhou\', \'userId\': \'1042612********\', \'workspaceId\': \'1445***\', \'Value\': 0.0}]\\",\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Succeed\\",\\n \\"Period\\": \\"60\\",\\n \\"RequestId\\": \\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\\"\\n}","type":"json"}]', 'title' => '获取指标', ], 'GetUserCommand' => [ 'summary' => '获取用户自定义命令。', 'path' => '/api/v2/usercommands/{UserCommandId}', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], [ 'APP' => [], ], ], 'consumes' => [], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '273001', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'UserCommandId', 'in' => 'path', 'schema' => [ 'description' => '用户自定义命令的ID。可通过GetInstance等接口获取。', 'type' => 'string', 'required' => false, 'example' => '1900', ], ], [ 'name' => 'InstanceId', 'in' => 'query', 'schema' => [ 'description' => 'DSW实例ID,填写此项用于查找与该实例绑定的UserCommand。传入该选项会覆盖UserCommandId的设置。', 'type' => 'string', 'required' => false, 'example' => 'dsw-dlsd0fskn193213xxx', ], ], [ 'name' => 'Token', 'in' => 'query', 'schema' => [ 'description' => '使用GetToken接口签发的Token访问UserCommand。', 'type' => 'string', 'required' => false, 'example' => 'eyJhbGci......', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'UserCommandId' => [ 'description' => '用户自定义命令的ID。', 'type' => 'string', 'example' => '1900', ], 'OnStart' => [ 'description' => '自定义启动命令,每次实例启动时会执行。', 'type' => 'object', 'properties' => [ 'Content' => [ 'description' => '具体的自定义启动命令内容。', 'type' => 'string', 'example' => 'apt update', ], ], ], 'Message' => [ 'description' => '返回结果说明。', 'type' => 'string', 'example' => 'null', ], 'Code' => [ 'description' => '状态码,可能值:'."\n" .'- null: 请求成功。'."\n" .'- ValidationError:参数验证错误。'."\n" .'- InternalError:系统内部错误。', 'type' => 'string', 'example' => 'ValidationError', ], 'RequestId' => [ 'description' => '请求ID。', 'type' => 'string', 'example' => 'BEBDF2EE-642E-5992-8907-D2011A7ACEFE', ], 'Success' => [ 'description' => '成功标志,可能值:'."\n" .'- true'."\n" .'- false', 'type' => 'boolean', 'example' => 'true', ], 'accessDeniedDetail' => [ 'description' => '访问拒绝详细信息,在因RAM无权限拒绝用户访问的场景返回。', 'type' => 'object', 'example' => '"AccessDeniedDetail": {'."\n" .' "PolicyType": "AccountLevelIdentityBasedPolicy",'."\n" .' "AuthPrincipalOwnerId": "xxx",'."\n" .' "EncodedDiagnosticMessage": "AQIBIAAAA....bwhg==",'."\n" .' "AuthPrincipalType": "SubUser",'."\n" .' "AuthPrincipalDisplayName": "xxx",'."\n" .' "NoPermissionType": "ImplicitDeny",'."\n" .' "AuthAction": "ram:GetUserCommand"'."\n" .' }', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"UserCommandId\\": \\"1900\\",\\n \\"OnStart\\": {\\n \\"Content\\": \\"apt update\\"\\n },\\n \\"Message\\": \\"null\\",\\n \\"Code\\": \\"ValidationError\\",\\n \\"RequestId\\": \\"BEBDF2EE-642E-5992-8907-D2011A7ACEFE\\",\\n \\"Success\\": true,\\n \\"accessDeniedDetail\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n}","type":"json"}]', 'title' => '获取用户自定义命令', ], 'ListSystemLogs' => [ 'summary' => '获取系统日志(待下线,请不要使用)', 'path' => '/api/v2/systemlogs', 'methods' => [ 'get', ], 'schemes' => [ 'http', 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '254265', 'abilityTreeNodes' => [ 'FEATURElearnQHG7ZB', ], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'query', 'schema' => [ 'description' => 'DSW实例Id。', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx', ], ], [ 'name' => 'SourceRequestId', 'in' => 'query', 'schema' => [ 'description' => '出问题的请求RequestId。', 'type' => 'string', 'required' => false, 'example' => '473469C7-******5-B3DB-A3DC0DE3C83E', ], ], [ 'name' => 'Offset', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'description' => '排序字段:支持以下字段'."\n" ."\n" .'- GmtCreateTime'."\n" .'- GmtModifiedTime', 'type' => 'string', 'required' => false, 'example' => 'GmtCreateTime', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'description' => '排序方向:'."\n" ."\n" .'- ASC 升序'."\n" .'- DESC 降序', 'type' => 'string', 'required' => false, 'example' => 'ASC', ], ], [ 'name' => 'LogRepository', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], [ 'name' => 'LogLevel', 'in' => 'query', 'schema' => [ 'description' => '日志等级,目前支持'."\n" ."\n" .'- Error', 'type' => 'string', 'required' => false, 'example' => 'Error', ], ], [ 'name' => 'GmtStartTime', 'in' => 'query', 'schema' => [ 'description' => '起始UTC时间,日期格式 iso8601。', 'type' => 'string', 'format' => 'iso8601_normal', 'required' => false, 'example' => '2020-11-08T16:00:00Z', ], ], [ 'name' => 'GmtEndTime', 'in' => 'query', 'schema' => [ 'description' => '结束UTC时间,日期格式 iso8601。', 'type' => 'string', 'format' => 'iso8601_normal', 'required' => false, 'example' => '2020-12-08T16:00:00Z', ], ], [ 'name' => 'ProblemCategory', 'in' => 'query', 'schema' => [ 'description' => '问题分类'."\n" ."\n" .'- InstanceStartFailed'."\n" .'- InstanceTerminating'."\n" .'- InstanceCreateFailed', 'type' => 'string', 'required' => false, 'example' => 'InstanceStartFailed', ], ], [ 'name' => 'LifecycleId', 'in' => 'query', 'schema' => [ 'type' => 'string', 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'ECS规格列表', 'description' => '系统日志。', 'type' => 'object', 'properties' => [ 'SystemLogs' => [ 'title' => '本分页中请求的实例列表', 'description' => '系统日志列表。', 'type' => 'array', 'items' => [ 'description' => '系统日志。', 'type' => 'object', 'properties' => [ 'Content' => [ 'title' => '实例规格', 'description' => '日志内容。', 'type' => 'string', 'example' => 'You are using******', ], 'GmtCreateTime' => [ 'title' => '显卡类型', 'description' => '起始UTC时间,日期格式 iso8601。', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2020-10-08T16:00:00Z'."\n", ], 'Level' => [ 'description' => '日志级别。', 'type' => 'string', 'example' => 'Error。', ], ], ], ], 'Offset' => [ 'type' => 'string', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"SystemLogs\\": [\\n {\\n \\"Content\\": \\"You are using******\\",\\n \\"GmtCreateTime\\": \\"2020-10-08T16:00:00Z\\\\n\\",\\n \\"Level\\": \\"Error。\\"\\n }\\n ],\\n \\"Offset\\": \\"\\"\\n}","type":"json"}]', 'title' => '获取系统日志', ], 'GetSanityCheckTask' => [ 'summary' => '用于查询指定健康检查任务的当前状态及结果。通过传入任务 ID 和检查类型,可获取任务的执行进度(如 Pending、Executing、Completed 或 Failed)、开始/结束时间、发现的问题列表(Issues)等信息。若请求时设置 verbose=true,还将返回每个检查项(checkpoint)的详细分析结果(CheckDetails),包括检查项名称、描述、结果及失败原因,便于精准定位问题。', 'path' => '/api/v2/sanitychecks/{CheckType}/{TaskId}', 'methods' => [ 'get', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'CheckType', 'in' => 'path', 'schema' => [ 'description' => '检查项类型。取值:'."\n" ."\n" .'SSH:用于触发实例SSH健康检查', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'SSH' => 'SSH', ], 'example' => 'SSH', ], ], [ 'name' => 'TaskId', 'in' => 'path', 'schema' => [ 'description' => '健康检查任务ID', 'type' => 'string', 'required' => false, 'example' => '917479ff-c869-49ea-908e-ae85bd987bc0'."\n", ], ], [ 'name' => 'Verbose', 'in' => 'query', 'schema' => [ 'description' => '用于控制是否输出健康检查细节', 'type' => 'boolean', 'required' => false, 'example' => 'true', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'requestId' => [ 'title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '44FB0869-AA85-599D-A09D-C42F7467618A', ], 'TaskId' => [ 'description' => '健康检查任务ID。', 'type' => 'string', 'example' => '917479ff-c869-49ea-908e-ae85bd987bc0', ], 'InstanceId' => [ 'description' => 'DSW实例ID', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx', ], 'CheckType' => [ 'description' => '检查项类型。取值:'."\n" ."\n" .'SSH:用于触发实例SSH健康检查', 'type' => 'string', 'example' => 'SSH', ], 'Status' => [ 'description' => '健康检查任务状态', 'type' => 'string', 'example' => 'Executing', ], 'StartTime' => [ 'description' => '任务开始时间(如有)', 'type' => 'string', 'example' => '2020-11-08T15:00:00Z', ], 'EndTime' => [ 'description' => '任务结束时间(如有)', 'type' => 'string', 'example' => '2020-11-08T15:00:00Z', ], 'Issues' => [ 'description' => '检查出存在的问题。'."\n" .'如果没有检查出问题,则返回空数组。', 'type' => 'array', 'items' => [ 'description' => '检查出存在的健康问题', 'type' => 'string', 'example' => 'sshd has not been installed"', ], ], 'CheckDetails' => [ 'description' => '健康检查任务的分析结果。', 'type' => 'array', 'items' => [ 'description' => '健康检查任务的分析结果。', 'type' => 'object', 'properties' => [ 'Name' => [ 'description' => '检查项的名称', 'type' => 'string', 'example' => 'secureGroupCheck', ], 'Description' => [ 'description' => '检查项的详细描述', 'type' => 'string', 'example' => 'Check whether the security group allows traffic on port 22', ], 'Result' => [ 'description' => '检查结果', 'type' => 'string', 'example' => 'passed', ], 'Reason' => [ 'description' => '检查项未通过的原因', 'type' => 'string', 'example' => 'Port 22 is blocked by the security group', ], ], ], ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"44FB0869-AA85-599D-A09D-C42F7467618A\\",\\n \\"TaskId\\": \\"917479ff-c869-49ea-908e-ae85bd987bc0\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"CheckType\\": \\"SSH\\",\\n \\"Status\\": \\"Executing\\",\\n \\"StartTime\\": \\"2020-11-08T15:00:00Z\\",\\n \\"EndTime\\": \\"2020-11-08T15:00:00Z\\",\\n \\"Issues\\": [\\n \\"sshd has not been installed\\\\\\"\\"\\n ],\\n \\"CheckDetails\\": [\\n {\\n \\"Name\\": \\"secureGroupCheck\\",\\n \\"Description\\": \\"Check whether the security group allows traffic on port 22\\",\\n \\"Result\\": \\"passed\\",\\n \\"Reason\\": \\"Port 22 is blocked by the security group\\"\\n }\\n ]\\n}","type":"json"}]', 'title' => 'GetSanityCheckTask', ], 'CreateSanityCheckTask' => [ 'summary' => '用于为指定的 DSW 实例提交一个异步健康检查任务。调用时需提供检查类型(如 ssh)和实例 ID,系统将立即返回一个唯一的任务 ID(TaskID),表示任务已成功入队。该接口不阻塞等待检查结果,适用于需要快速响应的场景,后续可通过任务 ID 查询执行状态与详细结果。', 'path' => '/api/v2/sanitychecks/{CheckType}', 'methods' => [ 'post', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnRNGD0R', ], ], 'parameters' => [ [ 'name' => 'CheckType', 'in' => 'path', 'schema' => [ 'description' => '检查项类型。取值:'."\n" ."\n" .'- **SSH**:用于触发实例SSH健康检查', 'type' => 'string', 'required' => true, 'example' => 'SSH', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求body。', 'type' => 'object', 'properties' => [ 'InstanceId' => [ 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~2411819~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'."\n", ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'description' => '请求ID。', 'type' => 'string', 'example' => 'BEBDF2EE-642E-5992-8907-D2011A7ACEFE'."\n", ], 'TaskId' => [ 'description' => '创建的健康检查任务ID', 'type' => 'string', 'example' => '917479ff-c869-49ea-908e-ae85bd987bc0', ], ], ], ], ], 'staticInfo' => [ 'returnType' => 'synchronous', ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BEBDF2EE-642E-5992-8907-D2011A7ACEFE\\\\n\\",\\n \\"TaskId\\": \\"917479ff-c869-49ea-908e-ae85bd987bc0\\"\\n}","type":"json"}]', 'title' => 'CreateSanityCheckTask', ], ], 'endpoints' => [ [ 'regionId' => 'us-west-1', 'endpoint' => 'pai-dsw.us-west-1.aliyuncs.com', ], [ 'regionId' => 'cn-hongkong', 'endpoint' => 'pai-dsw.cn-hongkong.aliyuncs.com', ], [ 'regionId' => 'ap-southeast-1', 'endpoint' => 'pai-dsw.ap-southeast-1.aliyuncs.com', ], [ 'regionId' => 'cn-shanghai', 'endpoint' => 'pai-dsw.cn-shanghai.aliyuncs.com', ], [ 'regionId' => 'cn-beijing', 'endpoint' => 'pai-dsw.cn-beijing.aliyuncs.com', ], [ 'regionId' => 'cn-hangzhou', 'endpoint' => 'pai-dsw.cn-hangzhou.aliyuncs.com', ], [ 'regionId' => 'cn-shanghai-finance-1', 'endpoint' => 'pai-dsw.cn-shanghai-finance-1.aliyuncs.com', ], [ 'regionId' => 'ap-northeast-1', 'endpoint' => 'pai-dsw.ap-northeast-1.aliyuncs.com', ], [ 'regionId' => 'ap-southeast-5', 'endpoint' => 'pai-dsw.ap-southeast-5.aliyuncs.com', ], [ 'regionId' => 'cn-guangzhou', 'endpoint' => 'pai-dsw.cn-guangzhou.aliyuncs.com', ], [ 'regionId' => 'ap-northeast-2', 'endpoint' => 'pai-dsw.ap-northeast-2.aliyuncs.com', ], [ 'regionId' => 'ap-southeast-7', 'endpoint' => 'pai-dsw.ap-southeast-7.aliyuncs.com', ], [ 'regionId' => 'ap-southeast-3', 'endpoint' => 'pai-dsw.ap-southeast-3.aliyuncs.com', ], [ 'regionId' => 'cn-chengdu', 'endpoint' => 'pai-dsw.cn-chengdu.aliyuncs.com', ], [ 'regionId' => 'cn-shenzhen', 'endpoint' => 'pai-dsw.cn-shenzhen.aliyuncs.com', ], [ 'regionId' => 'ap-south-1', 'endpoint' => 'pai-dsw.ap-south-1.aliyuncs.com', ], [ 'regionId' => 'us-southeast-1', 'endpoint' => 'pai-dsw.us-southeast-1.aliyuncs.com', ], [ 'regionId' => 'me-central-1', 'endpoint' => 'pai-dsw.me-central-1.aliyuncs.com', ], [ 'regionId' => 'eu-central-1', 'endpoint' => 'pai-dsw.eu-central-1.aliyuncs.com', ], [ 'regionId' => 'me-east-1', 'endpoint' => 'pai-dsw.me-east-1.aliyuncs.com', ], [ 'regionId' => 'us-east-1', 'endpoint' => 'pai-dsw.us-east-1.aliyuncs.com', ], [ 'regionId' => 'cn-wulanchabu', 'endpoint' => 'pai-dsw.cn-wulanchabu.aliyuncs.com', ], ], ];