diff options
Diffstat (limited to 'data/zh_cn/pai-dsw/2022-01-01/api-docs.php')
| -rw-r--r-- | data/zh_cn/pai-dsw/2022-01-01/api-docs.php | 11196 |
1 files changed, 4546 insertions, 6650 deletions
diff --git a/data/zh_cn/pai-dsw/2022-01-01/api-docs.php b/data/zh_cn/pai-dsw/2022-01-01/api-docs.php index ee04d45..7e76c79 100644 --- a/data/zh_cn/pai-dsw/2022-01-01/api-docs.php +++ b/data/zh_cn/pai-dsw/2022-01-01/api-docs.php @@ -1,122 +1,69 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'ROA', - 'product' => 'pai-dsw', - 'version' => '2022-01-01', - ], + 'info' => ['style' => 'ROA', 'product' => 'pai-dsw', 'version' => '2022-01-01'], 'directories' => [ [ - 'id' => 313771, - 'title' => '实例', + 'children' => ['GetInstanceEvents', 'UpdateInstanceLabels', 'DeleteInstanceLabels'], 'type' => 'directory', - 'children' => [ - 'CreateInstance', - 'DeleteInstance', - 'UpdateInstance', - 'StartInstance', - 'StopInstance', - 'GetInstance', - 'ListInstances', - 'GetInstanceEvents', - 'UpdateInstanceLabels', - 'DeleteInstanceLabels', - 'DeleteInstances', - 'StopInstances', - ], + 'title' => '实例', + 'id' => 151287, ], [ - 'id' => 313784, - 'title' => '生命周期', + 'children' => ['GetLifecycle'], 'type' => 'directory', - 'children' => [ - 'GetLifecycle', - ], + 'title' => '生命周期', + 'id' => 151298, ], [ - 'id' => 313786, - 'title' => '资源监控', + 'children' => ['GetInstanceMetrics'], 'type' => 'directory', - 'children' => [ - 'GetInstanceMetrics', - ], + 'title' => '资源监控', + 'id' => 151300, ], [ - 'id' => 313788, - 'title' => '实例快照', + 'children' => ['CreateInstanceSnapshot', 'DeleteInstanceSnapshot', 'GetInstanceSnapshot', 'ListInstanceSnapshot'], 'type' => 'directory', - 'children' => [ - 'CreateInstanceSnapshot', - 'DeleteInstanceSnapshot', - 'GetInstanceSnapshot', - 'ListInstanceSnapshot', - ], + 'title' => '实例快照', + 'id' => 204520, ], [ - 'id' => 313793, - 'title' => '统计', + 'children' => ['GetResourceGroupStatistics', 'ListInstanceStatistics'], 'type' => 'directory', - 'children' => [ - 'GetResourceGroupStatistics', - 'ListInstanceStatistics', - ], + 'title' => '统计', + 'id' => 204525, ], [ - 'id' => 313796, - 'title' => '实例定时自动关机', + 'children' => ['CreateInstanceShutdownTimer', 'DeleteInstanceShutdownTimer', 'GetInstanceShutdownTimer'], 'type' => 'directory', - 'children' => [ - 'CreateInstanceShutdownTimer', - 'DeleteInstanceShutdownTimer', - 'GetInstanceShutdownTimer', - ], + 'title' => '实例定时自动关机', + 'id' => 151313, ], [ - 'id' => 313800, - 'title' => '闲置实例自动关机', + 'children' => ['CreateIdleInstanceCuller', 'DeleteIdleInstanceCuller', 'GetIdleInstanceCuller'], 'type' => 'directory', - 'children' => [ - 'CreateIdleInstanceCuller', - 'DeleteIdleInstanceCuller', - 'GetIdleInstanceCuller', - ], + 'title' => '闲置实例自动关机', + 'id' => 151309, ], [ - 'id' => 313804, - 'title' => 'ECS规格', + 'children' => ['ListEcsSpecs'], 'type' => 'directory', - 'children' => [ - 'ListEcsSpecs', - ], + 'title' => 'ECS规格', + 'id' => 151307, ], [ - 'id' => 313806, - 'title' => '用户配置', + 'children' => ['GetUserConfig'], 'type' => 'directory', - 'children' => [ - 'GetUserConfig', - ], + 'title' => '用户配置', + 'id' => 204535, ], [ - 'id' => 313808, - 'title' => '其他', - 'type' => 'directory', 'children' => [ - 'CreateDiagnosis', - 'GetToken', - 'GetMetrics', - 'GetUserCommand', - 'ListSystemLogs', + 'CreateDiagnosis', 'GetMetrics', 'GetUserCommand', 'ListSystemLogs', 'CreateInstance', 'CreateSanityCheckTask', 'CreateTempFile', 'CreateTempFileTask', 'DeleteInstance', 'DeleteInstances', 'DeleteTempFile', 'DeleteTempFileTask', 'DeleteTempFileTasks', 'GetInstance', 'GetSanityCheckTask', 'GetTempFile', 'GetTempFileTask', 'GetToken', 'ListInstances', 'ListTempFiles', + 'QueryAutoShutdownPolicies', 'StartInstance', 'StopInstance', 'StopInstances', 'UpdateInstance', 'UpdateTempFile', 'UpdateTempFileTask', ], - ], - [ - 'id' => 0, - 'title' => '其它', 'type' => 'directory', - 'children' => [ - 'GetSanityCheckTask', - 'CreateSanityCheckTask', - ], + 'title' => '其他', + 'id' => 151322, ], ], 'components' => [ @@ -128,194 +75,112 @@ 'EgressWhitelists' => [ 'title' => '出口白名单', 'type' => 'array', - 'items' => [ - 'type' => 'string', - ], - ], - 'IngressRate' => [ - 'title' => '入口速率', - 'type' => 'string', - ], - 'EgressRate' => [ - 'title' => '出口速率', - 'type' => 'string', + 'items' => ['type' => 'string'], ], + 'IngressRate' => ['title' => '入口速率', 'type' => 'string'], + 'EgressRate' => ['title' => '出口速率', 'type' => 'string'], 'IngressWhitelists' => [ 'title' => '入口白名单', 'type' => 'array', - 'items' => [ - 'type' => 'string', - ], + 'items' => ['type' => 'string'], ], ], ], 'CredentialConfig' => [ 'title' => 'credential配置', 'description' => '凭据配置。', + 'visibility' => 'Public', 'type' => 'object', 'properties' => [ - 'Enable' => [ - 'title' => '是否开启Credential注入', - 'description' => '是否开启Credential注入', - 'type' => 'boolean', - 'example' => 'true', - ], - 'AliyunEnvRoleKey' => [ - 'title' => '环境变量角色key', - 'description' => '环境变量角色key', - 'type' => 'string', - 'required' => false, - 'example' => '0', - ], + 'Enable' => ['title' => '是否开启Credential注入', 'description' => '是否开启Credential注入', 'visibility' => 'Public', 'type' => 'boolean', 'example' => 'true', 'backendName' => 'Enable'], + 'AliyunEnvRoleKey' => ['title' => '环境变量角色key', 'description' => '环境变量角色key', 'visibility' => 'Public', 'type' => 'string', 'required' => false, 'example' => '0', 'backendName' => 'AliyunEnvRoleKey'], 'Configs' => [ 'title' => '配置列表', 'description' => '配置列表', + 'visibility' => 'Public', 'type' => 'array', 'items' => [ + 'visibility' => 'Public', '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', - ], + 'Key' => ['title' => '标识config的key。', 'description' => '标识config的key。', 'visibility' => 'Public', 'type' => 'string', 'required' => true, 'example' => '0', 'backendName' => 'Key'], + 'Type' => ['title' => '配置类型。可选值包括:Role-角色扮演;RoleChain-角色链扮演', 'description' => '配置类型。可选值包括:Role-角色扮演;RoleChain-角色链扮演', 'visibility' => 'Public', 'type' => 'string', 'required' => true, 'example' => 'Role', 'backendName' => 'Type'], 'Roles' => [ 'title' => '配置的角色列表', 'description' => '配置的角色列表', + 'visibility' => 'Public', 'type' => 'array', 'items' => [ + 'visibility' => 'Public', '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' => '{}', - ], + 'RoleArn' => ['title' => 'RAM角色arn', 'description' => 'RAM角色arn', 'visibility' => 'Public', 'type' => 'string', 'required' => true, 'example' => 'acs:ram::123******:role/****', 'backendName' => 'RoleArn'], + 'RoleType' => ['title' => '扮演的角色类型。可选值包括:service-由服务扮演;user-由普通用户账号扮演', 'description' => '扮演的角色类型。可选值包括:service-由服务扮演;user-由普通用户账号扮演', 'visibility' => 'Public', 'type' => 'string', 'required' => true, 'example' => 'service', 'backendName' => 'RoleType'], + 'AssumeRoleFor' => ['title' => '扮演角色的所属主体', 'description' => '扮演角色的所属主体', 'visibility' => 'Public', 'type' => 'string', 'example' => '123******', 'backendName' => 'AssumeRoleFor'], + 'Policy' => ['title' => '为角色进一步限定的权限策略。', 'description' => '为角色进一步限定的权限策略。', 'visibility' => 'Public', 'type' => 'string', 'example' => '{}', 'backendName' => 'Policy'], 'UserInfo' => [ 'title' => '代理的用户信息。', 'description' => '代理的用户信息。', + 'visibility' => 'Public', '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' => '********', - ], + 'Id' => ['title' => '用户ID。', 'description' => '用户ID。', 'visibility' => 'Public', 'type' => 'string', 'example' => '456******', 'backendName' => 'Id'], + 'Type' => ['title' => '用户类型。可选值包括:customer-主账号;sub-子账号;AssumedRoleUser-RAM角色', 'description' => '用户类型。可选值包括:'."\n" + .'* customer - 主账号'."\n" + .'* sub - 子账号'."\n" + .'* AssumedRoleUser - RAM角色', 'visibility' => 'Public', 'type' => 'string', 'example' => 'S', 'backendName' => 'Type'], + 'AccessKeyId' => ['title' => '访问密钥ID。', 'description' => '访问密钥ID。', 'visibility' => 'Public', 'type' => 'string', 'example' => 'LT********', 'backendName' => 'AccessKeyId'], + 'SecurityToken' => ['title' => '安全令牌', 'description' => '安全令牌', 'visibility' => 'Public', 'type' => 'string', 'example' => '********', 'backendName' => 'SecurityToken'], ], + 'backendName' => 'UserInfo', ], ], + 'extendType' => 'true', ], + 'backendName' => 'Roles', + 'itemName' => 'Roles', ], ], + 'extendType' => 'true', ], + 'backendName' => 'Configs', + 'itemName' => 'Configs', ], ], ], 'DemoCategory' => [ 'title' => '样例目录', 'description' => '样例目录。', + 'visibility' => 'Public', 'type' => 'object', 'properties' => [ 'SubCategories' => [ 'title' => '目录列表', 'description' => '目录列表', + 'visibility' => 'Public', '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', + 'items' => ['visibility' => 'Public', 'extendType' => 'true', '$ref' => '#/components/schemas/DemoCategory'], + 'backendName' => 'SubCategories', ], + 'CategoryName' => ['title' => '目录名', 'description' => '目录名', 'visibility' => 'Public', 'type' => 'string', 'example' => 'SDK Usage', 'backendName' => 'CategoryName'], + 'CategoryCode' => ['title' => '目录码', 'description' => '目录码', 'visibility' => 'Public', 'type' => 'string', 'example' => 'sdk', 'backendName' => 'CategoryCode'], + 'Order' => ['title' => '序号', 'description' => '序号', 'visibility' => 'Public', 'type' => 'integer', 'format' => 'int64', 'example' => '12', 'backendName' => 'Order'], ], ], 'DynamicMount' => [ 'title' => 'Dynamic Mount Config', 'description' => '动态挂载配置', + 'visibility' => 'Public', 'type' => 'object', 'properties' => [ - 'Enable' => [ - 'title' => 'Is dynamic mount enabled.', - 'description' => '是否开启动态挂载的能力。', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Enable' => ['title' => 'Is dynamic mount enabled.', 'description' => '是否开启动态挂载的能力。', 'visibility' => 'Public', 'type' => 'boolean', 'example' => 'true', 'backendName' => 'Enable'], 'MountPoints' => [ 'title' => 'Mount points of dynaimc config.', 'description' => '动态挂载点列表。', + 'visibility' => 'Public', 'type' => 'array', - 'items' => [ - 'description' => '动态挂载点。', - '$ref' => '#/components/schemas/DynamicMountPoint', - ], + 'items' => ['description' => '动态挂载点。', 'visibility' => 'Public', 'extendType' => 'true', '$ref' => '#/components/schemas/DynamicMountPoint'], + 'backendName' => 'MountPoints', ], ], ], @@ -324,21 +189,10 @@ 'description' => '动态挂载点配置。', 'type' => 'object', 'properties' => [ - 'RootPath' => [ - 'title' => '动态挂载点的根路径', - 'description' => '动态挂载点的根路径,动态挂载数据集的挂载路径必须是根路径的子路径,根路径默认是/mnt/dynamic/。'."\n" - ."\n" - .'可以配置多个动态挂载根路径,但是根路径不能是另外一个根路径的子路径。', - 'type' => 'string', - 'required' => true, - 'example' => '/mnt/dynamic/', - ], - 'Options' => [ - 'title' => '挂载点配置', - 'description' => '挂载点配置。', - 'type' => 'string', - 'example' => '{}', - ], + 'RootPath' => ['title' => '动态挂载点的根路径', 'description' => '动态挂载点的根路径,动态挂载数据集的挂载路径必须是根路径的子路径,根路径默认是/mnt/dynamic/。'."\n" + ."\n" + .'可以配置多个动态挂载根路径,但是根路径不能是另外一个根路径的子路径。', 'type' => 'string', 'required' => true, 'example' => '/mnt/dynamic/'], + 'Options' => ['title' => '挂载点配置', 'description' => '挂载点配置', 'type' => 'string', 'example' => '{}'], ], ], 'ForwardInfo' => [ @@ -346,67 +200,24 @@ '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', - ], + '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', - ], + 'items' => ['description' => '访问类型。'."\n" + ."\n" + .'- intranet:内网'."\n" + .'- internet:公网', 'type' => 'string', 'example' => 'intranet'], ], + 'NlbGatewayId' => ['type' => 'string'], ], ], 'ForwardInfoResponse' => [ @@ -414,76 +225,26 @@ '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", - ], + '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.', - ], + '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', - ], + 'Endpoint' => ['title' => '链接地址', 'description' => '链接地址', 'type' => 'string', 'example' => 'dsw-notebook-22-urz3u6cnu0uts7ej9r.dsw-5cc6083084818f60.dsw.pai.alibaba.com'], + 'Port' => ['title' => '链接端口', 'description' => '链接端口', 'type' => 'string', 'example' => '22'], ], ], 'Internet' => [ @@ -491,61 +252,32 @@ 'description' => '外网链接信息', 'type' => 'object', 'properties' => [ - 'Endpoint' => [ - 'title' => '链接地址', - 'description' => '链接地址', - 'type' => 'string', - 'example' => '47.111.119.114', - ], - 'Port' => [ - 'title' => '链接端口', - 'description' => '链接端口', - 'type' => 'string', - 'example' => '22', - ], + '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', - ], + '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', - ], + 'items' => ['description' => '访问类型'."\n" + ."\n" + .'- intranet:内网'."\n" + .'- internet:公网', 'type' => 'string', 'example' => 'intranet'], ], + 'NlbGatewayId' => ['type' => 'string'], ], ], 'PodIp' => [ 'type' => 'object', 'properties' => [ - 'Type' => [ - 'type' => 'string', - ], - 'Ip' => [ - 'type' => 'string', - ], - 'InterfaceName' => [ - 'type' => 'string', - ], + 'Type' => ['type' => 'string'], + 'Ip' => ['type' => 'string'], + 'InterfaceName' => ['type' => 'string'], ], ], 'ServiceConfig' => [ @@ -553,37 +285,194 @@ 'description' => '服务配置', 'type' => 'object', 'properties' => [ - 'JupyterServerPassword' => [ - 'title' => 'jupyter密码', - 'type' => 'string', + 'JupyterServerPassword' => ['title' => 'jupyter密码', 'type' => 'string'], + 'JupyterServerAuth' => ['title' => 'jupyter鉴权方式', 'type' => 'string'], + 'CodeServerPassword' => ['title' => 'webide密码', 'type' => 'string'], + 'CodeServerAuth' => ['title' => 'webide鉴权方式', 'type' => 'string'], + ], + ], + ], + ], + 'apis' => [ + '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" + .'- InstanceRecovering 实例恢复中', 'type' => 'string', 'required' => true, 'example' => 'InstanceStartFailed'], + 'GmtFailureTime' => ['description' => '待诊断实例出问题时间。', 'type' => 'string', 'format' => 'iso8601_normal', 'required' => false, 'example' => '2021-01-12T14:36:01Z'], + ], + 'required' => false, ], - 'JupyterServerAuth' => [ - 'title' => 'jupyter鉴权方式', - 'type' => 'string', + ], + ], + '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'], + ], ], - 'CodeServerPassword' => [ - 'title' => 'webide密码', - 'type' => 'string', + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '诊断实例问题', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateDiagnosis', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], - 'CodeServerAuth' => [ - 'title' => 'webide鉴权方式', - 'type' => 'string', + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"ReasonCode\\": \\"Resource.InsufficientResource\\",\\n \\"SolutionMessage\\": \\"Switch resource config\\",\\n \\"ReasonMessage\\": \\"Insufficient resource\\"\\n}","type":"json"}]', + ], + 'CreateIdleInstanceCuller' => [ + 'path' => '/api/v2/instances/{InstanceId}/idleinstanceculler', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => [], + ], + 'title' => '创建闲置实例自动关机策略', + 'summary' => '创建指定实例的自动关机策略,满足条件时将自动停止DSW实例。一个DSW实例只支持创建一个闲置自动关机策略,如果指定实例已设定过闲置自动关机策略,请先调用DeleteIdleInstanceCuller将其删除。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateIdleInstanceCuller'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateIdleInstanceCuller', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', ], - ], - 'apis' => [ 'CreateInstance' => [ - 'summary' => '调用CreateInstance创建一个DSW实例。', 'path' => '/api/v2/instances', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -596,9 +485,7 @@ 'riskType' => 'none', 'chargeType' => 'paid', 'abilityTreeCode' => '118631', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], ], 'parameters' => [ [ @@ -610,43 +497,13 @@ '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', - ], + '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' => '数据集列表。', @@ -655,86 +512,39 @@ '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', - ], + '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' => '只读', - ], + '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', - ], + '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, ], @@ -745,66 +555,30 @@ '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', - ], + '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"', - ], + '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', - ], + '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', - ], + 'items' => ['description' => '端口透出信息列表,可配置映射端口、网关ID、SSH 公钥等参数。', 'required' => false, '$ref' => '#/components/schemas/ForwardInfo'], 'required' => false, ], - 'BandwidthLimit' => [ - 'required' => false, - '$ref' => '#/components/schemas/BandwidthLimit', - ], + 'BandwidthLimit' => ['required' => false, '$ref' => '#/components/schemas/BandwidthLimit', 'description' => ''], ], 'required' => false, ], @@ -813,10 +587,7 @@ 'description' => '实例的可见性。', 'type' => 'string', 'required' => false, - 'enumValueTitles' => [ - 'PUBLIC' => '工作空间所有用户可见', - 'PRIVATE' => '工作空间内自己及管理员可见', - ], + 'enumValueTitles' => ['PUBLIC' => '工作空间所有用户可见', 'PRIVATE' => '工作空间内自己及管理员可见'], 'example' => 'PRIVATE', ], 'EnvironmentVariables' => [ @@ -825,81 +596,34 @@ .'><warning>这里传入的环境变量可能会覆盖系统预设的环境变量></warning>', 'type' => 'object', 'required' => false, - 'additionalProperties' => [ - 'type' => 'string', - 'description' => '用户指定环境变量,DSW实例启动后,指定环境变量会被注入到容器中。', - 'example' => 'MAAS', - ], + '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', - ], + '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" - .'><notice>传参时请指明单位,如32GB,而不是32。'."\n" - .'如果不指明单位,默认是MB。'."\n" - .'></notice>', - 'type' => 'string', - 'required' => false, - 'example' => '32GB', - ], - 'SharedMemory' => [ - 'title' => 'shared memory大小', - 'description' => '共享内存大小。单位为GB。'."\n" - .'><notice>传参时请指明单位,如32GB,而不是32。'."\n" - .'如果不指明单位,默认是MB。'."\n" - .'></notice>', - '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', - ], + 'CPU' => ['title' => 'cpu核数', 'description' => 'CPU核数。', 'type' => 'string', 'required' => false, 'example' => '32'], + 'Memory' => ['title' => 'memory大小', 'description' => '内存大小。单位为GB。'."\n" + .'><notice>传参时请指明单位,如32GB,而不是32。'."\n" + .'如果不指明单位,默认是MB。'."\n" + .'></notice>', 'type' => 'string', 'required' => false, 'example' => '32GB'], + 'SharedMemory' => ['title' => 'shared memory大小', 'description' => '共享内存大小。单位为GB。'."\n" + .'><notice>传参时请指明单位,如32GB,而不是32。'."\n" + .'如果不指明单位,默认是MB。'."\n" + .'></notice>', '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"}', @@ -912,20 +636,8 @@ 'description' => '用户定义标签。', 'type' => 'object', 'properties' => [ - 'Key' => [ - 'title' => '用户定义标签键', - 'description' => '用户定义标签键。', - 'type' => 'string', - 'required' => false, - 'example' => 'stsTokenOwner', - ], - 'Value' => [ - 'title' => '用户定义标签值', - 'description' => '用户定义标签值。', - 'type' => 'string', - 'required' => false, - 'example' => '123xxxxxxxx', - ], + 'Key' => ['title' => '用户定义标签键', 'description' => '用户定义标签键。', 'type' => 'string', 'required' => false, 'example' => 'stsTokenOwner'], + 'Value' => ['title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'required' => false, 'example' => '123xxxxxxxx'], ], 'required' => false, ], @@ -940,75 +652,33 @@ 'description' => '云盘列表。', 'type' => 'object', 'properties' => [ - 'Capacity' => [ - 'title' => '云盘容量', - 'description' => '当**资源类型**选择**公共资源**,或当**资源配额**选择预付费通用计算资源(CPU核数≥2且内存≥4G,或配置GPU)时:'."\n" - ."\n\n" - .'每个实例会赠送100 GiB免费系统盘额度,用于持久化存储。**如果实例停机超过15天,云盘的内容将被清空**。云盘支持扩容,具体扩容价格以控制台界面为准。'."\n" - ."\n" - .'><warning>'."\n" - ."\n" - .'- 扩容后不支持缩容,请按需操作扩容。'."\n" - ."\n" - .'- 扩容后整块系统盘(免费+付费),不再受到停机15天释放的限制,但会持续产生费用。'."\n" - ."\n" - .'- 实例删除,系统盘同步释放,删除前请确保必要数据备份。'."\n" - ."\n" - .'></warning>'."\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', - ], + 'Capacity' => ['title' => '云盘容量', 'description' => '当**资源类型**选择**公共资源**,或当**资源配额**选择预付费通用计算资源(CPU核数≥2且内存≥4G,或配置GPU)时:'."\n" + ."\n\n" + .'每个实例会赠送100 GiB免费系统盘额度,用于持久化存储。**如果实例停机超过15天,云盘的内容将被清空**。云盘支持扩容,具体扩容价格以控制台界面为准。'."\n" + ."\n" + .'><warning>'."\n" + ."\n" + .'- 扩容后不支持缩容,请按需操作扩容。'."\n" + ."\n" + .'- 扩容后整块系统盘(免费+付费),不再受到停机15天释放的限制,但会持续产生费用。'."\n" + ."\n" + .'- 实例删除,系统盘同步释放,删除前请确保必要数据备份。'."\n" + ."\n" + .'></warning>'."\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', - ], + '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, ], @@ -1018,42 +688,20 @@ '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', - ], + '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', @@ -1062,33 +710,18 @@ 'description' => 'CPU亲和性配置信息。仅支持通用计算预付费实例。', 'type' => 'object', 'properties' => [ - 'Enable' => [ - 'description' => '是否开启CPU亲和性。'."\n" - ."\n" - .'* false:不开启。'."\n" - .'* true:开启。', - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], + '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', - ], + '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', @@ -1096,18 +729,8 @@ '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', - ], + 'Key' => ['description' => 'Tag的key。', 'type' => 'string', 'required' => false, 'example' => 'tag1'], + 'Value' => ['description' => 'Tag的Value。', 'type' => 'string', 'required' => false, 'example' => 'value1'], ], 'required' => false, ], @@ -1121,48 +744,27 @@ 'description' => '在每次实例启动时都会执行的自定义命令,执行时机是实例环境初始化之后,jupyter-lab、code-server等服务启动之前。', 'type' => 'object', 'properties' => [ - 'Content' => [ - 'description' => '具体的自定义启动命令内容。', - 'type' => 'string', - 'required' => false, - ], + '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, - ], + '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', - ], + '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, ], @@ -1171,46 +773,29 @@ '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', - ], + '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。启用此能力,需要实例预留进程迁移需要的存储空间。', + 'DockerConfig' => [ 'type' => 'object', - 'required' => false, + 'properties' => [ + 'Enable' => ['type' => 'boolean'], + 'ContainersLimit' => ['type' => 'integer', 'format' => 'int64', 'example' => '10'], + 'MountAccessConfigPath' => ['type' => 'string'], + ], + ], + 'MigrationOptions' => ['type' => 'object'], + 'AccessRestrictionRules' => [ + 'type' => 'object', + 'additionalProperties' => ['type' => 'string'], ], ], 'required' => false, @@ -1224,90 +809,72 @@ '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', - ], + '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', + 'summary' => '调用CreateInstance创建一个DSW实例。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateInstance'], + ], ], + 'ramActions' => [], + '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"}]', + ], + 'CreateInstanceShutdownTimer' => [ + 'summary' => '调用CreateInstanceShutdownTimer,创建实例定时关机任务。', + 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', - 'abilityTreeCode' => '118633', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', + '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, ], ], ], @@ -1318,648 +885,105 @@ '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', - ], + '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\\": \\"ValidationError\\",\\n \\"HttpStatusCode\\": 200,\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\"\\n}","type":"json"}]', - 'title' => '删除实例', - ], - 'UpdateInstance' => [ - 'summary' => '更新DSW实例的属性。', - 'path' => '/api/v2/instances/{InstanceId}', - 'methods' => [ - 'put', + 'title' => '创建实例定时关机任务', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateInstanceShutdownTimer'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateInstanceShutdownTimer', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'CreateInstanceSnapshot' => [ + 'summary' => '创建实例快照。', + 'path' => '/api/v2/instances/{InstanceId}/snapshots', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'update', + 'operationType' => 'create', 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeCode' => '118636', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'chargeType' => 'free', + 'abilityTreeCode' => '118641', + 'abilityTreeNodes' => ['FEATURElearnE5ZUBR'], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', - 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + 'schema' => ['title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ - 'title' => '需要更新的实例属性', - 'description' => '需要更新的实例属性。', + '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' => '数据集列表。', + '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' => '数据集对象。', + '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', - ], + '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\'}', ], - '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' => '云盘列表。', + 'ExcludePaths' => [ + 'title' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件。', + 'description' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件。', 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Capacity' => [ - 'title' => '云盘容量', - 'description' => '当**资源类型**选择**公共资源**,或当**资源配额**选择预付费通用计算资源(CPU核数≥2且内存≥4G,或配置GPU)时:'."\n" - ."\n\n" - .'每个实例会赠送100 GiB免费系统盘额度,用于持久化存储。**如果实例停机超过15天,云盘的内容将被清空**。云盘支持扩容,具体扩容价格以控制台界面为准。'."\n" - ."\n" - .'><warning>'."\n" - ."\n" - .'- 扩容后不支持缩容,请按需操作扩容。'."\n" - ."\n" - .'- 扩容后整块系统盘(免费+付费),不再受到停机15天释放的限制,但会持续产生费用。'."\n" - ."\n" - .'- 实例删除,系统盘同步释放,删除前请确保必要数据备份。'."\n" - ."\n" - .'></warning>'."\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" - .'><warning>这里传入的环境变量可能会覆盖系统预设的环境变量></warning>', - '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', + 'items' => ['type' => 'string', 'required' => false, 'description' => ''], 'required' => false, ], + 'Overwrite' => ['title' => '是否覆盖更新镜像仓库中已存在的镜像 tag。', 'description' => '是否覆盖更新镜像仓库中已存在的镜像 tag。', 'type' => 'boolean', 'required' => false], ], 'required' => false, ], @@ -1972,96 +996,231 @@ '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', - ], + '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'], ], ], ], ], - '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', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], ], - 'schemes' => [ - 'http', - 'https', + 'title' => '创建实例快照', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateInstanceSnapshot'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'CreateSanityCheckTask' => [ + 'path' => '/api/v2/sanitychecks/{CheckType}', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', + '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"], + 'CheckArgs' => ['type' => 'object'], + ], + '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'], + ], + ], + ], ], - 'produces' => [ - 'application/json', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'CreateSanityCheckTask', + 'summary' => '用于为指定的 DSW 实例提交一个异步健康检查任务。调用时需提供检查类型(如 ssh)和实例 ID,系统将立即返回一个唯一的任务 ID(TaskID),表示任务已成功入队。该接口不阻塞等待检查结果,适用于需要快速响应的场景,后续可通过任务 ID 查询执行状态与详细结果。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateSanityCheckTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BEBDF2EE-642E-5992-8907-D2011A7ACEFE\\\\n\\",\\n \\"TaskId\\": \\"917479ff-c869-49ea-908e-ae85bd987bc0\\"\\n}","type":"json"}]', + ], + 'CreateTempFile' => [ + 'path' => '/api/v2/tempfiles', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'update', - 'abilityTreeCode' => '118635', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '207259', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], + ], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求参数', + 'type' => 'object', + 'properties' => [ + 'Name' => ['title' => '临时文件名称', 'description' => '临时文件名称', 'type' => 'string', 'required' => false, 'example' => 'filename'], + 'Capacity' => ['title' => '文件上传容量', 'description' => '文件上传容量', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1000'], + 'Prefix' => ['title' => '文件前缀', 'description' => '文件前缀', 'type' => 'string', 'required' => false, 'example' => 'somedir/'], + 'TaskId' => ['title' => '文件所属任务Id', 'description' => '文件所属任务Id', 'type' => 'string', 'required' => false, 'example' => 'task-05cexxxxxxxxx'], + 'InstanceId' => ['title' => 'dsw实例Id', 'description' => 'dsw实例Id', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx'], + ], + 'required' => false, + ], ], - 'tenantRelevance' => 'tenant', + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '执行结果', + 'description' => '执行结果', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TempFileId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'tempfile-05cexxxxxxxxx'], + ], + ], + ], + ], + 'title' => '创建临时文件', + 'summary' => '创建临时文件', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateTempFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TempFileId\\": \\"tempfile-05cexxxxxxxxx\\"\\n}","type":"json"}]', + ], + 'CreateTempFileTask' => [ + 'path' => '/api/v2/tempfiletasks', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '214812', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'path', + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', + 'description' => '请求参数', + 'type' => 'object', + 'properties' => [ + 'InstanceId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx'], + ], + 'required' => false, ], ], ], @@ -2069,52 +1228,93 @@ 200 => [ 'schema' => [ 'title' => '执行结果', - 'description' => '执行结果。', + 'description' => '执行结果', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => '请求Id', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', - ], + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TempFileTaskId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'task-05cexxxxxxxxx'], + ], + ], + ], + ], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '创建临时文件任务', + 'summary' => '创建临时文件任务', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateTempFileTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TempFileTaskId\\": \\"task-05cexxxxxxxxx\\"\\n}","type":"json"}]', + ], + 'DeleteIdleInstanceCuller' => [ + 'path' => '/api/v2/instances/{InstanceId}/idleinstanceculler', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => '返回结果说明。', - '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', - ], + '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'], ], ], ], @@ -2123,124 +1323,693 @@ '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' => '启动实例', + 'title' => '删除实例闲置关机策略', + 'summary' => '删除实例闲置关机策略。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteIdleInstanceCuller'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteIdleInstanceCuller', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', ], - 'StopInstance' => [ - 'summary' => '调用StopInstance,停止DSW实例。', - 'path' => '/api/v2/instances/{InstanceId}/stop', - 'methods' => [ - 'put', + 'DeleteInstance' => [ + 'path' => '/api/v2/instances/{InstanceId}', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], ], - 'schemes' => [ - 'http', - 'https', + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => [], + ], + 'title' => '删除实例', + 'summary' => '删除指定DSW实例。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstance'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeletePostPaidInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', + ], + 'DeleteInstanceLabels' => [ + 'summary' => '删除DSW实例的标签。', + 'path' => '/api/v2/instances/{InstanceId}/labels', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'update', - 'abilityTreeCode' => '118632', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', + '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'], + 'title' => '删除实例标签', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstanceLabels'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteInstanceLabels', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\\"\\n}","type":"json"}]', + ], + 'DeleteInstanceShutdownTimer' => [ + 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], ], ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', + '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'], + ], ], ], + ], + 'title' => '删除实例定时关机任务', + 'summary' => '删除实例定时关机任务。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstanceShutdownTimer'], + ], + ], + 'ramActions' => [ [ - 'name' => 'SaveImage', - 'in' => 'query', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteInstanceShutdownTimer', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', + ], + 'DeleteInstanceSnapshot' => [ + 'path' => '/api/v2/instances/{InstanceId}/snapshots/{SnapshotId}', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => [], + ], + 'title' => '删除实例快照', + 'summary' => '删除实例快照。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstanceSnapshot'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', + ], + 'DeleteInstances' => [ + 'path' => '/api/v2/batch/instances/delete', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '247984', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], + ], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'title' => '是否保存环境后再关闭实例', - 'description' => '是否保存环境后再关闭实例。'."\n" - .'- 打开开关:保存环境后再关闭实例。'."\n" - .'- 关闭开关:不保存环境数据,直接关闭实例。', - 'type' => 'boolean', + 'description' => '请求body。', + 'type' => 'object', + 'properties' => [ + 'InstanceIds' => [ + 'description' => '需要删除的实例ID列表', + 'type' => 'array', + 'items' => ['description' => '需要删除的实例ID', 'type' => 'string', 'required' => false, 'example' => '[\'dsw-13cb3d2e173cb74e\']'], + 'required' => false, + ], + ], 'required' => false, - 'example' => 'false', - 'default' => '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'], + 'title' => '批量删除实例', + 'summary' => '批量删除实例', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeletePostPaidInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', + ], + 'DeleteTempFile' => [ + 'summary' => '删除临时文件', + 'path' => '/api/v2/tempfiles/{TempFileId}', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '207257', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], + ], + 'parameters' => [ + [ + 'name' => 'TempFileId', + 'in' => 'path', + 'schema' => ['title' => '临时文件Id', 'description' => '临时文件Id', 'type' => 'string', 'required' => true, 'example' => 'tempfile-05cexxxxxxxxx'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ 'title' => '执行结果', - 'description' => '执行结果。', + 'description' => '执行结果', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => '请求Id', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TempFileId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'tempfile-05cexxxxxxxxx'], + ], + ], + ], + ], + 'title' => '删除临时文件', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteTempFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TempFileId\\": \\"tempfile-05cexxxxxxxxx\\"\\n}","type":"json"}]', + ], + 'DeleteTempFileTask' => [ + 'summary' => '删除临时文件', + 'path' => '/api/v2/tempfiletasks/{TempFileTaskId}', + 'methods' => ['delete'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '214814', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], + ], + 'parameters' => [ + [ + 'name' => 'TempFileTaskId', + 'in' => 'path', + 'schema' => ['title' => '临时文件任务Id', 'description' => '临时文件任务Id', 'type' => 'string', 'required' => true, 'example' => 'task-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' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TempFileTaskId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'task-05cexxxxxxxxx'], + ], + ], + ], + ], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '删除临时文件任务', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteTempFileTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TempFileTaskId\\": \\"task-05cexxxxxxxxx\\"\\n}","type":"json"}]', + ], + 'DeleteTempFileTasks' => [ + 'path' => '/api/v2/batch/tempfiletasks/delete', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'delete', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '214814', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], + ], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => '请求参数', + 'type' => 'object', + 'properties' => [ + 'TempFileTaskIds' => [ + 'description' => '临时文件任务id数组', + 'type' => 'array', + 'items' => ['description' => '临时文件任务id', 'type' => 'string', 'required' => false, 'example' => 'task-05cexxxxxxxxx'], + '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' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '批量删除临时文件任务', + 'summary' => '删除临时文件', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200\\n}","type":"json"}]', + ], + 'GetIdleInstanceCuller' => [ + 'path' => '/api/v2/instances/{InstanceId}/idleinstanceculler', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + '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' => 'null', - ], - 'HttpStatusCode' => [ - 'title' => 'http状态码', - 'description' => 'HTTP状态码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'null', - ], - 'InstanceId' => [ - 'title' => '实例Id', - 'description' => '实例ID。', - 'type' => 'string', - 'example' => 'dsw-730xxxxxxxxxx', - ], + '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'], ], ], ], ], - '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' => '停止实例', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '获取闲置实例自动关机策略', + 'summary' => '获取指定实例的闲置自动关机策略。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetIdleInstanceCuller'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetIdleInstanceCuller', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + '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"}]', ], 'GetInstance' => [ 'summary' => '查询DSW实例详情。', 'path' => '/api/v2/instances/{InstanceId}', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2253,39 +2022,23 @@ 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '118634', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', - 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + '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', - ], + 'schema' => ['description' => '分享令牌信息。', 'type' => 'string', 'required' => false, 'example' => 'WUzWCMr325LV0bH2JH4C4HoDaKIU6C4S'], ], [ 'name' => 'Fields', 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], ], ], 'responses' => [ @@ -2295,132 +2048,33 @@ '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', - ], + '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' => '环境准备中', + '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' => '测试用户', - ], + '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' => 'Test user'], 'Datasets' => [ 'title' => '数据集集合', 'description' => '数据集集合。', @@ -2430,65 +2084,25 @@ .'数据集对象属性包括数据集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', - ], + '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', - ], + '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', - ], + '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:只读。', 'type' => 'string'], ], ], ], @@ -2497,60 +2111,25 @@ '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', - ], + '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"', - ], + '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', - ], + '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', + 'items' => ['description' => '端口透出信息列表。', '$ref' => '#/components/schemas/ForwardInfoResponse'], ], + 'BandwidthLimit' => ['$ref' => '#/components/schemas/BandwidthLimit', 'title' => '公网带宽限速配置', 'description' => '公网带宽限速配置'], + 'Ip' => ['title' => '用户VPC的IP地址', 'type' => 'string'], ], ], 'InstanceShutdownTimer' => [ @@ -2558,122 +2137,36 @@ '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', - ], + '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', - ], + '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', - ], + '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' => '保存成功', - ], + 'enumValueTitles' => ['Committing' => '提交中', 'Pushing' => '推送中', 'Failed' => '保存失败', 'Saved' => '保存成功'], 'example' => 'Pushing', ], ], @@ -2682,10 +2175,7 @@ 'title' => '实例计算类型', 'description' => '实例计算类型。', 'type' => 'string', - 'enumValueTitles' => [ - 'CPU' => 'CPU', - 'GPU' => 'GPU', - ], + 'enumValueTitles' => ['CPU' => 'CPU', 'GPU' => 'GPU'], 'example' => 'CPU', ], 'Accessibility' => [ @@ -2694,83 +2184,36 @@ .'- PRIVATE:表示工作空间内自己及管理员可见。'."\n" .'- PUBLIC:工作空间所有用户可见。', 'type' => 'string', - 'enumValueTitles' => [ - 'PUBLIC' => '工作空间所有用户可见', - 'PRIVATE' => '工作空间内自己及管理员可见', - ], + 'enumValueTitles' => ['PUBLIC' => '工作空间所有用户可见', 'PRIVATE' => '工作空间内自己及管理员可见'], 'example' => 'PRIVATE', ], 'EnvironmentVariables' => [ 'title' => '环境变量', 'description' => '环境变量。', 'type' => 'object', - 'additionalProperties' => [ - 'type' => 'string', - 'description' => '用户自定义的环境变量,将会在实例启动后,注入到容器内部。', - 'example' => 'app: MAAS', - ], + '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', - ], + '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', - ], + '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"}', ], @@ -2782,18 +2225,8 @@ 'description' => '用户可以对实例进行自定义打标,标记实例的一些自定义属性。', 'type' => 'object', 'properties' => [ - 'Key' => [ - 'title' => '用户定义标签键', - 'description' => '用户定义标签键。', - 'type' => 'string', - 'example' => 'stsTokenOwner', - ], - 'Value' => [ - 'title' => '用户定义标签值', - 'description' => '用户定义标签值。', - 'type' => 'string', - 'example' => '123xxxxxxxx', - ], + 'Key' => ['title' => '用户定义标签键', 'description' => '用户定义标签键。', 'type' => 'string', 'example' => 'stsTokenOwner'], + 'Value' => ['title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'example' => '123xxxxxxxx'], ], ], 'example' => '{\'foo\': \'bar\'}', @@ -2803,35 +2236,11 @@ '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', - ], + '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}', ], @@ -2843,60 +2252,15 @@ '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', - ], + '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' => '[]', @@ -2909,129 +2273,47 @@ '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', - ], + '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', - ], + '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', - ], + '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', - ], + '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', - ], + 'CredentialConfig' => ['title' => 'Credential注入配置。', 'description' => 'Credential注入配置。', '$ref' => '#/components/schemas/CredentialConfig'], 'Affinity' => [ 'description' => '亲和性配置。', 'type' => 'object', @@ -3040,23 +2322,14 @@ 'description' => 'CPU亲和性配置。仅支持通用计算预付费实例。', 'type' => 'object', 'properties' => [ - 'Enable' => [ - 'description' => '是否开启CPU亲和性。'."\n" - ."\n" - .'true:开启。 false:不开启。', - 'type' => 'boolean', - 'example' => 'true', - ], + 'Enable' => ['description' => '是否开启CPU亲和性。'."\n" + ."\n" + .'true:开启。 false:不开启。', 'type' => 'boolean', 'example' => 'true'], ], ], ], ], - 'ImageAuth' => [ - 'title' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', - 'description' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', - 'type' => 'string', - 'example' => 'YWxpeXVuNjUzMzM5MjIwMzoqKioqKio=', - ], + 'ImageAuth' => ['title' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'description' => '用户私有镜像的账号密码信息base64编码后的值,密码部分会被隐藏。', 'type' => 'string', 'example' => 'YWxpeXVuNjUzMzM5MjIwMzoqKioqKio='], 'Tags' => [ 'description' => '标签列表。', 'type' => 'array', @@ -3064,64 +2337,65 @@ 'description' => '资源标签。', 'type' => 'object', 'properties' => [ - 'TagKey' => [ - 'description' => '标签 Key。', - 'type' => 'string', - 'example' => 'tag1', - ], - 'TagValue' => [ - 'description' => '标签值。', - 'type' => 'string', - 'example' => 'value1', - ], + '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', - ], + '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', - ], + 'items' => ['$ref' => '#/components/schemas/PodIp'], ], - 'MigrationOptions' => [ - 'title' => '实例迁移选项', - 'description' => '实例迁移选项', + 'MigrationOptions' => ['title' => '实例迁移选项', 'type' => 'object'], + 'AccessRestrictionRules' => [ + 'title' => '实例限制规则。', 'type' => 'object', + 'additionalProperties' => ['type' => 'string'], ], + 'DockerConfig' => [ + 'title' => '实例的docker配置.', + 'type' => 'object', + 'properties' => [ + 'Enable' => ['title' => '实例内是否启动docker', 'type' => 'boolean'], + 'ContainersLimit' => ['title' => '实例内的子容器上限。', 'type' => 'integer', 'format' => 'int64', 'example' => '10'], + 'MountAccessConfigPath' => ['title' => '二级容器挂载权限配置的所在路径。', 'type' => 'string', 'example' => '/etc/docker/dockerboard/mount_access.json'], + ], + ], + 'TenantId' => ['type' => 'string'], ], ], ], ], - '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"}]', + '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\\": \\"Test user\\",\\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\\": \\"ssh-rsa AAAAB3****************************\\\\n\\",\\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 \\"NlbGatewayId\\": \\"\\"\\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\\": \\"S\\",\\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\\": \\"/mnt/dynamic/\\",\\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 \\"AccessRestrictionRules\\": {\\n \\"key\\": \\"\\"\\n },\\n \\"DockerConfig\\": {\\n \\"Enable\\": true,\\n \\"ContainersLimit\\": 10,\\n \\"MountAccessConfigPath\\": \\"/etc/docker/dockerboard/mount_access.json\\"\\n },\\n \\"TenantId\\": \\"\\"\\n}","type":"json"}]', 'title' => '查询实例详情', - ], - 'ListInstances' => [ - 'summary' => '查询DSW实例列表。', - 'path' => '/api/v2/instances', - 'methods' => [ - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstance'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'GetInstanceEvents' => [ + 'path' => '/api/v2/instances/{InstanceId}/events', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -3133,1146 +2407,114 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '118637', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'abilityTreeCode' => '191013', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], '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', - ], + 'in' => 'path', + 'schema' => ['description' => '实例ID。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], ], [ - 'name' => 'MaxGpuMemory', + 'name' => 'MaxEventsNum', 'in' => 'query', - 'schema' => [ - 'description' => '最大单卡Gpu内存大小,单位是G。', - 'type' => 'string', - 'required' => false, - 'example' => '16', - ], + 'schema' => ['description' => '获取事件的最大数目,默认值:2000。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2000'], ], [ - 'name' => 'ImageName', + 'name' => 'StartTime', 'in' => 'query', - 'schema' => [ - 'title' => '镜像名', - 'description' => '镜像名', - 'type' => 'string', - 'required' => false, - 'example' => 'modelscope:1.9.4-pytorch2.0.1tensorflow2.13.0-cpu-py38-ubuntu20.04', - ], + 'schema' => ['description' => '查询的起始时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z'], ], [ - 'name' => 'Tag', + 'name' => 'EndTime', '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, - ], + 'schema' => ['description' => '查询的结束时间。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T15:00:00Z'], ], [ - 'name' => 'OversoldInfo', + 'name' => 'Token', 'in' => 'query', - 'schema' => [ - 'description' => '实例实际使用的闲时资源类型:'."\n" - .'+ ForbiddenQuotaOverSold:使用保障资源'."\n" - .'+ ForceQuotaOverSold:使用闲时资源'."\n" - .'+ PendingQuotaOverSold:待分配', - 'type' => 'string', - 'required' => false, - 'example' => 'ForceQuotaOverSold', - ], + 'schema' => ['description' => '用于分享url', 'type' => 'string', 'required' => false], ], [ - 'name' => 'OversoldType', + 'name' => 'EventLevel', 'in' => 'query', - 'schema' => [ - 'description' => '用户指定的闲时资源类型:'."\n" - .'+ ForceQuotaOverSold:只使用闲时资源'."\n" - .'+ AcceptQuotaOverSold:可接受闲时资源'."\n" - .'+ ForbiddenQuotaOverSold:使用保障资源', - 'type' => 'string', - 'required' => false, - 'example' => 'AcceptQuotaOverSold', - ], + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], ], [ - 'name' => 'CreateTimeAfter', + 'name' => 'Offset', 'in' => 'query', - 'schema' => [ - 'description' => '筛选出创建时间晚于(或等于)该时间的实例', - 'type' => 'string', - 'required' => false, - 'example' => '2024-01-12T14:36:01Z', - ], + 'schema' => ['type' => 'integer', 'format' => 'int32'], ], [ - 'name' => 'CreateTimeBefore', + 'name' => 'Reverse', 'in' => 'query', - 'schema' => [ - 'description' => '筛选出创建时间早于(或等于)该时间的实例', - 'type' => 'string', - 'required' => false, - 'example' => '2024-01-12T15:36:01Z', - ], + 'schema' => ['type' => 'boolean'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => '实例列表', - 'description' => '实例列表。', + '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"', - ], - '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' => '本分页中请求的实例列表。', + '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' => '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', + 'items' => ['description' => '事件信息内容。', 'type' => 'string', 'example' => 'You are using pip version 9.0.1, however version 20.2.4 is available. '], ], + 'TotalCount' => ['type' => 'integer', 'format' => 'int32'], ], ], ], ], - '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' => [ + 'staticInfo' => ['returnType' => 'synchronous'], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], + ], + 'title' => '获取实例的事件列表', 'summary' => '获取DSW实例的系统事件。', - 'path' => '/api/v2/instances/{InstanceId}/events', - 'methods' => [ - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceEvents'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceEvents', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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 \\"TotalCount\\": 0\\n}","type":"json"}]', + ], + 'GetInstanceMetrics' => [ + 'path' => '/api/v2/instance/{InstanceId}/metrics', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -4284,545 +2526,307 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '191013', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeCode' => '152077', + 'abilityTreeNodes' => ['FEATURElearnTBR2KU'], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', - 'schema' => [ - 'description' => '实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + 'schema' => ['description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], ], [ - 'name' => 'MaxEventsNum', + 'name' => 'MetricType', 'in' => 'query', 'schema' => [ - 'description' => '获取事件的最大数目,默认值:2000。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '2000', + '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', - ], + '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', - ], + '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', + 'name' => 'TimeStep', 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], + 'schema' => ['description' => '指标获取的时间间隔。单位为分钟。', 'type' => 'string', 'required' => false, 'example' => '15m'], ], ], '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。', + 'title' => 'MetricResult', + 'description' => '实例指标结果。', 'type' => 'object', 'properties' => [ - 'Labels' => [ - 'title' => '需要更新的标签', - 'description' => '需要更新的标签列表。', + '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' => '用户定义标签。', + 'description' => '实例对应的某个Pod指标详情。', 'type' => 'object', 'properties' => [ - 'Key' => [ - 'description' => '用户自定义标签的Key。', - 'type' => 'string', - 'required' => true, - 'example' => 'customLabelKey', - ], - 'Value' => [ - 'description' => '用户自定义标签的Value。', - 'type' => 'string', - 'required' => true, - 'example' => 'labelValue', + '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'], + ], + ], ], ], - 'required' => false, ], - 'required' => true, ], ], - 'required' => false, ], ], - [ - 'name' => 'InstanceId', - 'in' => 'path', - 'schema' => [ - 'title' => 'DSW实例Id', - 'description' => 'DSW实例ID。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + ], + 'title' => '获取实例指标', + 'summary' => '获取实例运行的资源指标。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '800', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceMetrics'], ], ], - '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', - ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceMetrics', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\"\\n}","type":"json"}]', - 'title' => '更新实例的标签', + '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"}]', ], - 'DeleteInstanceLabels' => [ - 'summary' => '删除DSW实例的标签。', - 'path' => '/api/v2/instances/{InstanceId}/labels', - 'methods' => [ - 'delete', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetInstanceShutdownTimer' => [ + 'summary' => '获取实例定时关机任务详情。', + 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', + 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '228180', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeCode' => '118639', + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], ], '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', - ], + 'schema' => ['title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应结果。', + 'title' => '定时关机任务', + 'description' => '定时关机任务。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '473469C7-AA6F-4DC5-B3DB-A3DC0DE3****', - ], + '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'], ], ], ], ], - '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', + 'title' => '获取实例定时关机任务详情', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceShutdownTimer'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceShutdownTimer', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'GetInstanceSnapshot' => [ + 'path' => '/api/v2/instances/{InstanceId}/snapshots/{SnapshotId}', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', - 'abilityTreeCode' => '247984', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '118644', + 'abilityTreeNodes' => ['FEATURElearnE5ZUBR'], ], '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, - ], + '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' => 'Schema of Response', - 'description' => 'Schema of Response', + 'title' => '实例快照详情', + 'description' => '返回结构体。', '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列表。', + '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' => [ - 'description' => '成功删除的实例ID。', - 'type' => 'string', - 'example' => '[\'dsw-6lo809wgmnfcl9sn34\']', + 'type' => 'object', + 'properties' => [ + 'Key' => ['title' => '用户定义标签键', 'description' => '用户定义标签键', 'type' => 'string', 'example' => 'stsTokenOwner'], + 'Value' => ['title' => '用户定义标签值', 'description' => '用户定义标签值', 'type' => 'string', 'example' => '123xxxxxxxx'], + ], + 'description' => '', ], + 'example' => '{\'foo\': \'bar\'}', ], - 'AccessDeniedDetail' => [ - 'description' => '权限校验失败详情。', - 'type' => 'object', - 'example' => '{}', + 'ExcludePaths' => [ + 'title' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件', + 'description' => '排除文件路径列表,仅支持 ECI 实例设置, 用于制作镜像时忽略指定文件夹或文件', + 'type' => 'array', + 'items' => ['type' => 'string', 'description' => ''], ], ], ], ], ], - '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' => [], - ], + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], ], - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'abilityTreeCode' => '247825', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', + 'title' => '获取实例快照', + 'summary' => '调用GetInstanceSnapshot,获取用户实例快照。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceSnapshot'], ], ], - 'parameters' => [ + 'ramActions' => [ [ - '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, - ], + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], ], - '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' => '批量停止实例', + '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"}]', ], 'GetLifecycle' => [ - 'summary' => '获取实例的生命周期。', 'path' => '/api/v2/instances/{InstanceId}/lifecycle', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -4835,83 +2839,45 @@ 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeCode' => '158370', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', - 'schema' => [ - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-9698d842b6***', - ], + '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', - ], + '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', - ], + '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', - ], + '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', - ], + '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', - ], + 'schema' => ['description' => '结果的排序方式,取值如下:'."\n" + .'- ASC:按时间升序。'."\n" + .'- DESC:按时间降序。', 'type' => 'string', 'required' => false, 'example' => 'DESC'], ], [ 'name' => 'Token', 'in' => 'query', - 'schema' => [ - 'description' => '用于分享url', - 'type' => 'string', - 'required' => false, - ], + 'schema' => ['description' => '用于分享url', 'type' => 'string', 'required' => false], ], ], 'responses' => [ @@ -4921,34 +2887,14 @@ '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', - ], + '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', @@ -4979,57 +2925,22 @@ .'- 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', + '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', - ], + 'ReasonCode' => ['description' => '发生某种事件的原因对应的代码。', 'type' => 'string', 'example' => '“”'], + 'ReasonMessage' => ['description' => '发生某种事件的原因描述。', 'type' => 'string', 'example' => '“”'], + 'GmtCreateTime' => ['description' => '该状态创建的时间,即流转到该状态的时间(GMT)。', 'type' => 'string', 'example' => '2022-10-21T07:27:44Z'], + 'GmtEndTime' => ['type' => 'string', 'description' => ''], + 'LifecycleId' => ['type' => 'string', 'description' => ''], ], ], ], 'example' => '[[{"Status":"Creating","GmtCreateTime":"2022-09-19T22:38:00Z","Reason":"","ReasonCode":""}]]', ], - 'TotalCount' => [ - 'description' => '查询得到的Session总数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '35', - ], + 'TotalCount' => ['description' => '查询得到的Session总数。', 'type' => 'integer', 'format' => 'int32', 'example' => '35'], ], ], ], @@ -5038,1623 +2949,1018 @@ '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' => '获取实例生命周期', + 'summary' => '获取实例的生命周期。', 'description' => '获取实例的生命周期流转信息,可以获取实例在某个时间点流转到某个状态的详情。', - ], - 'GetInstanceMetrics' => [ - 'path' => '/api/v2/instance/{InstanceId}/metrics', - 'methods' => [ - 'get', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetLifecycle'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetLifecycle', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'GetMetrics' => [ + 'path' => '/api/v2/instance/{InstanceId}/cms/metrics', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'abilityTreeCode' => '152077', - 'abilityTreeNodes' => [ - 'FEATURElearnTBR2KU', - ], + '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' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + 'schema' => ['description' => '(必填)DSW 实例 ID。', 'type' => 'string', 'required' => false, 'example' => 'dsw-328d2bbf605*****'], ], [ - 'name' => 'MetricType', + 'name' => 'Dimensions', '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', - ], + 'schema' => ['description' => '(必填)请求参数。', 'type' => 'string', 'required' => false, 'example' => '{"userId":"16122852825*****","jobId":"dsw-328d2bbf605*****","regionId":"cn-wulanchabu","pod":"dsw-45680-76766f8778-95gxh"}'], ], [ - 'name' => 'StartTime', + 'name' => 'Length', 'in' => 'query', - 'schema' => [ - 'description' => '获取实例指标的起始时间。', - 'type' => 'string', - 'required' => false, - 'example' => '2020-11-08T15:00:00Z', - ], + 'schema' => ['description' => '每一页显示的最大记录数,不超过1440。', 'type' => 'string', 'required' => false, 'example' => '10'], ], [ 'name' => 'EndTime', 'in' => 'query', - 'schema' => [ - 'description' => '获取实例指标的结束时间。', - 'type' => 'string', - 'required' => false, - 'example' => '2020-11-08T15:00:00Z', - ], + 'schema' => ['description' => '截止时间,默认是当前。', 'type' => 'string', 'required' => false, 'example' => '2020-11-08T16:00:00Z'], ], [ - 'name' => 'TimeStep', + 'name' => 'Period', 'in' => 'query', - 'schema' => [ - 'description' => '指标获取的时间间隔。单位为分钟。', - 'type' => 'string', - 'required' => false, - 'example' => '15m', - ], + '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' => 'MetricResult', - 'description' => '实例指标结果。', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', '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', - ], - ], - ], - ], - ], - ], - ], + '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'], ], ], ], ], - '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', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取指标', + 'summary' => '获取实例的Metrics指标。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '800', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetMetrics'], + ], ], + 'ramActions' => [], + '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"}]', + ], + 'GetResourceGroupStatistics' => [ + 'path' => '/api/v2/resourcegroupstatistics', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', - 'abilityTreeCode' => '118641', - 'abilityTreeNodes' => [ - 'FEATURElearnE5ZUBR', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '166697', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'path', - 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + 'name' => 'WorkspaceIds', + 'in' => 'query', + 'schema' => ['description' => '工作空间ID列表,多个ID间使用半角逗号(,)分隔。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '27218,34956'], ], [ - '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, - ], + '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' => '执行结果', - 'description' => '执行结果。', + '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' => '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', + '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\\": \\"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', + 'title' => '获取资源组统计信息', + 'summary' => '资源组是特定用户。在使用PAI产品前,预先购买的一组机器资源;这些机器资源专属于此客户,不会被其他客户分享。用户后续的PAI计算任务,或算法开发环境,将运行在这组机器上。此功能用于统计在指定资源组上,运行的 DSW 实例(算法开发环境)的当前和历史运行状态(成功,失败,停止等等),以帮助用户了解在资源组内运行任务的历史状态,更有效率的利用资源组内的机器资源。', + 'description' => '输入用户的工作空间ID和资源组ID,以及统计时间区间,就可获取在指定工作空间和资源组下DSW实例运行状态统计数据。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetResourceGroupStatistics'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetResourceGroupStatistics', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'GetSanityCheckTask' => [ + 'path' => '/api/v2/sanitychecks/{CheckType}/{TaskId}', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', - 'abilityTreeCode' => '118643', - 'abilityTreeNodes' => [ - 'FEATURElearnE5ZUBR', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ - 'name' => 'InstanceId', + 'name' => 'CheckType', 'in' => 'path', 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', + 'description' => '检查项类型。取值:'."\n" + ."\n" + .'SSH:用于触发实例SSH健康检查', 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', + 'required' => false, + 'enumValueTitles' => ['SSH' => 'SSH'], + 'example' => 'SSH', ], ], [ - 'name' => 'SnapshotId', + 'name' => 'TaskId', 'in' => 'path', - 'schema' => [ - 'title' => '实例快照Id', - 'description' => '实例快照ID。如何获取实例快照ID,请参见[ListInstanceSnapshot](~~470434~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'snp-05cexxxxxxxxx', - ], + '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' => '实例快照详情', - 'description' => '实例快照详情。', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', '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', + '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"'], ], - 'SnapshotId' => [ - 'title' => '实例快照Id', - 'description' => '实例快照ID。', - 'type' => 'string', - 'example' => 'snp-05cexxxxxxxxx', + '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'], + ], + ], ], ], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'GetSanityCheckTask', + 'summary' => '用于查询指定健康检查任务的当前状态及结果。通过传入任务 ID 和检查类型,可获取任务的执行进度(如 Pending、Executing、Completed 或 Failed)、开始/结束时间、发现的问题列表(Issues)等信息。若请求时设置 verbose=true,还将返回每个检查项(checkpoint)的详细分析结果(CheckDetails),包括检查项名称、描述、结果及失败原因,便于精准定位问题。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetSanityCheckTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - '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' => '删除实例快照', + '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"}]', ], - 'GetInstanceSnapshot' => [ - 'summary' => '调用GetInstanceSnapshot,获取用户实例快照。', - 'path' => '/api/v2/instances/{InstanceId}/snapshots/{SnapshotId}', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetTempFile' => [ + 'summary' => '获取临时文件详情', + 'path' => '/api/v2/tempfiles/{TempFileId}', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'abilityTreeCode' => '118644', - 'abilityTreeNodes' => [ - 'FEATURElearnE5ZUBR', - ], + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '207260', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'path', - 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], - ], - [ - 'name' => 'SnapshotId', + 'name' => 'TempFileId', 'in' => 'path', - 'schema' => [ - 'title' => '实例快照Id', - 'description' => '实例快照ID。如何获取实例快照ID,请参见[ListInstanceSnapshot](~~470434~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'snp-05cexxxxxxxxx', - ], + 'schema' => ['title' => '临时文件Id', 'description' => '临时文件Id', 'type' => 'string', 'required' => true, 'example' => 'tempfile-05cexxxxxxxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => '实例快照详情', - 'description' => '返回结构体。', + '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', - ], - ], + 'UserId' => ['title' => '用户Id', 'description' => '用户Id', 'type' => 'string', 'example' => '1612285282502324'], + 'OwnerId' => ['title' => 'Owner Id', 'description' => 'Owner Id', 'type' => 'string', 'example' => '1612285282502324'], + 'TaskId' => ['title' => '任务Id', 'description' => '任务Id', 'type' => 'string', 'example' => 'task-05cexxxxxxxxx'], + 'InstanceId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx'], + 'Type' => ['title' => '文件类型', 'description' => '文件类型', 'type' => 'string', 'example' => 'type'], + 'GmtCreateTime' => ['title' => '临时文件创建时间', 'description' => '临时文件创建时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'GmtModifiedTime' => ['title' => '临时文件修改时间', 'description' => '临时文件修改时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'GmtExpiredTime' => ['title' => '临时文件过期时间', 'description' => '临时文件过期时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'Uuid' => ['title' => '临时文件Id', 'description' => '临时文件Id', 'type' => 'string', 'example' => 'tempfile-05cexxxxxxxxx'], + 'Name' => ['title' => '临时文件名称', 'description' => '临时文件名称', 'type' => 'string', 'example' => 'filename'], + 'Description' => ['title' => '临时文件描述', 'description' => '临时文件描述', 'type' => 'string', 'example' => 'desc'], + 'Capacity' => ['title' => '临时文件容量', 'description' => '临时文件容量', 'type' => 'integer', 'format' => 'int64', 'example' => '1000'], + 'Status' => ['title' => '临时文件状态', 'description' => '临时文件状态', 'type' => 'string', 'example' => 'Created'], + 'Prefix' => ['title' => '临时文件存储路径前缀', 'description' => '临时文件存储路径前缀', 'type' => 'string', 'example' => '/1079135428626537/209170658818096848/'], + 'Bandwidth' => ['title' => '临时文件上传带宽', 'description' => '临时文件上传带宽', 'type' => 'integer', 'format' => 'int32', 'example' => '10Mi'], + 'UploadUrl' => ['title' => '临时文件上传url', 'description' => '临时文件上传url', 'type' => 'string', 'example' => 'http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123154&OSSAccessKeyId&Signature=5ekVo7r+CeeU5oYmCpnmrzrx2IM='], + 'DownloadUrl' => ['title' => '临时文件下载url', 'description' => '临时文件下载url', 'type' => 'string', 'example' => 'http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123270&OSSAccessKeyId&Signature=Fn7xSv2kRQraU6UqRZ3+DMzQK14='], + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], ], ], ], ], - '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', + 'title' => '获取临时文件信息', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetTempFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"UserId\\": \\"1612285282502324\\",\\n \\"OwnerId\\": \\"1612285282502324\\",\\n \\"TaskId\\": \\"task-05cexxxxxxxxx\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"Type\\": \\"type\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtExpiredTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"Uuid\\": \\"tempfile-05cexxxxxxxxx\\",\\n \\"Name\\": \\"filename\\",\\n \\"Description\\": \\"desc\\",\\n \\"Capacity\\": 1000,\\n \\"Status\\": \\"Created\\",\\n \\"Prefix\\": \\"/1079135428626537/209170658818096848/\\",\\n \\"Bandwidth\\": 0,\\n \\"UploadUrl\\": \\"http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123154&OSSAccessKeyId&Signature=5ekVo7r+CeeU5oYmCpnmrzrx2IM=\\",\\n \\"DownloadUrl\\": \\"http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123270&OSSAccessKeyId&Signature=Fn7xSv2kRQraU6UqRZ3+DMzQK14=\\",\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200\\n}","type":"json"}]', + ], + 'GetTempFileTask' => [ + 'path' => '/api/v2/tempfiletasks/{TempFileTaskId}', + 'methods' => ['get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '251423', + 'abilityTreeNodes' => ['FEATURElearnQVNGD3'], ], 'parameters' => [ [ - 'name' => 'InstanceId', + 'name' => 'TempFileTaskId', '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', - ], + 'schema' => ['title' => '临时文件任务Id', 'description' => '临时文件任务Id', 'type' => 'string', 'required' => true, 'example' => 'task-05cexxxxxxxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => '实例快照列表', - 'description' => '实例快照列表。', + '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"]', - ], - ], - ], - ], + 'UserId' => ['title' => '用户Id', 'description' => '用户Id', 'type' => 'string', 'example' => '1612285282502324'], + 'OwnerId' => ['title' => 'Owner Id', 'description' => 'Owner Id', 'type' => 'string', 'example' => '1612285282502324'], + 'GmtCreateTime' => ['title' => '任务创建时间', 'description' => '任务创建时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'GmtModifiedTime' => ['title' => '任务修改时间', 'description' => '任务修改时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'GmtExpiredTime' => ['title' => '任务过期时间', 'description' => '任务过期时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'Uuid' => ['title' => '任务UUId', 'description' => '任务UUId', 'type' => 'string', 'example' => 'tempfile-05cexxxxxxxxx'], + 'InstanceId' => ['title' => 'dsw实例Id', 'description' => 'dsw实例Id', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx'], + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], ], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取临时文件任务信息', + 'summary' => '获取临时文件任务', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - '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' => '查询实例快照列表', + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"UserId\\": \\"1612285282502324\\",\\n \\"OwnerId\\": \\"1612285282502324\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtExpiredTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"Uuid\\": \\"tempfile-05cexxxxxxxxx\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200\\n}","type":"json"}]', ], - 'GetResourceGroupStatistics' => [ - 'path' => '/api/v2/resourcegroupstatistics', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetToken' => [ + 'path' => '/api/v2/tokens', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'produces' => [ - 'application/json', - ], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'abilityTreeCode' => '166697', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '147022', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ - 'name' => 'WorkspaceIds', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID列表,多个ID间使用半角逗号(,)分隔。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', - 'type' => 'string', - 'required' => true, - 'example' => '27218,34956', - ], + 'schema' => ['description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], ], [ - 'name' => 'ResourceId', + 'name' => 'ExpireTime', 'in' => 'query', - 'schema' => [ - 'description' => '资源组ID,唯一标识客户的资源组(机器组)。', - 'type' => 'string', - 'required' => true, - 'example' => 'rg-123456789', - ], + 'schema' => ['description' => '过期时间,单位为秒。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '60'], ], [ - 'name' => 'StartTime', + 'name' => 'Type', 'in' => 'query', 'schema' => [ - 'description' => '统计开始时间。', + 'description' => '签发的token类型'."\n" + .'* Access : 用于进入DSW实例内部执行操作。具备操作权限。'."\n" + .'* View:用于只读分享 DSW 实例信息(如状态、配置、日志等),不具备修改或控制权限,适用于协作者或外部查看者。', 'type' => 'string', - 'required' => true, - 'example' => '2020-11-08T15:00:00Z', + 'required' => false, + 'example' => 'Access', + 'default' => 'Access', + 'enum' => ['Access', 'View'], ], ], [ - 'name' => 'EndTime', + 'name' => 'Audience', 'in' => 'query', 'schema' => [ - 'description' => '统计结束时间。', + 'description' => 'Audience 用于指定 Token 的预期持有者(即使用方)。'."\n" + .'当您通过自建 Web 应用接入 DSW页面 时,请将 audience 设置为 ThirdParty。', 'type' => 'string', - 'required' => true, - 'example' => '2020-11-08T15:00:00Z', + 'required' => false, + 'example' => 'Aliyun', + 'default' => 'Aliyun', + 'enum' => ['Aliyun', 'ThirdParty'], ], ], ], 'responses' => [ 200 => [ - 'headers' => [], 'schema' => [ - 'title' => 'ResourceGroupStatisticsResult', - 'description' => '资源组统计信息。', + 'title' => 'TokenResult', + 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => '请求Id', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948', - ], + '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' => '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。', - ], - ], + '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' => '*******'], ], ], ], ], - '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', + 'title' => '获取实例临时鉴权信息', + 'summary' => '获取指定DSW实例的临时鉴权信息。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetToken'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"ValidationError\\",\\n \\"Token\\": \\"*******\\"\\n}","type":"json"}]', + ], + 'GetUserCommand' => [ + 'summary' => '获取用户自定义命令。', + 'path' => '/api/v2/usercommands/{UserCommandId}', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'APP' => [], + ], ], + 'consumes' => [], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'abilityTreeCode' => '118645', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '273001', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ - 'name' => 'WorkspaceIds', + 'name' => 'UserCommandId', + 'in' => 'path', + 'schema' => ['description' => '用户自定义命令的ID。可通过GetInstance等接口获取。', 'type' => 'string', 'required' => false, 'example' => '1900'], + ], + [ + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'title' => '工作空间列表', - 'description' => '工作空间ID列表。多个ID间使用半角逗号(,)分隔。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', - 'type' => 'string', - 'required' => true, - 'example' => '27218,34956', - ], + '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' => '实例统计信息', - 'description' => '实例统计信息。', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', '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' => '统计信息。', + 'UserCommandId' => ['description' => '用户自定义命令的ID。', 'type' => 'string', 'example' => '1900'], + 'OnStart' => [ + 'description' => '自定义启动命令,每次实例启动时会执行。', 'type' => 'object', - 'additionalProperties' => [ - 'type' => 'object', - 'additionalProperties' => [ - 'type' => 'integer', - 'format' => 'int64', - 'example' => '5', - 'description' => '统计值。', - ], - 'description' => '某项统计信息:RunningCount:3。', + '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" + .' }'], ], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取用户自定义命令', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetUserCommand', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - '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' => '获取实例统计信息', + '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"}]', ], - 'CreateInstanceShutdownTimer' => [ - 'summary' => '调用CreateInstanceShutdownTimer,创建实例定时关机任务。', - 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetUserConfig' => [ + 'summary' => '调用GetUserConfig,查询用户信息。', + 'path' => '/api/v2/userconfig', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', '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, - ], - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '118609', + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], ], + 'parameters' => [], 'responses' => [ 200 => [ 'schema' => [ - 'title' => '执行结果', - 'description' => '执行结果。', + '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', + '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 \\"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', + 'title' => '查询用户信息', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetUserConfig'], ], ], - 'parameters' => [ + 'ramActions' => [ [ - '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', - ], + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetUserConfig', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - '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' => '删除实例定时关机任务', + '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"}]', ], - 'GetInstanceShutdownTimer' => [ - 'summary' => '获取实例定时关机任务详情。', - 'path' => '/api/v2/instances/{InstanceId}/shutdowntimer', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ListEcsSpecs' => [ + 'path' => '/api/v2/ecsspecs', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'abilityTreeCode' => '118639', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '118542', + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'path', - 'schema' => [ - 'title' => '实例Id', - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + '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, 'description' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => '定时关机任务', - 'description' => '定时关机任务。', + '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', - ], - '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', + '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', 'description' => ''], + 'SpotStockStatus' => ['type' => 'string', 'description' => ''], + ], + ], ], ], ], ], ], - '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', + 'title' => '获取ECS规格列表', + 'summary' => '获取ECS规格列表。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListEcsSpecs'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:ListEcsSpecs', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'ListInstanceSnapshot' => [ + 'path' => '/api/v2/instances/{InstanceId}/snapshots', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', - 'abilityTreeCode' => '154060', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATURElearnE5ZUBR'], ], 'parameters' => [ [ 'name' => 'InstanceId', 'in' => 'path', - 'schema' => [ - 'description' => '设定自动关机的实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + '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, - ], + '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' => 'IdleInstanceCullerIdResult', - 'description' => '返回结构体。', + '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', - 'enumValueTitles' => [ - 'true' => 'true', - 'false' => 'false', + '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', 'description' => ''], + 'example' => '["/path1","/path2"]', + ], + ], ], - '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', ], ], ], @@ -6664,89 +3970,81 @@ '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', + 'title' => '查询实例快照列表', + 'summary' => '查询实例快照列表。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstanceSnapshot'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:ListInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'ListInstanceStatistics' => [ + 'path' => '/api/v2/instancestatistics', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'delete', - 'abilityTreeCode' => '154058', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '118645', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'path', - 'schema' => [ - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + 'name' => 'WorkspaceIds', + 'in' => 'query', + 'schema' => ['title' => '工作空间列表', 'description' => '工作空间ID列表。多个ID间使用半角逗号(,)分隔。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '27218,34956'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'IdleInstanceCullerIdResult', - 'description' => '返回结构体。', + 'title' => '实例统计信息', + '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', + '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。', ], - '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', ], ], ], @@ -6756,833 +4054,690 @@ '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', + 'title' => '获取实例统计信息', + 'summary' => '获取实例统计信息。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstanceStatistics'], + ], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:ListInstanceStatistics', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + '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"}]', + ], + 'ListInstances' => [ + 'summary' => '查询DSW实例列表。', + 'path' => '/api/v2/instances', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', - 'abilityTreeCode' => '154059', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '118637', + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], ], 'parameters' => [ [ - 'name' => 'InstanceId', - 'in' => 'path', + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['title' => '工作空间Id', 'description' => '按工作空间ID筛选。如何获取工作空间ID,请参见[ListWorkspaces](~~449124~~)。默认值为空,此时会使用当前子账号的“默认工作空间”,如何查看默认工作空间,请参见[GetDefaultWorkspace](https://help.aliyun.com/zh/pai/developer-reference/api-aiworkspace-2021-02-04-getdefaultworkspace?spm=a2c4g.11186623.help-menu-30347.d_5_0_1_4_2_5.6e1f4c800OFLec)。如果需要查询所有工作空间的实例,请填写ALL。', '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进行筛选,如何获取资源配额ID请参见[ListQuotas](https://help.aliyun.com/zh/pai/developer-reference/api-aiworkspace-2021-02-04-listquotas)。'."\n" + .'默认值为空,此时只返回后付费资源组的实例。'."\n" + .'填 ALL 会返回所有的实例。', 'type' => 'string', 'required' => false, 'example' => 'ALL'], + ], + [ + 'name' => 'Status', + 'in' => 'query', 'schema' => [ - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', + 'title' => '实例状态', + 'description' => '根据输入值对实例状态进行筛选。默认为空,此时查询所有状态的实例。', 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', + 'required' => false, + 'enumValueTitles' => [ + 'Creating' => '创建中', 'SaveFailed' => '镜像保存失败', 'Stopped' => '已停止', 'Failed' => '失败', 'ResourceAllocating' => '资源分配中', 'Stopping' => '停止中', 'Updating' => '更新中', 'Saving' => '镜像保存中', 'Queuing' => '排队中', 'Recovering' => '恢复中', + 'Starting' => '启动中', 'Running' => '运行中', 'Saved' => '镜像保存成功', 'Deleting' => '删除中', 'EnvPreparing' => '环境准备中', + ], + 'example' => 'Running', ], ], - ], - 'responses' => [ - 200 => [ + [ + 'name' => 'PaymentType', + 'in' => 'query', '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', - ], - ], + 'description' => '根据输入值对实例的付费类型(预付费或后付费)进行筛选。默认为空,此时查询所有付费类型的实例。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['PayAsYouGo' => '后付费(后付费/按量付费)', 'Subscription' => '预付费(预付费/包年包月)'], + 'example' => 'PayAsYouGo', ], ], - ], - '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', + 'name' => 'Accessibility', + 'in' => 'query', + 'schema' => ['description' => '根据输入值对实例的工作空间可见性进行筛选。默认为空,此时查询所有可见性的实例。可取值如下:'."\n" + .'- PRIVATE(默认值):表示工作空间内自己以及管理员可见。'."\n" + .'- PUBLIC:为工作空间所有用户可见。', 'type' => 'string', 'required' => false, 'example' => 'PRIVATE'], ], - ], - 'parameters' => [ [ 'name' => 'AcceleratorType', 'in' => 'query', 'schema' => [ - 'title' => '加速类型', - 'description' => '加速器类型。 '."\n" + 'description' => '根据输入值对实例的加速类型进行筛选。默认为空,此时查询所有加速类型的实例。可取值如下:'."\n" .'- CPU:无计算加速,只使用CPU计算。'."\n" .'- GPU:使用GPU进行计算加速。', 'type' => 'string', - 'required' => true, + 'required' => false, + 'enumValueTitles' => ['CPU' => 'CPU', 'GPU' => 'GPU'], 'example' => 'CPU', ], ], [ 'name' => 'PageNumber', 'in' => 'query', - 'schema' => [ - 'title' => '页数', - 'description' => 'ECS规格列表的页码。起始值为1,默认为1。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - 'default' => '1', - ], + 'schema' => ['title' => '页码', 'description' => '实例分页查询的页码。起始值为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', - ], + 'schema' => ['title' => '分页数量大小', 'description' => '分页查询每页返回的实例数量,默认为10。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10', 'default' => '10'], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'title' => '排序字段', - 'description' => '该字段已废弃,不要使用。', + 'description' => '排序字段。', 'type' => 'string', 'required' => false, - 'example' => 'gmtCreate', - 'default' => 'gmtCreate', + 'enumValueTitles' => [ + 'Status' => '实例状态', ' AcceleratorType' => '实例资源类型 [GPU, CPU]', 'Accessibility' => '可见性', 'InstanceId' => '实例ID', 'Priority' => '优先级', 'Memory' => '内存大小', 'CPU' => 'CPU核数', 'GPU' => 'GPU数量', 'GmtModifiedTime' => '修改时间', 'OversoldInfo' => '闲时资源状态', + 'InstanceName' => '实例名', 'ResourceId' => '资源配额ID', 'UserId' => '用户ID', 'OversoldType' => '闲时资源类型', 'GmtCreateTime' => '创建时间', + ], + 'example' => 'GmtCreateTime', + 'default' => 'GmtModifiedTime', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ - 'title' => '排序顺序', - 'description' => '排序顺序。取值如下:'."\n" - .'- ASC:升序。'."\n" - .'- DESC:降序。', + 'title' => '排列顺序', + 'description' => '排列顺序。可取值DESC或ASC,默认为DESC。', 'type' => 'string', 'required' => false, + 'enumValueTitles' => ['ASC' => '升序', 'DESC' => '降序'], 'example' => 'DESC', 'default' => 'DESC', ], ], [ - 'name' => 'ResourceType', + '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组标签,多组标签之间以AND条件进行组合筛选。', '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。如果填写该项,则筛选出CPU数量大于输入值的实例。', 'type' => 'string', 'required' => false, 'example' => '2000'], + ], + [ + 'name' => 'MaxCpu', + 'in' => 'query', + 'schema' => ['description' => '最大的CPU数量,单位是0.001 CPU,1000表示1个CPU。如果填写该项,则筛选出CPU数量小于输入值的实例。', 'type' => 'string', 'required' => false, 'example' => '30000'], + ], + [ + 'name' => 'MinGpu', + 'in' => 'query', + 'schema' => ['description' => '最小的GPU数量,单位是0.001 GPU,1000表示1个GPU。如果填写该项,则筛选出GPU数量大于输入值的实例。', 'type' => 'string', 'required' => false, 'example' => '100'], + ], + [ + 'name' => 'MaxGpu', + 'in' => 'query', + 'schema' => ['description' => '最大的GPU数量,单位是0.001 GPU,1000表示1个GPU。如果填写该项,则筛选出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。如果填写该项,则筛选出GPU显存大于输入值的实例。', 'type' => 'string', 'required' => false, 'example' => '8'], + ], + [ + 'name' => 'MaxGpuMemory', + 'in' => 'query', + 'schema' => ['description' => '最大单卡 GPU 显存大小,单位是 G。如果填写该项,则筛选出 GPU 显存小于输入值的实例。', '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' => [ - 'type' => 'string', + 'description' => '标签列表。如果填写该项,则根据输入值按照实例的标签进行筛选,最多支持 4 组标签,多组标签之间以 AND 条件进行组合筛选。', + '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' => 'ECS规格列表', - 'description' => 'ECS规格列表。', + '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', - ], - 'EcsSpecs' => [ + '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' => 'Ecs规格。', + 'description' => '实例对象。', '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', + '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' => 'Test user'], + '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'], + ], + ], ], - 'SystemDiskCapacity' => [ - 'title' => '系统盘大小(GB)', - 'description' => '系统盘大小(GB)。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '500', + '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', 'description' => ''], + 'Ip' => ['type' => 'string', 'description' => ''], + ], ], - 'AcceleratorType' => [ - 'title' => '资源类型', - 'description' => '资源类型。', - 'type' => 'string', - 'example' => 'CPU', + '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'], + ], ], - 'Price' => [ - 'title' => '价格', - 'description' => '价格。', - 'type' => 'number', - 'format' => 'double', - 'example' => '22.8', + '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'], + ], ], - 'Currency' => [ - 'title' => '货币单位', - 'description' => '货币单位。', - 'type' => 'string', - 'example' => 'CNY', + '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"}', ], - 'InstanceBandwidthRx' => [ - 'title' => '实例接收带宽', - 'description' => '实例接收带宽。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '5120000', + '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' => 'ECS规格标签列表。', + 'description' => '用户自定义标签。', 'type' => 'array', 'items' => [ - 'description' => '标签。', + 'description' => '用户定义标签。', 'type' => 'object', 'properties' => [ - 'Key' => [ - 'title' => 'Ecs规格标签键', - 'description' => 'ECS规格标签键。', - 'type' => 'string', - 'example' => 'SupportResourcePackDeduction', - ], - 'Value' => [ - 'description' => 'ECS规格标签值。', - 'type' => 'string', - 'example' => 'true', - ], + 'Key' => ['title' => '用户定义标签键', 'description' => '用户定义标签键值。', 'type' => 'string', 'example' => 'stsTokenOwner'], + 'Value' => ['title' => '用户定义标签值', 'description' => '用户定义标签值。', 'type' => 'string', 'example' => '123xxxxxxxx'], ], ], 'example' => '{\'foo\': \'bar\'}', ], - 'IsAvailable' => [ - 'title' => '资源是否可用', - 'description' => '资源是否可用', - 'type' => 'boolean', - 'example' => 'True', - 'default' => 'true', + '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}', ], - 'GPUMemorySize' => [ - 'type' => 'number', - 'format' => 'float', + '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' => '[]', ], - 'SpotStockStatus' => [ - 'type' => 'string', + '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'], + ], + 'description' => '', + ], + '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'], + 'TenantId' => ['type' => 'string'], ], ], ], + '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 \\"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', + '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\\": \\"Test user\\",\\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\\": \\"ssh-rsa AAAAB3****************************\\\\n\\",\\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 \\"NlbGatewayId\\": \\"\\"\\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\\": \\"S\\",\\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\\": \\"/mnt/dynamic/\\",\\n \\"Options\\": \\"{}\\"\\n }\\n ]\\n },\\n \\"OversoldType\\": \\"\\",\\n \\"OversoldInfo\\": \\"\\",\\n \\"ServiceConfig\\": {\\n \\"JupyterServerPassword\\": \\"\\",\\n \\"JupyterServerAuth\\": \\"\\",\\n \\"CodeServerPassword\\": \\"\\",\\n \\"CodeServerAuth\\": \\"\\"\\n },\\n \\"TenantId\\": \\"\\"\\n }\\n ],\\n \\"MigrationOptions\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n}","type":"json"}]', + 'title' => '查询实例列表', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstances'], ], ], - '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', - ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:ListInstances', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - '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', - ], + 'ListSystemLogs' => [ + 'summary' => '获取系统日志(待下线,请不要使用)', + 'path' => '/api/v2/systemlogs', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', + 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '195184', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeCode' => '254265', + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], '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, - ], + 'name' => 'InstanceId', + 'in' => 'query', + 'schema' => ['description' => 'DSW实例Id。', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx'], ], - ], - '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', - ], - ], - ], + [ + 'name' => 'SourceRequestId', + 'in' => 'query', + 'schema' => ['description' => '出问题的请求RequestId。', 'type' => 'string', 'required' => false, 'example' => '473469C7-******5-B3DB-A3DC0DE3C83E'], ], - ], - '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' => [], + 'name' => 'Offset', + 'in' => 'query', + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], ], - ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeCode' => '147022', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', + [ + 'name' => 'SortBy', + 'in' => 'query', + 'schema' => ['description' => '排序字段:支持以下字段'."\n" + ."\n" + .'- GmtCreateTime'."\n" + .'- GmtModifiedTime', 'type' => 'string', 'required' => false, 'example' => 'GmtCreateTime'], ], - ], - 'parameters' => [ [ - 'name' => 'InstanceId', + 'name' => 'Order', 'in' => 'query', - 'schema' => [ - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx', - ], + 'schema' => ['description' => '排序方向:'."\n" + ."\n" + .'- ASC 升序'."\n" + .'- DESC 降序', 'type' => 'string', 'required' => false, 'example' => 'ASC'], ], [ - 'name' => 'ExpireTime', + 'name' => 'LogRepository', 'in' => 'query', - 'schema' => [ - 'description' => '过期时间,单位为秒。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '60', - ], + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], ], [ - 'name' => 'Type', + 'name' => 'LogLevel', 'in' => 'query', - 'schema' => [ - 'description' => '签发的token类型'."\n" - .'* Access : 用于进入DSW实例内部执行操作。具备操作权限。'."\n" - .'* View:用于只读分享 DSW 实例信息(如状态、配置、日志等),不具备修改或控制权限,适用于协作者或外部查看者。', - 'type' => 'string', - 'required' => false, - 'example' => 'Access', - 'default' => 'Access', - 'enum' => [ - 'Access', - 'View', - ], - ], + 'schema' => ['description' => '日志等级,目前支持'."\n" + ."\n" + .'- Error', 'type' => 'string', 'required' => false, 'example' => 'Error'], ], [ - 'name' => 'Audience', + 'name' => 'GmtStartTime', 'in' => 'query', - 'schema' => [ - 'description' => 'Audience 用于指定 Token 的预期持有者(即使用方)。'."\n" - .'当您通过自建 Web 应用接入 DSW页面 时,请将 audience 设置为 ThirdParty。', - 'type' => 'string', - 'required' => false, - 'example' => 'Aliyun', - 'default' => 'Aliyun', - 'enum' => [ - 'Aliyun', - 'ThirdParty', - ], - ], + '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, 'description' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'TokenResult', - 'description' => '返回结构体。', + 'title' => 'ECS规格列表', + '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', + '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。'], + ], ], - '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' => '*******', ], + 'Offset' => ['type' => 'string', 'description' => ''], ], ], ], ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '获取系统日志', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - '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' => '获取实例临时鉴权信息', + 'ramActions' => [], + '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"}]', ], - 'GetMetrics' => [ - 'summary' => '获取实例的Metrics指标。', - 'path' => '/api/v2/instance/{InstanceId}/cms/metrics', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ListTempFiles' => [ + 'path' => '/api/v2/tempfiles', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -7591,714 +4746,1049 @@ 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '223121', - 'abilityTreeNodes' => [ - 'FEATURElearnTBR2KU', - ], + 'abilityTreeCode' => '207258', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], ], 'parameters' => [ [ - 'name' => 'Namespace', + 'name' => 'Name', '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*****', - ], + 'schema' => ['title' => '临时文件名称', 'description' => '临时文件名称', 'type' => 'string', 'required' => false, 'example' => 'filename', 'default' => ''], ], [ - 'name' => 'Dimensions', + 'name' => 'Prefix', 'in' => 'query', - 'schema' => [ - 'description' => '(必填)请求参数。', - 'type' => 'string', - 'required' => false, - 'example' => '{"userId":"16122852825*****","jobId":"dsw-328d2bbf605*****","regionId":"cn-wulanchabu","pod":"dsw-45680-76766f8778-95gxh"}', - ], + 'schema' => ['description' => '路径前缀', 'type' => 'string', 'required' => false, 'example' => 'somedir/', 'default' => ''], ], [ - 'name' => 'Length', + 'name' => 'Delimiter', 'in' => 'query', - 'schema' => [ - 'description' => '每一页显示的最大记录数,不超过1440。', - 'type' => 'string', - 'required' => false, - 'example' => '10', - ], + 'schema' => ['description' => '对Object名字进行分组的字符。所有名字包含指定的前缀且第一次出现Delimiter字符之间的Object作为一组元素CommonPrefixes。', 'type' => 'string', 'required' => false, 'example' => '/', 'default' => ''], ], [ - 'name' => 'EndTime', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '截止时间,默认是当前。', - 'type' => 'string', - 'required' => false, - 'example' => '2020-11-08T16:00:00Z', - ], + 'schema' => ['description' => '实例ID。', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx', 'default' => ''], ], [ - 'name' => 'Period', + 'name' => 'PageNumber', 'in' => 'query', - 'schema' => [ - 'description' => '时间间隔。', - 'type' => 'string', - 'required' => false, - 'example' => '60', - ], + 'schema' => ['title' => '页码', 'description' => '页码', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'default' => '1'], ], [ - 'name' => 'NextToken', + 'name' => 'PageSize', 'in' => 'query', - 'schema' => [ - 'description' => '分页游标标识。', - 'type' => 'string', - 'required' => false, - 'example' => '15761485350009dd70bb64cff1f0fff750b08ffff073be5fb1e785e2b020f1a949d5ea14aea7fed82f01dd8****', - ], + 'schema' => ['title' => '分页数量大小', 'description' => '分页数量大小', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '10', 'default' => '10'], ], [ - 'name' => 'MetricName', + 'name' => 'SortBy', 'in' => 'query', - 'schema' => [ - 'description' => '(必填)监控指标的名字。请参考 [指标名字](https://cms.console.aliyun.com/metric-meta/acs_pai_dsw/dsw)', - 'type' => 'string', - 'required' => false, - 'example' => 'INSTANCE_SPEC_MEMORY_SWAP', - ], + 'schema' => ['title' => '排序字段', 'description' => '排序字段', 'type' => 'string', 'required' => false, 'example' => 'GmtModifiedTime', 'default' => 'GmtModifiedTime'], ], [ - 'name' => 'StartTime', + 'name' => 'Order', 'in' => 'query', - 'schema' => [ - 'description' => '起始时间,默认是1小时前。', - 'type' => 'string', - 'required' => false, - 'example' => '2020-11-08T15:00:00Z', - ], + 'schema' => ['title' => '排列顺序', 'description' => '排列顺序', 'type' => 'string', 'required' => false, 'example' => 'DESC', 'default' => 'ASC'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'title' => '临时文件列表', + 'description' => '临时文件列表', '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' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TotalCount' => ['title' => '临时文件总数', 'description' => '临时文件总数', 'type' => 'integer', 'format' => 'int64', 'example' => '35'], + 'TempFiles' => [ + 'title' => '本分页中请求的临时文件列表', + 'description' => '本分页中请求的临时文件列表', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'UserId' => ['title' => '用户Id', 'description' => '用户Id', 'type' => 'string', 'example' => '1612285282502324'], + 'OwnerId' => ['title' => 'Owner Id', 'description' => 'Owner Id', 'type' => 'string', 'example' => '1612285282502324'], + 'TaskId' => ['title' => '任务Id', 'description' => '任务Id', 'type' => 'string', 'example' => 'task-05cexxxxxxxxx'], + 'InstanceId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'dsw-730xxxxxxxxxx'], + 'Type' => ['title' => '文件类型', 'description' => '文件类型', 'type' => 'string', 'example' => 'type'], + 'GmtCreateTime' => ['title' => '临时文件创建时间', 'description' => '临时文件创建时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'GmtModifiedTime' => ['title' => '临时文件修改时间', 'description' => '临时文件修改时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'GmtExpiredTime' => ['title' => '临时文件过期时间', 'description' => '临时文件过期时间', 'type' => 'string', 'example' => '2021-01-12T14:36:01Z'], + 'Uuid' => ['title' => '临时文件Id', 'description' => '临时文件Id', 'type' => 'string', 'example' => 'tempfile-05cexxxxxxxxx'], + 'Name' => ['title' => '临时文件名称', 'description' => '临时文件名称', 'type' => 'string', 'example' => 'filename'], + 'Description' => ['title' => '临时文件描述', 'description' => '临时文件描述', 'type' => 'string', 'example' => 'desc'], + 'Capacity' => ['title' => '临时文件容量', 'description' => '临时文件容量', 'type' => 'integer', 'format' => 'int64', 'example' => '1000'], + 'Status' => ['title' => '临时文件状态', 'description' => '临时文件状态', 'type' => 'string', 'example' => 'Created'], + 'Prefix' => ['title' => '临时文件存储路径前缀', 'description' => '临时文件存储路径前缀', 'type' => 'string', 'example' => '/1079135428626537/209170658818096848/'], + 'Bandwidth' => ['title' => '临时文件上传带宽', 'description' => '临时文件上传带宽', 'type' => 'integer', 'format' => 'int32', 'example' => '10Mi'], + 'UploadUrl' => ['title' => '临时文件上传url', 'description' => '临时文件上传url', 'type' => 'string', 'example' => 'http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123154&OSSAccessKeyId&Signature=5ekVo7r+CeeU5oYmCpnmrzrx2IM='], + 'DownloadUrl' => ['title' => '临时文件下载url', 'description' => '临时文件下载url', 'type' => 'string', 'example' => 'http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123270&OSSAccessKeyId&Signature=Fn7xSv2kRQraU6UqRZ3+DMzQK14='], + ], + 'description' => '', + ], ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E', + 'Quota' => [ + 'title' => '临时文件Quota信息', + 'description' => '临时文件Quota信息', + 'type' => 'object', + 'properties' => [ + 'UsedFileNum' => ['description' => '已存储文件数量', 'type' => 'integer', 'format' => 'int64', 'example' => '100'], + 'TotalFileNum' => ['description' => '文件存储数量上限', 'type' => 'integer', 'format' => 'int64', 'example' => '1000'], + 'UsedCapacity' => ['description' => '已使用文件存储体积', 'type' => 'integer', 'format' => 'int64', 'example' => '1000'], + 'TotalCapacity' => ['description' => '总共可使用文件存储体积', 'type' => 'integer', 'format' => 'int64', 'example' => '1000'], + ], ], ], ], ], ], - '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', + 'title' => '列出临时文件信息', + 'summary' => '获取临时文件列表', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - 'schemes' => [ - 'http', - 'https', + 'ramActions' => [ + [ + 'operationType' => 'list', + 'ramAction' => [ + 'action' => 'paidsw:ListTempFiles', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TotalCount\\": 35,\\n \\"TempFiles\\": [\\n {\\n \\"UserId\\": \\"1612285282502324\\",\\n \\"OwnerId\\": \\"1612285282502324\\",\\n \\"TaskId\\": \\"task-05cexxxxxxxxx\\",\\n \\"InstanceId\\": \\"dsw-730xxxxxxxxxx\\",\\n \\"Type\\": \\"type\\",\\n \\"GmtCreateTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtModifiedTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"GmtExpiredTime\\": \\"2021-01-12T14:36:01Z\\",\\n \\"Uuid\\": \\"tempfile-05cexxxxxxxxx\\",\\n \\"Name\\": \\"filename\\",\\n \\"Description\\": \\"desc\\",\\n \\"Capacity\\": 1000,\\n \\"Status\\": \\"Created\\",\\n \\"Prefix\\": \\"/1079135428626537/209170658818096848/\\",\\n \\"Bandwidth\\": 0,\\n \\"UploadUrl\\": \\"http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123154&OSSAccessKeyId&Signature=5ekVo7r+CeeU5oYmCpnmrzrx2IM=\\",\\n \\"DownloadUrl\\": \\"http://examplebucket.yourEndpoint/exampledir/exampleobject.txt?Expires=1703123270&OSSAccessKeyId&Signature=Fn7xSv2kRQraU6UqRZ3+DMzQK14=\\"\\n }\\n ],\\n \\"Quota\\": {\\n \\"UsedFileNum\\": 100,\\n \\"TotalFileNum\\": 1000,\\n \\"UsedCapacity\\": 1000,\\n \\"TotalCapacity\\": 1000\\n }\\n}","type":"json"}]', + ], + 'QueryAutoShutdownPolicies' => [ + 'summary' => '获取指定运行中实例的自动关机策略信息。', + 'path' => '/api/v2/batch/autoshutdownpolicies/query', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'APP' => [], - ], ], - 'consumes' => [], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeCode' => '273001', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeCode' => '254409', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], + 'autoTest' => true, + 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ - 'name' => 'UserCommandId', - 'in' => 'path', + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '用户自定义命令的ID。可通过GetInstance等接口获取。', - 'type' => 'string', + 'description' => '请求参数。', + 'type' => 'object', + 'properties' => [ + 'InstanceIds' => [ + 'title' => 'DSW 实例 ID 列表。最多支持相同工作空间下的100 个实例 ID。', + 'description' => 'DSW 实例 ID 列表。最多支持同个工作空间下的 100 个实例 ID。非分享页面访问时必填。', + 'type' => 'array', + 'items' => ['description' => '运行中的实例 ID。', 'type' => 'string', 'required' => false, 'example' => 'dsw-msq7tjk9kox7v****3'], + 'required' => false, + ], + ], 'required' => false, - 'example' => '1900', ], ], [ - 'name' => 'InstanceId', + 'name' => 'Token', 'in' => 'query', - 'schema' => [ - 'description' => 'DSW实例ID,填写此项用于查找与该实例绑定的UserCommand。传入该选项会覆盖UserCommandId的设置。', - 'type' => 'string', - 'required' => false, - 'example' => 'dsw-dlsd0fskn193213xxx', - ], + 'schema' => ['description' => '分享令牌信息。', 'type' => 'string', 'required' => false, 'example' => '*******'], ], [ - 'name' => 'Token', + 'name' => 'InstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '使用GetToken接口签发的Token访问UserCommand。', - 'type' => 'string', - 'required' => false, - 'example' => 'eyJhbGci......', - ], + 'schema' => ['description' => '分享页的实例 ID', 'type' => 'string', 'required' => false, 'example' => 'dsw-730xxxxxxxxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '返回结构体。', 'type' => 'object', 'properties' => [ - 'UserCommandId' => [ - 'description' => '用户自定义命令的ID。', - 'type' => 'string', - 'example' => '1900', - ], - 'OnStart' => [ - 'description' => '自定义启动命令,每次实例启动时会执行。', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '具体的自定义启动命令内容。', - 'type' => 'string', - 'example' => 'apt update', + 'RequestId' => ['title' => '请求 ID', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => '473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E'], + 'AutoShutdownPolicies' => [ + 'title' => '自动关机策略列表。', + 'description' => '自动关机策略列表。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'InstanceId' => ['title' => 'DSW 实例 ID。', 'description' => 'DSW 实例 ID。'."\n", 'type' => 'string', 'example' => 'dsw-05cefd0be2e5a278'], + 'Conditions' => [ + 'title' => '该实例当前生效的自动关机策略条件列表。', + 'description' => '该实例当前生效的自动关机策略条件列表。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'SourceType' => ['title' => '自动关机策略来源类型。例如:Workspace 。', 'description' => '策略来源。例如:`Workspace`, `User`, `System`。', 'type' => 'string', 'example' => 'Workspace'], + 'Expression' => ['title' => '自动关机策略条件表达式。', 'description' => '该实例当前生效的自动关机策略条件表达式。', 'type' => 'string', 'example' => 'IdleDuration > 1440 min AND CpuUtilization <= 1%'], + 'Context' => ['title' => '自动关机策略检查使用的上下文。', 'description' => '自动关机策略检查使用的上下文。Context 的内容因策略类型而异,以下按场景分别说明。', 'type' => 'object'], + ], + 'description' => '', + ], + ], + 'SourceType' => ['description' => '该字段已废弃。', 'type' => 'string', 'deprecated' => true, 'example' => 'Workspace'], + 'Expression' => ['description' => '该字段已废弃。', 'type' => 'string', 'deprecated' => true, 'example' => 'IdleDuration > 1440 min AND CpuUtilization <= 1%'], + 'Context' => ['description' => '该字段已废弃。', 'type' => 'object', 'deprecated' => true], ], + 'description' => '', ], ], - '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' => '获取用户自定义命令', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询自动关机策略', + 'responseParamsDescription' => '### Context 字段说明'."\n" + ."\n" + .'Context 的内容因策略类型而异,以下按场景分别说明。'."\n" + ."\n" + .'#### 场景一:SourceType = Workspace,指定空闲时长的关机策略'."\n" + ."\n" + .'| Key | 类型 | 示例值 | 描述 |'."\n" + .'| --- | --- | --- | --- |'."\n" + .'| IdleDuration | Integer | 580 | 实例当前已空闲时长,单位:分钟。-1 表示未知或不可用。 |'."\n" + .'| IdleShutdownRemainingSeconds | Long | 1200 | 距离空闲自动关机还剩余的秒数。仅当剩余秒数 > 0 时返回。 |'."\n" + .'| DelayShutdownCountdownSeconds | Long | 300 | 延迟关机倒计时剩余秒数。仅当延迟关机功能生效且倒计时 > 0 时返回。 |'."\n" + .'| EnableSkip | Boolean | true | 用户是否可以跳过/关闭延迟关机倒计时弹窗。仅当延迟关机倒计时生效时返回。 |'."\n" + ."\n" + .'**示例:**'."\n" + ."\n" + .'```json'."\n" + .'{'."\n" + .' "SourceType": "Workspace",'."\n" + .' "Expression": "IdleDuration > 600 min",'."\n" + .' "Context": {'."\n" + .' "IdleDuration": 580,'."\n" + .' "IdleShutdownRemainingSeconds": 1200,'."\n" + .' "DelayShutdownCountdownSeconds": 300,'."\n" + .' "EnableSkip": true'."\n" + .' }'."\n" + .'}'."\n" + .'```'."\n" + ."\n" + .'#### 场景二:SourceType = Workspace,指定运行时长的关机策略'."\n" + ."\n" + .'| Key | 类型 | 示例值 | 描述 |'."\n" + .'| --- | --- | --- | --- |'."\n" + .'| RunningDuration | Integer | 90 | 实例当前已运行时长,单位:分钟。 |'."\n" + .'| RemainingTimeInMillis | Long | 1800000 | 距离运行时长上限还剩余的毫秒数。-1 表示已超出上限或不适用。 |'."\n" + ."\n" + .'**示例:**'."\n" + ."\n" + .'```json'."\n" + .'{'."\n" + .' "SourceType": "Workspace",'."\n" + .' "Expression": "RunningDuration > 120 min",'."\n" + .' "Context": {'."\n" + .' "RunningDuration": 90,'."\n" + .' "RemainingTimeInMillis": 1800000'."\n" + .' }'."\n" + .'}'."\n" + .'```', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\\",\\n \\"AutoShutdownPolicies\\": [\\n {\\n \\"InstanceId\\": \\"dsw-05cefd0be2e5a278\\",\\n \\"Conditions\\": [\\n {\\n \\"SourceType\\": \\"Workspace\\",\\n \\"Expression\\": \\"IdleDuration > 1440 min AND CpuUtilization <= 1%\\",\\n \\"Context\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n }\\n ],\\n \\"SourceType\\": \\"Workspace\\",\\n \\"Expression\\": \\"IdleDuration > 1440 min AND CpuUtilization <= 1%\\",\\n \\"Context\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n }\\n ]\\n}","type":"json"}]', ], - 'ListSystemLogs' => [ - 'summary' => '获取系统日志(待下线,请不要使用)', - 'path' => '/api/v2/systemlogs', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'StartInstance' => [ + 'path' => '/api/v2/instances/{InstanceId}/start', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'list', + 'operationType' => 'update', 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeCode' => '254265', - 'abilityTreeNodes' => [ - 'FEATURElearnQHG7ZB', - ], - 'autoTest' => true, + 'chargeType' => 'paid', + 'abilityTreeCode' => '118635', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'InstanceId', - 'in' => 'query', + 'in' => 'path', + 'schema' => ['title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'DSW实例Id。', - 'type' => 'string', - 'required' => false, - 'example' => 'dsw-730xxxxxxxxxx', + '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' => [], + ], + 'title' => '启动实例', + 'summary' => '启动DSW实例。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'StartInstance'], + ], + ], + 'ramActions' => [ [ - 'name' => 'SourceRequestId', - 'in' => 'query', - 'schema' => [ - 'description' => '出问题的请求RequestId。', - 'type' => 'string', - 'required' => false, - 'example' => '473469C7-******5-B3DB-A3DC0DE3C83E', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:StartInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + '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"}]', + ], + 'StopInstance' => [ + 'path' => '/api/v2/instances/{InstanceId}/stop', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'Offset', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], + 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'update', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '118632', + 'abilityTreeNodes' => ['FEATURElearnQHG7ZB'], + ], + 'parameters' => [ [ - 'name' => 'SortBy', - 'in' => 'query', - 'schema' => [ - 'description' => '排序字段:支持以下字段'."\n" - ."\n" - .'- GmtCreateTime'."\n" - .'- GmtModifiedTime', - 'type' => 'string', - 'required' => false, - 'example' => 'GmtCreateTime', - ], + 'name' => 'InstanceId', + 'in' => 'path', + 'schema' => ['title' => '实例Id', 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~470439~~)。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], ], [ - 'name' => 'Order', + 'name' => 'SaveImage', 'in' => 'query', + 'schema' => ['title' => '是否保存环境后再关闭实例', 'description' => '是否保存环境后再关闭实例。'."\n" + .'- 打开开关:保存环境后再关闭实例。'."\n" + .'- 关闭开关:不保存环境数据,直接关闭实例。', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'default' => 'false'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '排序方向:'."\n" - ."\n" - .'- ASC 升序'."\n" - .'- DESC 降序', - 'type' => 'string', - 'required' => false, - 'example' => 'ASC', + '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'], + ], ], ], + ], + 'title' => '停止实例', + 'summary' => '调用StopInstance,停止DSW实例。', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'StopInstance'], + ], + ], + 'ramActions' => [ [ - 'name' => 'LogRepository', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:StopInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + '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"}]', + ], + 'StopInstances' => [ + 'path' => '/api/v2/batch/instances/stop', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'LogLevel', - 'in' => 'query', - 'schema' => [ - 'description' => '日志等级,目前支持'."\n" - ."\n" - .'- Error', - 'type' => 'string', - 'required' => false, - 'example' => 'Error', - ], + 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'update', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '247825', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], + ], + 'parameters' => [ [ - 'name' => 'GmtStartTime', - 'in' => 'query', + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '起始UTC时间,日期格式 iso8601。', - 'type' => 'string', - 'format' => 'iso8601_normal', + 'description' => '请求body。', + 'type' => 'object', + 'properties' => [ + 'InstanceIds' => [ + 'description' => '需要停止的实例ID列表。', + 'type' => 'array', + 'items' => ['description' => '需要停止的实例ID。', 'type' => 'string', 'required' => false, 'example' => '[\'dsw-msq7tjk9kox7v26il3\']'], + 'required' => true, + ], + ], 'required' => false, - 'example' => '2020-11-08T16:00:00Z', ], ], - [ - 'name' => 'GmtEndTime', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '结束UTC时间,日期格式 iso8601。', - 'type' => 'string', - 'format' => 'iso8601_normal', - 'required' => false, - 'example' => '2020-12-08T16:00:00Z', + '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\']'], + ], + ], ], ], - [ - 'name' => 'ProblemCategory', - 'in' => 'query', - 'schema' => [ - 'description' => '问题分类'."\n" - ."\n" - .'- InstanceStartFailed'."\n" - .'- InstanceTerminating'."\n" - .'- InstanceCreateFailed', - 'type' => 'string', - 'required' => false, - 'example' => 'InstanceStartFailed', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '批量停止实例', + 'summary' => '批量停止实例', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:StopInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + '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"}]', + ], + 'UpdateInstance' => [ + 'summary' => '更新DSW实例的属性。', + 'path' => '/api/v2/instances/{InstanceId}', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'LifecycleId', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], + 'AK' => [], ], ], - 'responses' => [ - 200 => [ + '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' => 'ECS规格列表', - 'description' => '系统日志。', + 'title' => '需要更新的实例属性', + 'description' => '需要更新的实例属性。', 'type' => 'object', 'properties' => [ - 'SystemLogs' => [ - 'title' => '本分页中请求的实例列表', - 'description' => '系统日志列表。', + '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', 'description' => ''], + ], + 'required' => false, + ], + 'Accessibility' => [ + 'title' => '工作空间内是否他人可见', + 'description' => '实例的可见性。', + 'type' => 'string', + 'required' => false, + 'enumValueTitles' => ['PUBLIC' => '工作空间所有用户可见', 'PRIVATE' => '工作空间内自己及管理员可见'], + 'example' => 'PRIVATE', + ], + 'Datasets' => [ + 'title' => '数据集集合', + 'description' => '数据集列表。', 'type' => 'array', 'items' => [ - 'description' => '系统日志。', + 'description' => '数据集对象。', 'type' => 'object', 'properties' => [ - 'Content' => [ - 'title' => '实例规格', - 'description' => '日志内容。', - 'type' => 'string', - 'example' => 'You are using******', - ], - 'GmtCreateTime' => [ - 'title' => '显卡类型', - 'description' => '起始UTC时间,日期格式 iso8601。', + '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', - 'format' => 'iso8601_normal', - 'example' => '2020-10-08T16:00:00Z'."\n", + '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" + .'><warning>'."\n" + ."\n" + .'- 扩容后不支持缩容,请按需操作扩容。'."\n" + ."\n" + .'- 扩容后整块系统盘(免费+付费),不再受到停机15天释放的限制,但会持续产生费用。'."\n" + ."\n" + .'- 实例删除,系统盘同步释放,删除前请确保必要数据备份。'."\n" + ."\n" + .'></warning>'."\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, + 'description' => '', + ], + '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'], ], - 'Level' => [ - 'description' => '日志级别。', - 'type' => 'string', - 'example' => 'Error。', + '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" + .'><warning>这里传入的环境变量可能会覆盖系统预设的环境变量></warning>', '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, ], - 'Offset' => [ - 'type' => 'string', + 'DisassociateUserCommand' => ['description' => '删除用户指定的自定义命令。', 'type' => 'boolean', 'required' => false, 'example' => 'false'], + 'OversoldType' => ['title' => '闲时资源的类型:'."\n" + .'ForceQuotaOverSold:只使用闲时资源'."\n" + .'AcceptQuotaOverSold:可接受闲时资源'."\n" + .'ForbiddenQuotaOverSold:使用保障资源', 'description' => '闲时资源的类型', 'type' => 'string', 'required' => false, 'example' => 'ForceQuotaOverSold: Use only idle resources'."\n" + .'AcceptQuotaOverSold: Accept idle resources'."\n" + .'ForbiddenQuotaOverSold: Use guaranteed resources'], + 'DisassociateSpot' => ['title' => '是否关闭竞价配置', 'type' => 'boolean', 'required' => false, 'description' => '是否关闭竞价配置'], + 'SpotSpec' => [ + 'title' => '抢占实例配置', + 'type' => 'object', + 'properties' => [ + 'SpotStrategy' => ['title' => '抢占策略:'."\n" + .'SpotWithPriceLimit:自定义设置抢占实例价格上限。'."\n" + .'SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。', 'type' => 'string', 'required' => false, 'example' => 'SpotWithPriceLimit', 'description' => '抢占策略:'."\n" + .'SpotWithPriceLimit:自定义设置抢占实例价格上限。'."\n" + .'SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。'], + 'SpotPriceLimit' => ['title' => '抢占式实例的每小时价格上限,最多支持精确到小数点后三位,抢占策略是SpotWithPriceLimit的时候必填', 'type' => 'string', 'required' => false, 'example' => '0.12', 'description' => '抢占式实例的每小时价格上限,最多支持精确到小数点后三位,抢占策略是SpotWithPriceLimit的时候必填'], + 'SpotDuration' => ['title' => '抢占式实例的保护期。默认为1,可设置为0,表示无保护期。灵骏规格无效。', 'type' => 'string', 'required' => false, 'example' => '0', 'description' => '抢占式实例的保护期。默认为1,可设置为0,表示无保护期。灵骏规格无效。'], + 'SpotDiscountLimit' => ['title' => '抢占式实例的每小时折扣上限,灵骏规格必填。', 'type' => 'string', 'required' => false, 'example' => '0.1', 'description' => '抢占式实例的每小时折扣上限,灵骏规格必填。'], + ], + 'required' => false, + 'description' => '抢占实例配置', ], + 'DisassociateAssignNode' => ['title' => '是否关闭指定节点调度', 'type' => 'boolean', 'required' => false, 'description' => '是否关闭指定节点调度'], + 'AssignNodeSpec' => [ + 'title' => '指定节点调度配置', + 'type' => 'object', + 'properties' => [ + 'NodeNames' => ['title' => '指定调度的节点:"node-a,node-b"', 'type' => 'string', 'required' => false, 'example' => 'node-a', 'description' => '指定调度的节点:"node-a,node-b"'], + 'AntiAffinityNodeNames' => ['title' => '排除调度的节点:"node-a,node-b"', 'type' => 'string', 'required' => false, 'example' => 'node-b', 'description' => '排除调度的节点:"node-a,node-b"'], + ], + 'required' => false, + 'description' => '指定节点调度配置', + ], + 'StartInstance' => ['type' => 'boolean'], + 'DisassociateMigrationOptions' => ['title' => '是否删除迁移选项', 'type' => 'boolean'], + 'MigrationOptions' => ['title' => '实例迁移选项,只支持启用了持久化存储的灵骏实例设置此参数。当前支持:'."\n" + .'● EnableProcessesPreservation :是否保留实例运行中的进程。可选值:true , false。启用此能力,需要实例预留进程迁移需要的存储空间。', 'type' => 'object'], ], + 'required' => false, ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + '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 \\"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', + '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' => '更新实例', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateInstance'], + ], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:UpdatePostPaidInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'UpdateInstanceLabels' => [ + 'summary' => '更新DSW实例的标签,假如标签不存在则新增,假如标签存在则修改。', + 'path' => '/api/v2/instances/{InstanceId}/labels', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'get', + 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeCode' => '228178', + 'abilityTreeNodes' => ['FEATURElearnRNGD0R'], ], 'parameters' => [ [ - 'name' => 'CheckType', - 'in' => 'path', + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '检查项类型。取值:'."\n" - ."\n" - .'SSH:用于触发实例SSH健康检查', - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [ - 'SSH' => 'SSH', + '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, + ], ], - 'example' => 'SSH', + 'required' => false, ], ], [ - 'name' => 'TaskId', + 'name' => 'InstanceId', 'in' => 'path', + 'schema' => ['title' => 'DSW实例Id', 'description' => 'DSW实例ID。', 'type' => 'string', 'required' => true, 'example' => 'dsw-730xxxxxxxxxx'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '健康检查任务ID', - 'type' => 'string', - 'required' => false, - 'example' => '917479ff-c869-49ea-908e-ae85bd987bc0'."\n", + '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'], + 'title' => '更新实例的标签', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateInstanceLabels'], + ], + ], + 'ramActions' => [ [ - 'name' => 'Verbose', - 'in' => 'query', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:UpdateInstanceLabels', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\"\\n}","type":"json"}]', + ], + 'UpdateTempFile' => [ + 'path' => '/api/v2/tempfiles/{TempFileId}', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'update', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeCode' => '207261', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], + ], + 'parameters' => [ + [ + 'name' => 'TempFileId', + 'in' => 'path', + 'schema' => ['title' => '临时文件Id', 'description' => '临时文件Id', 'type' => 'string', 'required' => true, 'example' => 'tempfile-05cexxxxxxxxx'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '用于控制是否输出健康检查细节', - 'type' => 'boolean', + 'title' => '需要更新的临时文件属性', + 'description' => '需要更新的临时文件属性', + 'type' => 'object', + 'properties' => [ + 'GmtExpiredTime' => ['title' => '临时文件过期时间', 'description' => '临时文件过期时间', 'type' => 'string', 'required' => false, 'example' => '2021-01-12T14:36:01Z'], + 'Status' => ['title' => '临时文件状态', 'description' => '临时文件状态', 'type' => 'string', 'required' => false, 'example' => 'Created'], + ], 'required' => false, - 'example' => 'true', ], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'title' => '执行结果', + 'description' => '执行结果', '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', - ], - ], - ], - ], + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TempFileId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'tempfile-05cexxxxxxxxx'], ], ], ], ], - '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', + 'title' => '更新临时文件信息', + 'summary' => '更新临时文件', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:UpdateTempFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TempFileId\\": \\"tempfile-05cexxxxxxxxx\\"\\n}","type":"json"}]', + ], + 'UpdateTempFileTask' => [ + 'path' => '/api/v2/tempfiletasks/{TempFileTaskId}', + 'methods' => ['put'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'consumes' => [ - 'application/json', - ], - 'produces' => [ - 'application/json', - ], - 'operationType' => 'write', + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [ - 'operationType' => 'create', + 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATURElearnRNGD0R', - ], + 'abilityTreeCode' => '214813', + 'abilityTreeNodes' => ['FEATURElearn0KXSR7'], ], 'parameters' => [ [ - 'name' => 'CheckType', + 'name' => 'TempFileTaskId', 'in' => 'path', - 'schema' => [ - 'description' => '检查项类型。取值:'."\n" - ."\n" - .'- **SSH**:用于触发实例SSH健康检查', - 'type' => 'string', - 'required' => true, - 'example' => 'SSH', - ], + 'schema' => ['title' => '临时文件任务Id', 'description' => '临时文件任务Id', 'type' => 'string', 'required' => true, 'example' => 'task-05cexxxxxxxxx'], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ - 'description' => '请求body。', + 'title' => '需要更新的临时文件任务属性', + 'description' => '需要更新的临时文件任务属性', 'type' => 'object', 'properties' => [ - 'InstanceId' => [ - 'description' => '实例ID。如何获取实例ID,请参见[ListInstances](~~2411819~~)。', - 'type' => 'string', - 'required' => true, - 'example' => 'dsw-730xxxxxxxxxx'."\n", - ], + 'GmtExpiredTime' => ['title' => '临时文件过期时间', 'description' => '临时文件过期时间', 'type' => 'string', 'required' => false, 'example' => '2021-01-12T14:36:01Z'], ], 'required' => false, ], @@ -8307,119 +5797,525 @@ 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'title' => '执行结果', + 'description' => '执行结果', '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', - ], + 'RequestId' => ['title' => '请求Id', 'description' => '请求Id', 'type' => 'string', 'example' => 'E7D55162-4489-1619-AAF5-3F97D5FCA948'], + 'Success' => ['title' => '成功标志', 'description' => '成功标志', 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['title' => '说明', 'description' => '说明', 'type' => 'string', 'example' => '"XXX"'], + 'Code' => ['title' => '状态码', 'description' => '状态码', 'type' => 'string', 'example' => '"200"'], + 'HttpStatusCode' => ['title' => 'http状态码', 'description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'TempFileTaskId' => ['title' => '实例Id', 'description' => '实例Id', 'type' => 'string', 'example' => 'task-05cexxxxxxxxx'], ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"BEBDF2EE-642E-5992-8907-D2011A7ACEFE\\\\n\\",\\n \\"TaskId\\": \\"917479ff-c869-49ea-908e-ae85bd987bc0\\"\\n}","type":"json"}]', - 'title' => 'CreateSanityCheckTask', + 'title' => '更新临时文件任务信息', + 'summary' => '更新临时文件任务', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:UpdateTempFileTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E7D55162-4489-1619-AAF5-3F97D5FCA948\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"\\\\\\"XXX\\\\\\"\\",\\n \\"Code\\": \\"\\\\\\"200\\\\\\"\\",\\n \\"HttpStatusCode\\": 200,\\n \\"TempFileTaskId\\": \\"task-05cexxxxxxxxx\\"\\n}","type":"json"}]', ], ], 'endpoints' => [ + ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-chengdu.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-chengdu.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-wulanchabu', 'regionName' => '华北6(乌兰察布)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-wulanchabu.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-wulanchabu.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-wulanchabu.aliyuncs.com'], + ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-beijing.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-beijing.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-shanghai.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-shanghai.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-hongkong.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-hongkong.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-hongkong.aliyuncs.com'], + ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-shenzhen.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-shenzhen.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-shenzhen.aliyuncs.com'], + ['regionId' => 'ap-northeast-2', 'regionName' => '韩国(首尔)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-northeast-2.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-northeast-2.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-northeast-2.aliyuncs.com'], + ['regionId' => 'ap-northeast-1', 'regionName' => '日本(东京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-northeast-1.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-northeast-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-northeast-1.aliyuncs.com'], + ['regionId' => 'cn-guangzhou', 'regionName' => '华南3(广州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-guangzhou.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-guangzhou.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-guangzhou.aliyuncs.com'], + ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-southeast-1.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-southeast-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-3', 'regionName' => '马来西亚(吉隆坡)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-southeast-3.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-southeast-3.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-southeast-3.aliyuncs.com'], + ['regionId' => 'ap-southeast-5', 'regionName' => '印度尼西亚(雅加达)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-southeast-5.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-southeast-5.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-southeast-5.aliyuncs.com'], + ['regionId' => 'ap-southeast-7', 'regionName' => '泰国(曼谷)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-southeast-7.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-southeast-7.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-southeast-7.aliyuncs.com'], + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.cn-hangzhou.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-hangzhou.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-hangzhou.aliyuncs.com'], + ['regionId' => 'ap-southeast-8', 'regionName' => '马来西亚(柔佛州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'pai-dsw.ap-southeast-8.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-southeast-8.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-southeast-8.aliyuncs.com'], + ['regionId' => 'us-east-1', 'regionName' => '美国(弗吉尼亚)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'pai-dsw.us-east-1.aliyuncs.com', 'endpoint' => 'pai-dsw.us-east-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.us-east-1.aliyuncs.com'], + ['regionId' => 'us-southeast-1', 'regionName' => '美国(亚特兰大)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'pai-dsw.us-southeast-1.aliyuncs.com', 'endpoint' => 'pai-dsw.us-southeast-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.us-southeast-1.aliyuncs.com'], + ['regionId' => 'us-west-1', 'regionName' => '美国(硅谷)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'pai-dsw.us-west-1.aliyuncs.com', 'endpoint' => 'pai-dsw.us-west-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.us-west-1.aliyuncs.com'], + ['regionId' => 'eu-central-1', 'regionName' => '德国(法兰克福)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'pai-dsw.eu-central-1.aliyuncs.com', 'endpoint' => 'pai-dsw.eu-central-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.eu-central-1.aliyuncs.com'], + ['regionId' => 'me-east-1', 'regionName' => '阿联酋(迪拜)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'pai-dsw.me-east-1.aliyuncs.com', 'endpoint' => 'pai-dsw.me-east-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.me-east-1.aliyuncs.com'], + ['regionId' => 'me-central-1', 'regionName' => '沙特(利雅得)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'pai-dsw.me-central-1.aliyuncs.com', 'endpoint' => 'pai-dsw.me-central-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.me-central-1.aliyuncs.com'], + ['regionId' => 'ap-south-1', 'regionName' => '印度(孟买)已关停', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'pai-dsw.ap-south-1.aliyuncs.com', 'endpoint' => 'pai-dsw.ap-south-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.ap-south-1.aliyuncs.com'], + ['regionId' => 'cn-shanghai-finance-1', 'regionName' => '华东2 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'pai-dsw.cn-shanghai-finance-1.aliyuncs.com', 'endpoint' => 'pai-dsw.cn-shanghai-finance-1.aliyuncs.com', 'vpc' => 'pai-dsw-vpc.cn-shanghai-finance-1.aliyuncs.com'], + ], + 'errorCodes' => [], + 'changeSet' => [ [ - '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', + 'apis' => [ + ['description' => '响应参数发生变更', 'api' => 'ListEcsSpecs'], + ], + 'createdAt' => '2025-04-22T04:21:53.000Z', + 'description' => '', ], [ - 'regionId' => 'eu-central-1', - 'endpoint' => 'pai-dsw.eu-central-1.aliyuncs.com', + 'apis' => [ + ['description' => '请求参数发生变更、响应参数发生变更', 'api' => 'ListInstances'], + ['description' => '响应参数发生变更', 'api' => 'GetInstance'], + ['description' => '请求参数发生变更', 'api' => 'UpdateInstance'], + ['description' => '请求参数发生变更', 'api' => 'CreateInstance'], + ], + 'createdAt' => '2025-04-18T03:13:55.000Z', + 'description' => '', ], - [ - 'regionId' => 'me-east-1', - 'endpoint' => 'pai-dsw.me-east-1.aliyuncs.com', + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteIdleInstanceCuller'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetIdleInstanceCuller'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetResourceGroupStatistics'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceShutdownTimer'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceEvents'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstanceSnapshot'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstanceSnapshot'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateInstance'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateInstanceShutdownTimer'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstances'], + ['threshold' => '800', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceMetrics'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstanceLabels'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateInstanceSnapshot'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstanceShutdownTimer'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateInstanceLabels'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'StopInstance'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListInstanceStatistics'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'UpdateInstance'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ListEcsSpecs'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetLifecycle'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetUserConfig'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'CreateIdleInstanceCuller'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetToken'], + ['threshold' => '-1', 'countWindow' => 1, 'regionId' => '*'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstance'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetInstanceSnapshot'], + ['threshold' => '800', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetMetrics'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'StartInstance'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DeleteInstance'], ], - [ - 'regionId' => 'us-east-1', - 'endpoint' => 'pai-dsw.us-east-1.aliyuncs.com', + ], + 'ram' => [ + 'productCode' => 'PaiDswApi', + 'productName' => '人工智能平台 PAI', + 'ramCodes' => ['paidsw'], + 'ramLevel' => '资源级', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'DeleteInstanceSnapshot', + 'description' => '删除实例快照', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ListInstanceSnapshot', + 'description' => '查询实例快照列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:ListInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateDiagnosis', + 'description' => '诊断实例问题', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateDiagnosis', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'StopInstance', + 'description' => '停止实例', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:StopInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetInstanceEvents', + 'description' => '获取实例的事件列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceEvents', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateInstanceShutdownTimer', + 'description' => '创建实例定时关机任务', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateInstanceShutdownTimer', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetLifecycle', + 'description' => '获取实例生命周期', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetLifecycle', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetResourceGroupStatistics', + 'description' => '获取资源组统计信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetResourceGroupStatistics', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'DeleteInstance', + 'description' => '删除实例', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeletePostPaidInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetSanityCheckTask', + 'description' => 'GetSanityCheckTask', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetSanityCheckTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetIdleInstanceCuller', + 'description' => '获取闲置实例自动关机策略', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetIdleInstanceCuller', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetUserConfig', + 'description' => '查询用户信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetUserConfig', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'StartInstance', + 'description' => '启动实例', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:StartInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetInstanceMetrics', + 'description' => '获取实例指标', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceMetrics', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetInstanceShutdownTimer', + 'description' => '获取实例定时关机任务详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceShutdownTimer', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'UpdateInstance', + 'description' => '更新实例', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:UpdatePostPaidInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetToken', + 'description' => '获取实例临时鉴权信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetToken', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'StopInstances', + 'description' => '批量停止实例', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:StopInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetInstanceSnapshot', + 'description' => '获取实例快照', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'DeleteInstances', + 'description' => '批量删除实例', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeletePostPaidInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'DeleteInstanceShutdownTimer', + 'description' => '删除实例定时关机任务', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteInstanceShutdownTimer', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'DeleteInstanceLabels', + 'description' => '删除实例标签', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteInstanceLabels', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ListInstances', + 'description' => '查询实例列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:ListInstances', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'UpdateInstanceLabels', + 'description' => '更新实例的标签', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'paidsw:UpdateInstanceLabels', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'DeleteIdleInstanceCuller', + 'description' => '删除实例闲置关机策略', + 'operationType' => 'delete', + 'ramAction' => [ + 'action' => 'paidsw:DeleteIdleInstanceCuller', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateIdleInstanceCuller', + 'description' => '创建闲置实例自动关机策略', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateIdleInstanceCuller', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateInstanceSnapshot', + 'description' => '创建实例快照', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateInstanceSnapshot', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'QueryAutoShutdownPolicies', + 'description' => '查询自动关机策略', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:QueryAutoShutdownPolicies', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateSanityCheckTask', + 'description' => 'CreateSanityCheckTask', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'paidsw:CreateSanityCheckTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetInstance', + 'description' => '查询实例详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'paidsw:GetInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'PaiDswApi', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - [ - 'regionId' => 'cn-wulanchabu', - 'endpoint' => 'pai-dsw.cn-wulanchabu.aliyuncs.com', + 'resourceTypes' => [ + ['validationType' => 'always', 'resourceType' => 'TempFileTask', 'arn' => 'acs:paidsw:{#regionId}:{#accountId}:'], + ['validationType' => 'always', 'resourceType' => 'TempFileTask', 'arn' => 'acs:paidsw:{#regionId}:{#accountId}:tempfiletask/{#TempFileTaskId}'], ], ], ]; |
