人工智能平台 PAI - AI 工作空间 - aiworkspace CLI 命令参考

更新时间:
复制 MD 格式

本文列出人工智能平台 PAI - AI 工作空间 - aiworkspace 在阿里云 CLI 中的可用命令,并提供各命令的语法和参数说明。

前提条件

  • 已安装阿里云 CLI。安装方法请参见安装/更新 CLI。

  • 执行需要身份认证的命令前,请确认已配置阿里云 CLI 凭证,且凭证对应的身份拥有所需权限。配置方法请参见配置与管理身份凭证。

地域与接入点

凭证配置中的默认地域可用 --region <regionId> 覆盖。

未指定接入地址时,CLI 按产品规则尝试解析,需要指定时可按地域和网络类型查看 Endpoint,再使用 --endpoint <endpoint>。

版本信息

属性

值

CLI 版本

3.5.4

API 版本

2021-02-04

可用命令

单击命令名称,查看命令描述、语法和参数说明。

命令详情

语法逐行列出命令参数:<类型> 是需要替换的值占位符,方括号表示可选参数,# 表示列表项序号;[options] 表示 CLI 通用选项,见“全局选项”。可选对象或列表内标为必填的字段,仅在提供该对象或列表项时必填。完整参数定义见各命令的参数说明。

AcceptDataworksEvent

命令描述

PAI系统用于接收并处理DataWorks发送的系统事件消息

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/action/acceptdataworksevent

语法

aliyun aiworkspace AcceptDataworksEvent
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/workspaces/action/acceptdataworksevent --region cn-hangzhou --header "Content-Type=application/json" --body '{"Data":{},"MessageId":"539306ba-*****-41a0-****-6dc81060985c"}'

AddImage

命令描述

添加自定义镜像到工作空间

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/images

语法

aliyun aiworkspace AddImage
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/images --region cn-hangzhou --header "Content-Type=application/json" --body '{"ImageUri":"registry.cn-hangzhou.aliyuncs.com/pai-compression/nlp:gpu","Name":"nlp-compression"}'

AddImageLabels

命令描述

为镜像添加标签

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/images/{ImageId}/labels

语法

aliyun aiworkspace AddImageLabels
    --ImageId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ImageId

String

是

镜像ID。如何获取镜像ID,请参见https://help.aliyun.com/document_detail/449118.html

--body

String

否

镜像标签

示例

aliyun aiworkspace POST /api/v1/images/image-4c6200000053uor/labels --region cn-hangzhou --header "Content-Type=application/json" --body '{"Labels":[{"Value":"GPU","Key":"system.chipType"}]}'

AddMemberRole

命令描述

为工作空间内的成员添加某个角色,使其拥有角色的权限

HTTP 方法:POST

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/members/{MemberId}/roles/{RoleName}

语法

aliyun aiworkspace AddMemberRole
    --MemberId <string>
    --RoleName <string>
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--MemberId

String

是

成员ID。如何获取成员ID,请参见https://help.aliyun.com/document_detail/449135.html

--RoleName

String

是

要添加的角色,支持官方角色与自定义角色:
官方角色:如下所示,各角色权限请参见https://help.aliyun.com/document_detail/2840449.html 。
PAI.AlgoDeveloper:算法开发。
PAI.AlgoOperator:算法运维。
PAI.LabelManager:标注管理员。
PAI.MaxComputeDeveloper:MaxCompute开发。
PAI.WorkspaceAdmin:管理员。
PAI.WorkspaceGuest:访客。
PAI.WorkspaceOwner:负责人。
自定义角色:填写角色ID。格式为role-开头,例如role-sw******2tij








--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace POST /api/v1/workspaces/145883/members/145883-215139000000688039/roles/PAI.AlgoDeveloper --region cn-hangzhou --header "Content-Type=application/json"

ChangeResourceGroup

命令描述

更改资源ID对应的资源组

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/resourcegroups/action/changeresourcegroup

语法

aliyun aiworkspace ChangeResourceGroup
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求body

示例

aliyun aiworkspace PUT /resourcegroups/action/changeresourcegroup --region cn-hangzhou --header "Content-Type=application/json" --body '{"NewResourceGroupId":"rg-df********534dy","ResourceId":"12**56","ResourceType":"workspace"}'

CreateCodeSource

命令描述

创建代码配置到PAI,支持配置Git的代码分支与CommitId。创建完成后,可以在DLC作业中引用

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/codesources

语法

aliyun aiworkspace CreateCodeSource
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构

示例

aliyun aiworkspace POST /api/v1/codesources --region cn-hangzhou --header "Content-Type=application/json" --body '{"WorkspaceId":"1234","DisplayName":"MyCodeSource1"}'

CreateConnection

命令描述

创建连接。用于LangStudio、数据集多模态检索服务等场景中连接PAI云端到客户的模型、数据库等服务

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/connections

语法

aliyun aiworkspace CreateConnection
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体。创建连接所需要的参数信息

示例

aliyun aiworkspace POST /api/v1/connections --region cn-hangzhou --header "Content-Type=application/json" --body '{"ConnectionName":"llm-connection","Configs":{"key":"6379"}}'

CreateDataset

命令描述

创建一个数据集

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets

语法

aliyun aiworkspace CreateDataset
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/datasets --region cn-hangzhou --header "Content-Type=application/json" --body '{"DataSourceType":"NAS","Property":"DIRECTORY","Uri":"nas://09f****f2.cn-hangzhou/","Name":"myName"}'

CreateDatasetFileMetas

命令描述

批量创建数据集下的文件元数据记录

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetfilemetas

语法

aliyun aiworkspace CreateDatasetFileMetas
    --DatasetId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--body

String

否

请求Body

示例

aliyun aiworkspace POST /api/v1/datasets/d-lfd60v0p0000ujtsdx/datasetfilemetas --region cn-hangzhou --header "Content-Type=application/json" --body '{"DatasetFileMetas":[{"ContentType":"image/jpeg","FileType":"image","Uri":"oss://*****-test/dataset/1653421.jpg\nnas://0e25d***dff/dataset/1653421.jpg","FileUpdateTime":"2025-01-12T14:36:01Z","FileFingerPrint":"D41D8CD98F*****E9800998ECF8"}],"WorkspaceId":"478**","DatasetVersion":"v1"}'

CreateDatasetJob

命令描述

创建数据集任务

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetjobs

语法

aliyun aiworkspace CreateDatasetJob
    --DatasetId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/datasets/d-rbvg5wz0000c9ks92/datasetjobs --region cn-hangzhou --header "Content-Type=application/json" --body '{"JobAction":"SemanticIndex","WorkspaceId":"478**","JobSpec":"{\\\"modelId\\\":\\\"xxx\\\"}"}'

CreateDatasetJobConfig

命令描述

创建数据集任务配置

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetjobconfigs

语法

aliyun aiworkspace CreateDatasetJobConfig
    --DatasetId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集Id

--body

String

否

请求Body

示例

aliyun aiworkspace POST /api/v1/datasets/d-rbvg5wzlj00009ks92/datasetjobconfigs --region cn-hangzhou --header "Content-Type=application/json" --body '{"Config":"{\"apiKey\":\"REDACTED_API_KEY\"}","WorkspaceId":"454716","ConfigType":"MultimodalIntelligentTag"}'

CreateDatasetLabels

命令描述

为数据集打标签

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/labels

语法

aliyun aiworkspace CreateDatasetLabels
    [--DatasetId <string>]
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

否

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/datasets/d-lfd60v0p0000ujtsdx/labels --region cn-hangzhou --header "Content-Type=application/json" --body '{"Labels":[{"Value":"test","Key":"env"}]}'

CreateDatasetVersion

命令描述

创建数据集版本

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/versions

语法

aliyun aiworkspace CreateDatasetVersion
    --DatasetId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/datasets/d-rbvg500000jhc9ks92/versions --region cn-hangzhou --header "Content-Type=application/json" --body '{"DataSourceType":"OSS","Property":"DIRECTORY","Uri":"oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/"}'

CreateDatasetVersionLabels

命令描述

创建数据集版本的标签

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/versions/{VersionName}/labels

语法

aliyun aiworkspace CreateDatasetVersionLabels
    --DatasetId <string>
    --VersionName <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--VersionName

String

是

数据集版本名称

--body

String

否

请求体

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg5wzlj00009ks92/versions/v1/labels --region cn-hangzhou --header "Content-Type=application/json" --body '{"Labels":[{"Value":"test","Key":"env"}]}'

CreateExperiment

命令描述

创建实验

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/experiments

语法

aliyun aiworkspace CreateExperiment
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

body参数

示例

aliyun aiworkspace POST /api/v1/experiments --region cn-hangzhou --header "Content-Type=application/json" --body '{"WorkspaceId":"478**","Name":"exp-test"}'

CreateImageBuild

命令描述

根据指定配置构建自定义镜像, 构建成功后,会添加到当前工作空间的自定义镜像里

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/imagebuilds

语法

aliyun aiworkspace CreateImageBuild
    [--ClientToken <string>]
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ClientToken

String

否

幂等参数

--body

String

否

body参数

示例

aliyun aiworkspace POST /api/v1/imagebuilds --region cn-hangzhou --header "Content-Type=application/json" --body '{"TargetRegistry":{"Type":"AcrEnterprise"},"WorkspaceId":"12345","Resource":{"ResourceId":"quotaadzoqup693z","EcsSpec":"ecs.c6.large","ResourceType":"Lingjun","ResourceConfig":{"Memory":"8Gi","CPU":"4"}},"BuildConfig":{"Dockerfile":"FROM ubuntu:18:04\nRUN pip3 install numpy==1.19.5","BuildType":"PackageInstallation"},"Image":{"Uri":"user-test-registry-vpc.cn-wulanchabu.cr.aliyuncs.com/pai-test/pai-test:test-v1","Name":"test-v1"}}'

CreateMember

命令描述

添加用户到工作空间,作为工作空间的成员,可以添加多个用户为成员

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/members

语法

aliyun aiworkspace CreateMember
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/workspaces/123/members --region cn-hangzhou --header "Content-Type=application/json" --body '{"Members":[{"UserId":"145883-21513926******88039,145883-2769726******87513","Roles":["PAI.AlgoDeveloper"]}]}'

CreateModel

命令描述

创建模型。模型是模型版本的集合,创建模型时需要指定模型名称,描述等信息

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/models

语法

aliyun aiworkspace CreateModel
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/models --region cn-hangzhou --header "Content-Type=application/json" --body '{"ModelName":"News classification"}'

CreateModelLabels

命令描述

为模型创建标签

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/models/{ModelId}/labels

语法

aliyun aiworkspace CreateModelLabels
    --ModelId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/models/model-1dkasjfhds23dft/labels --region cn-hangzhou --header "Content-Type=application/json"

CreateModelVersion

命令描述

为指定模型新增版本

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/models/{ModelId}/versions

语法

aliyun aiworkspace CreateModelVersion
    --ModelId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/models/model-dfs100005c/versions --region cn-hangzhou --header "Content-Type=application/json" --body '{"Uri":"oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/"}'

CreateModelVersionLabels

命令描述

为模型版本创建标签

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/models/{ModelId}/versions/{VersionName}/labels

语法

aliyun aiworkspace CreateModelVersionLabels
    --ModelId <string>
    --VersionName <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--VersionName

String

是

模型版本

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/models/model-rbvg5wzljz0000ks92/versions/0.1.1/labels --region cn-hangzhou --header "Content-Type=application/json"

CreateProductOrders

命令描述

购买产品,目前只支持购买DataWorks后付费、OSS后付费、PAI后付费、MaxCompute后付费

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/productorders

语法

aliyun aiworkspace CreateProductOrders
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

购买请求

示例

aliyun aiworkspace POST /api/v1/productorders --region cn-hangzhou --header "Content-Type=application/json" --body '{"Products":[{"OrderType":"BUY","InstanceProperties":[{"Value":"oss","Code":"commodity_type","Name":"对象存储OSS"}],"ProductCode":"DataWorks_share","ChargeType":"POSTPAY","PricingCycle":"Month","AutoRenew":true,"Duration":1}],"AutoPay":true}'

CreatePrompt

命令描述

创建提示词

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/prompts

语法

aliyun aiworkspace CreatePrompt
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/prompts --region cn-hangzhou --header "Content-Type=application/json" --body '{"PromptName":"自动驾驶高速公路信息提取","WorkspaceId":"796**"}'

CreateRun

命令描述

创建一次运行,运行(Run)属于一个实验(Experiment),可以与具体的workload关联,也可以是一次单纯的代码运行

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/runs

语法

aliyun aiworkspace CreateRun
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/runs --region cn-hangzhou --header "Content-Type=application/json" --body '{"ExperimentId":"exp-6thbb5xrbmp*****"}'

CreateWorkspace

命令描述

创建工作空间

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces

语法

aliyun aiworkspace CreateWorkspace
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/workspaces --region cn-hangzhou --header "Content-Type=application/json" --body '{"Description":"这是一个工作空间描述示例。","WorkspaceName":"workspace_example","EnvTypes":["dev"]}'

CreateWorkspaceResource

命令描述

添加资源引用到工作空间

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/resources

语法

aliyun aiworkspace CreateWorkspaceResource
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/workspaces/123/resources --region cn-hangzhou --header "Content-Type=application/json" --body '{"Resources":[{"WorkspaceId":"123","EnvType":"prod","Name":"ResourceName"}]}'

CreateWorkspaceRole

命令描述

增加工作空间角色

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/roles

语法

aliyun aiworkspace CreateWorkspaceRole
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。可通过 https://help.aliyun.com/document_detail/449124.html获取

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/workspaces/123/roles --region cn-hangzhou --header "Content-Type=application/json"

DeleteCodeSource

命令描述

指定ID,删除一个代码配置

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/codesources/{CodeSourceId}

语法

aliyun aiworkspace DeleteCodeSource
    --CodeSourceId <string>
    [options]

参数

参数

类型

必填

说明

--CodeSourceId

String

是

待删除的代码配置ID。如何获取代码配置ID,请参见https://help.aliyun.com/document_detail/459922.html

示例

aliyun aiworkspace DELETE /api/v1/codesources/code-20210111103721-85qz78ia96lu --region cn-hangzhou --header "Content-Type=application/json"

DeleteConfig

命令描述

删除工作空间配置

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/configs/{ConfigKey}

语法

aliyun aiworkspace DeleteConfig
    [--CategoryName <string>]
    --ConfigKey <string>
    [--Labels <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--CategoryName

String

否

配置项的分类。目前支持如下分类
CommonResourceConfig 通用资源配置
DLCAutoRecycle DLC自动回收- DLCPriorityConfig DLC 优先级设置
DSWPriorityConfig DSW优先级设置
QuotaMaximumDuration Quota的DLC任务最大运行时长配置
CommonTagConfig 标签设置




--ConfigKey

String

是

配置项的键。目前支持如下键:
tempStoragePath 临时存储路径,只有CategoryName为CommonResourceConfig时才允许使用该ConfigKey
isAutoRecycle 自动回收配置,只有CategoryName为DLCAutoRecycle时才允许使用该ConfigKey
priorityConfig 优先级配置,只有CategoryName为DLCPriorityConfig或者DSWPriorityConfig时才允许使用该ConfigKey
quotaMaximumDuration Quota的DLC任务最大运行时长配置,只有CategoryName为QuotaMaximumDuration时才允许使用该ConfigKey
predefinedTags 工作空间预置标签,创建的资源必须带上标签




--Labels

String

否

过滤条件,多个条件用逗号分隔,这些条件之间是与的关系

--WorkspaceId

String

是

工作空间ID

示例

aliyun aiworkspace DELETE /api/v1/workspaces/98000/configs/tempStoragePath --region cn-hangzhou --header "Content-Type=application/json"

DeleteConnection

命令描述

删除连接

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/connections/{ConnectionId}

语法

aliyun aiworkspace DeleteConnection
    --ConnectionId <string>
    [options]

参数

参数

类型

必填

说明

--ConnectionId

String

是

连接ID。如何获取连接 ID,详情请参见 [ListConnections](~~ListConnections~~)

示例

aliyun aiworkspace DELETE /api/v1/connections/conn-pai9m000mi47 --region cn-hangzhou --header "Content-Type=application/json"

DeleteDataset

命令描述

删除数据集

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}

语法

aliyun aiworkspace DeleteDataset
    --DatasetId <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-rbvg5wzlj00009ks92 --region cn-hangzhou --header "Content-Type=application/json"

DeleteDatasetFileMetas

命令描述

批量删除数据集下的文件元数据记录

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetfilemetas

语法

aliyun aiworkspace DeleteDatasetFileMetas
    --DatasetFileMetaIds <string>
    --DatasetId <string>
    [--DatasetVersion <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetFileMetaIds

String

是

数据集文件元数据ID

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetVersion

String

否

数据集版本名

--WorkspaceId

String

否

数据集所在工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-lfd60v0p0000ujtsdx/datasetfilemetas --region cn-hangzhou --DatasetFileMetaIds '07914c9534586e4e7aa6e9dbca5009082df******fd8a0d857b33296c59bf6
' --header "Content-Type=application/json"

DeleteDatasetJob

命令描述

删除数据集任务

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetjobs/{DatasetJobId}

语法

aliyun aiworkspace DeleteDatasetJob
    --DatasetId <string>
    --DatasetJobId <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetJobId

String

是

数据集任务ID

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-rbvg500000jhc9ks92/datasetjobs/dsjob-9jx1000000uj9e --region cn-hangzhou --header "Content-Type=application/json"

DeleteDatasetJobConfig

命令描述

删除数据集任务配置

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetjobconfigs/{DatasetJobConfigId}

语法

aliyun aiworkspace DeleteDatasetJobConfig
    --DatasetId <string>
    --DatasetJobConfigId <string>
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集id

--DatasetJobConfigId

String

是

配置id

--WorkspaceId

String

否

工作空间ID

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-rbvg5wz0000c9ks92/datasetjobconfigs/dscfg-xxxxxxxxxxxx --region cn-hangzhou --header "Content-Type=application/json"

DeleteDatasetLabels

命令描述

删除数据集标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/labels

语法

aliyun aiworkspace DeleteDatasetLabels
    [--DatasetId <string>]
    [--LabelKeys <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

否

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--LabelKeys

String

否

标签的键值。如何查询标签的键值,详情请参见https://help.aliyun.com/document_detail/457218.html。多项标签使用半角逗号(,)分隔

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-rbvg50000jhc9ks92/labels --region cn-hangzhou --LabelKeys 'key1,key2' --header "Content-Type=application/json"

DeleteDatasetVersion

命令描述

删除指定版本的数据集信息。其中版本v1无法使用本接口删除,需要使用DeleteDataset接口删除数据集的时候同步删除

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/versions/{VersionName}

语法

aliyun aiworkspace DeleteDatasetVersion
    --DatasetId <string>
    --VersionName <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--VersionName

String

是

数据集版本。版本号需要大于v1,v1版本会在删除数据集的时候同步删除

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-lfd60v0p0000ujtsdx/versions/v2 --region cn-hangzhou --header "Content-Type=application/json"

DeleteDatasetVersionLabels

命令描述

删除数据集版本的标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/versions/{VersionName}/labels

语法

aliyun aiworkspace DeleteDatasetVersionLabels
    --DatasetId <string>
    --Keys <string>
    --VersionName <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集版本ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--Keys

String

是

版本标签key, 多个标签key用英文逗号分隔

--VersionName

String

是

数据集版本名称

示例

aliyun aiworkspace DELETE /api/v1/datasets/d-rbvg500000jhc9ks92/versions/v1/labels --region cn-hangzhou --Keys 'key1,key2' --header "Content-Type=application/json"

DeleteExperiment

命令描述

删除实验

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/experiments/{ExperimentId}

语法

aliyun aiworkspace DeleteExperiment
    --ExperimentId <string>
    [options]

参数

参数

类型

必填

说明

--ExperimentId

String

是

实验ID

示例

aliyun aiworkspace DELETE /api/v1/experiments/exp-1zpfthdx000000 --region cn-hangzhou --header "Content-Type=application/json"

DeleteExperimentLabel

命令描述

删除实验的标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/experiments/{ExperimentId}/labels/{Key}

语法

aliyun aiworkspace DeleteExperimentLabel
    --ExperimentId <string>
    --Key <string>
    [options]

参数

参数

类型

必填

说明

--ExperimentId

String

是

实验ID

--Key

String

是

要删除的实验标签的Key

示例

aliyun aiworkspace DELETE /api/v1/experiments/exp-1zpfthdx000000/labels/is_evaluate --region cn-hangzhou --header "Content-Type=application/json"

DeleteMembers

命令描述

删除工作空间的成员

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/members

语法

aliyun aiworkspace DeleteMembers
    --MemberIds <string>
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--MemberIds

String

是

成员ID列表,多个成员ID以半角逗号(,)分隔。如何获取成员ID,请参见https://help.aliyun.com/document_detail/449135.html

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace DELETE /api/v1/workspaces/145883/members --region cn-hangzhou --MemberIds '145883-21513926******88039,145883-2769726******87513' --header "Content-Type=application/json"

DeleteModel

命令描述

删除模型

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/models/{ModelId}

语法

aliyun aiworkspace DeleteModel
    --ModelId <string>
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

示例

aliyun aiworkspace DELETE /api/v1/models/model-rbvg5wzl0000ks92 --region cn-hangzhou --header "Content-Type=application/json"

DeleteModelLabels

命令描述

删除模型标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/models/{ModelId}/labels

语法

aliyun aiworkspace DeleteModelLabels
    [--LabelKeys <string>]
    --ModelId <string>
    [options]

参数

参数

类型

必填

说明

--LabelKeys

String

否

需要删除的标签键。多项之间使用半角逗号(,)分隔

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

示例

aliyun aiworkspace DELETE /api/v1/models/model-d8dfd0000sjfd/labels --region cn-hangzhou --header "Content-Type=application/json"

DeleteModelVersion

命令描述

删除模型版本

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/models/{ModelId}/versions/{VersionName}

语法

aliyun aiworkspace DeleteModelVersion
    --ModelId <string>
    --VersionName <string>
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--VersionName

String

是

模型版本

示例

aliyun aiworkspace DELETE /api/v1/models/model-rbvg5wzljz0000ks92/versions/0.1.1 --region cn-hangzhou --header "Content-Type=application/json"

DeleteModelVersionLabels

命令描述

删除模型版本标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/models/{ModelId}/versions/{VersionName}/labels

语法

aliyun aiworkspace DeleteModelVersionLabels
    [--LabelKeys <string>]
    --ModelId <string>
    --VersionName <string>
    [options]

参数

参数

类型

必填

说明

--LabelKeys

String

否

需要删除的标签键。多项之间使用半角逗号(,)分隔

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--VersionName

String

是

模型版本

示例

aliyun aiworkspace DELETE /api/v1/models/model-d8dfd0000sjfd/versions/0.1.1/labels --region cn-hangzhou --header "Content-Type=application/json"

DeletePrompt

命令描述

删除提示词

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/prompts/{PromptId}

语法

aliyun aiworkspace DeletePrompt
    --PromptId <string>
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--PromptId

String

是

Prompt的唯一标识

--WorkspaceId

String

是

工作空间ID

示例

aliyun aiworkspace DELETE /api/v1/prompts/pmt-axbxtc0000xxx --region cn-hangzhou --WorkspaceId 1234 --header "Content-Type=application/json"

DeleteRun

命令描述

删除Run

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/runs/{RunId}

语法

aliyun aiworkspace DeleteRun
    --RunId <string>
    [options]

参数

参数

类型

必填

说明

--RunId

String

是

运行ID

示例

aliyun aiworkspace DELETE /api/v1/runs/run-1qJhzJ2YXgX0000 --region cn-hangzhou --header "Content-Type=application/json"

DeleteRunLabel

命令描述

删除Run标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/runs/{RunId}/labels/{Key}

语法

aliyun aiworkspace DeleteRunLabel
    --Key <string>
    --RunId <string>
    [options]

参数

参数

类型

必填

说明

--Key

String

是

要删除的Run标签的Key

--RunId

String

是

运行ID

示例

aliyun aiworkspace DELETE /api/v1/runs/run-1qJhzJ2YXgX0000/labels/is_evaluate --region cn-hangzhou --header "Content-Type=application/json"

DeleteUserConfig

命令描述

删除用户配置

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/userconfigs/{CategoryName}

语法

aliyun aiworkspace DeleteUserConfig
    --CategoryName <string>
    [--ConfigKey <string>]
    [--Scope <string>]
    [options]

参数

参数

类型

必填

说明

--CategoryName

String

是

分类,目前只支持DataPrivacyConfig

--ConfigKey

String

否

配置键,目前只支持customizePAIAssumedRole

--Scope

String

否

范围,目前支持subUser、owner

示例

aliyun aiworkspace DELETE /api/v1/userconfigs/DataPrivacyConfig --region cn-hangzhou --header "Content-Type=application/json"

DeleteWorkspace

命令描述

删除工作空间,关联的资源不会释放,需要您自已释放

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}

语法

aliyun aiworkspace DeleteWorkspace
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace DELETE /api/v1/workspaces/123 --region cn-hangzhou --header "Content-Type=application/json"

DeleteWorkspaceResource

命令描述

删除工作空间对资源的引用,不会删除底层的资源

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/resources

语法

aliyun aiworkspace DeleteWorkspaceResource
    [--GroupName <string>]
    [--Labels <string>]
    [--Option <string>]
    [--ProductType <string>]
    [--ResourceIds <string>]
    [--ResourceType <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--GroupName

String

否

资源分组名。如果获取资源分组名,请参见https://help.aliyun.com/document_detail/449143.html

--Labels

String

否

标签列表,以逗号分隔

--Option

String

否

删除行为,取值如下:
DetachAndDelete(默认值):与工作空间解绑并删除资源(默认值)。
Detach:与工作空间解绑

--ProductType

String

否

该字段已废弃,将会下线,请使用ResourceType字段

--ResourceIds

String

否

逗号分隔的多个资源ID,这多个资源ID的GroupName必须一致
GroupName与ResourceIds不能都为空,可以两项都不为空

--ResourceType

String

否

资源类型列表。取值如下:
ECS:通用计算资源
Lingjun:灵骏智算资源
ACS:ACS计算资源
FLINK:Flink资源。
MaxCompute: MaxCompute资源,目前只支持Option为Detach,不支持DetachAndDelete
SelfManagedAckPro:AckPro统一管控集群资源
SelfManagedAckLingjun:AckLinjun统一管控集群资源
SelfManagedASI:ASI统一管控集群资源(三方云)







--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace DELETE /api/v1/workspaces/123/resources --region cn-hangzhou --header "Content-Type=application/json"

DeleteWorkspaceRoles

命令描述

批量删除工作空间角色

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/roles/action/delete

语法

aliyun aiworkspace DeleteWorkspaceRoles
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。可通过 https://help.aliyun.com/document_detail/449124.html获取

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/workspaces/98000/roles/action/delete --region cn-hangzhou --header "Content-Type=application/json"

GetCodeSource

命令描述

获取一个代码配置的详细信息

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/codesources/{CodeSourceId}

语法

aliyun aiworkspace GetCodeSource
    --CodeSourceId <string>
    [options]

参数

参数

类型

必填

说明

--CodeSourceId

String

是

代码源配置ID。如何获取代码配置ID,请参见https://help.aliyun.com/document_detail/459922.html

示例

aliyun aiworkspace GET /api/v1/codesources/code-2020000000000 --region cn-hangzhou --header "Content-Type=application/json"

GetConfig

命令描述

获取工作空间配置

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/config

语法

aliyun aiworkspace GetConfig
    [--CategoryName <string>]
    [--ConfigKey <string>]
    [--Verbose <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--CategoryName

String

否

配置项的分类。目前支持如下分类
CommonResourceConfig 通用资源配置
DLCAutoRecycle DLC自动回收
DLCPriorityConfig DLC 优先级设置
DSWPriorityConfig DSW优先级设置
QuotaMaximumDuration Quota的DLC任务最大运行时长配置
CommonTagConfig 标签设置





--ConfigKey

String

否

配置项的键。目前支持如下键:
tempStoragePath 临时存储路径,只有CategoryName为CommonResourceConfig时才允许使用该ConfigKey
isAutoRecycle 自动回收配置,只有CategoryName为DLCAutoRecycle时才允许使用该ConfigKey
priorityConfig 优先级配置,只有CategoryName为DLCPriorityConfig或者DSWPriorityConfig时才允许使用该ConfigKey
quotaMaximumDuration Quota的DLC任务最大运行时长配置,只有CategoryName为QuotaMaximumDuration时才允许使用该ConfigKey
predefinedTags 工作空间预置标签,创建的资源必须带上标签




--Verbose

String

否

配置项的值

--WorkspaceId

String

是

工作空间ID

示例

aliyun aiworkspace GET /api/v1/workspaces/12340000002/config --region cn-hangzhou --header "Content-Type=application/json"

GetConnection

命令描述

获取连接详情

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/connections/{ConnectionId}

语法

aliyun aiworkspace GetConnection
    --ConnectionId <string>
    [--EncryptOption <string>]
    [options]

参数

参数

类型

必填

说明

--ConnectionId

String

是

连接ID。如何获取连接 ID,详情请参见 [ListConnections](~~ListConnections~~)

--EncryptOption

String

否

加密设置。可取值:
PlainText:明文。
Secret:密文

示例

aliyun aiworkspace GET /api/v1/connections/conn-pai9m000mi47 --region cn-hangzhou --header "Content-Type=application/json"

GetDataset

命令描述

获取数据集

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}

语法

aliyun aiworkspace GetDataset
    --DatasetId <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

示例

aliyun aiworkspace GET /api/v1/datasets/d-rbvg5wz0000c9ks92 --region cn-hangzhou --header "Content-Type=application/json"

GetDatasetFileMeta

命令描述

获取数据集下的指定文件元数据记录

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetfilemetas/{DatasetFileMetaId}

语法

aliyun aiworkspace GetDatasetFileMeta
    --DatasetFileMetaId <string>
    --DatasetId <string>
    [--DatasetVersion <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetFileMetaId

String

是

数据集文件元数据ID

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetVersion

String

否

数据集版本名

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/datasets/d-rbvg5wz0000c9ks92/datasetfilemetas/07914c9534586e4e7aa6e9dbca5009082df000000fd8a0d857b33296c59bf6 --region cn-hangzhou --header "Content-Type=application/json"

GetDatasetFileMetasStatistics

命令描述

获取数据集下元数据的统计信息

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/statistics/datasets/{DatasetId}/datasetfilemetas

语法

aliyun aiworkspace GetDatasetFileMetasStatistics
    [--AggregateBy <string>]
    --DatasetId <string>
    --DatasetVersion <string>
    [--MaxResults <int>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--AggregateBy

String

否

按照指定的元数据字段来做统计聚合。不区分大小写。若不指定则为获取数据集文件元数据总数量,不会返回聚合列表。
支持:
filedir:文件的目录路径
filetype:文件类型
tags.user: 用户自定义标签
tags.user-delete-ai-tags: 用户删除的算法标签
tags.ai:算法标签(所有打标任务聚合后的)
tags.all: 算法标签+用户自定义标签( 已经去除用户删除的算法标签)






  • 约束:

    • 允许值:["filedir", "filetype", "tags.ai", "tags.all", "tags.user", "tags.user-delete-ai-tags"]

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetVersion

String

是

数据集版本名称

--MaxResults

Integer

否

使用NextToken方式查询时,每次最多返回的结果数。取值范围:1~100。默认值:10

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/statistics/datasets/d-rbvg5wz0000c9ks92/datasetfilemetas --region cn-hangzhou --WorkspaceId 145883 --DatasetVersion v1 --header "Content-Type=application/json"

GetDatasetJob

命令描述

获取数据集任务

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetjobs/{DatasetJobId}

语法

aliyun aiworkspace GetDatasetJob
    --DatasetId <string>
    --DatasetJobId <string>
    [--DatasetVersion <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetJobId

String

是

数据集任务ID

--DatasetVersion

String

否

数据集版本名称

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/datasets/d-rbvg500000jhc9ks92/datasetjobs/dsjob-9jx1xxxxxxuj9e --region cn-hangzhou --header "Content-Type=application/json"

GetDatasetJobConfig

命令描述

获取数据集任务配置

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetjobconfigs/{DatasetJobConfigId}

语法

aliyun aiworkspace GetDatasetJobConfig
    --DatasetId <string>
    --DatasetJobConfigId <string>
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID

--DatasetJobConfigId

String

是

配置id

--WorkspaceId

String

否

工作空间ID

示例

aliyun aiworkspace GET /api/v1/datasets/d-lfd60v0p0000ujtsdx/datasetjobconfigs/dscfg-xxxxxxxxxxxx --region cn-hangzhou --header "Content-Type=application/json"

GetDatasetVersion

命令描述

获取指定版本的数据集信息

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/versions/{VersionName}

语法

aliyun aiworkspace GetDatasetVersion
    --DatasetId <string>
    --VersionName <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--VersionName

String

是

软件版本名称

示例

aliyun aiworkspace GET /api/v1/datasets/d-lfd60v0p0000ujtsdx/versions/v1 --region cn-hangzhou --header "Content-Type=application/json"

GetDefaultWorkspace

命令描述

获取默认工作空间详情

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/defaultWorkspaces

语法

aliyun aiworkspace GetDefaultWorkspace
    [--Verbose <bool>]
    [options]

参数

参数

类型

必填

说明

--Verbose

Boolean

否

是否显示默认工作空间的详细信息,目前详细信息包含阶段列表详情(Conditions)。取值如下:
false(默认值):不显示详细信息。
true:显示详细信息

示例

aliyun aiworkspace GET /api/v1/defaultWorkspaces --region cn-hangzhou --Verbose false --header "Content-Type=application/json"

GetExperiment

命令描述

获取实验

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/experiments/{ExperimentId}

语法

aliyun aiworkspace GetExperiment
    [--ExperimentId <string>]
    [--Verbose <bool>]
    [options]

参数

参数

类型

必填

说明

--ExperimentId

String

否

实验ID

--Verbose

Boolean

否

是否获取关联到Experiment的最新Run信息

示例

aliyun aiworkspace GET /api/v1/experiments/exp-1zpfthdx000000 --region cn-hangzhou --Verbose false --header "Content-Type=application/json"

GetImage

命令描述

获取镜像详情

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/images/{ImageId}

语法

aliyun aiworkspace GetImage
    --ImageId <string>
    [--Verbose <bool>]
    [options]

参数

参数

类型

必填

说明

--ImageId

String

是

镜像ID。如何获取镜像ID,请参见https://help.aliyun.com/document_detail/449118.html

--Verbose

Boolean

否

是否显示非必要信息,非必要信息目前包含Labels。
取值如下:
false(默认值):不显示非必要信息。
true:显示非必要信息


示例

aliyun aiworkspace GET /api/v1/images/image-4c6200000053uor --region cn-hangzhou --header "Content-Type=application/json"

GetInstanceJob

命令描述

获取任务

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/instancejobs/{InstanceJobId}

语法

aliyun aiworkspace GetInstanceJob
    --InstanceJobId <string>
    [options]

参数

参数

类型

必填

说明

--InstanceJobId

String

是

请求对应的任务ID

示例

aliyun aiworkspace GET /api/v1/instancejobs/12345 --region cn-hangzhou --header "Content-Type=application/json"

GetMember

命令描述

获取工作空间的成员

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/member

语法

aliyun aiworkspace GetMember
    [--MemberId <string>]
    [--UserId <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--MemberId

String

否

成员UID。UserId与MemberId必须指定一个,不能同时指定

--UserId

String

否

用户UID。如何查看用户UID,请参见 https://help.aliyun.com/document_detail/449133.html。
UserId与MemberId必须指定一个,不能同时指定

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/workspaces/145883/member --region cn-hangzhou --header "Content-Type=application/json"

GetModel

命令描述

获取指定模型详情信息

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/models/{ModelId}

语法

aliyun aiworkspace GetModel
    --ModelId <string>
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

示例

aliyun aiworkspace GET /api/v1/models/model-rbvg50000c9ks92 --region cn-hangzhou --header "Content-Type=application/json"

GetModelVersion

命令描述

获取模型版本

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/models/{ModelId}/versions/{VersionName}

语法

aliyun aiworkspace GetModelVersion
    --ModelId <string>
    --VersionName <string>
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--VersionName

String

是

模型版本

示例

aliyun aiworkspace GET /api/v1/models/model-rbvg5wzljz0000ks92/versions/1.0.1 --region cn-hangzhou --header "Content-Type=application/json"

GetPermission

命令描述

获取工作空间的权限

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/permissions/{PermissionCode}

语法

aliyun aiworkspace GetPermission
    [--Accessibility <string>]
    [--CallerAccessKeyId <string>]
    [--CallerSecurityToken <string>]
    [--CallerType <string>]
    [--CallerUid <string>]
    [--Creator <string>]
    [--Labels <map>]
    [--Option <string>]
    --PermissionCode <string>
    [--Resource <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--Accessibility

String

否

访问类型,取值如下。
PUBLIC:当前工作空间所有成员都可以访问。
PRIVATE:只有创建者可以访问

--CallerAccessKeyId

String

否

The CallerAccessKeyId

--CallerSecurityToken

String

否

The CallerSecurityToken

--CallerType

String

否

The CallerType

--CallerUid

String

否

The CallerUid

--Creator

String

否

工作空间权限创建者的阿里云账号UID

--Labels

Map

否

标签

--Option

String

否

可选配置,多个配置用英文逗号(,)分隔,取值:
ResourceEmpty:资源为空。如果Resource没有设置,则为空。
DisableRam:不进行RAM检查

--PermissionCode

String

是

权限点的名字,region内唯一。权限点介绍,请参见https://help.aliyun.com/document_detail/2840449.html。 如何获取权限点名称,请参见https://help.aliyun.com/document_detail/449132.html

--Resource

String

否

资源

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GetPermission --region cn-hangzhou --header "Content-Type=application/json" --WorkspaceId '123' --PermissionCode 'PaiDLC:GetTensorboard'

GetPrompt

命令描述

获取提示词

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/prompts/{PromptId}

语法

aliyun aiworkspace GetPrompt
    --PromptId <string>
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--PromptId

String

是

Prompt的唯一标识

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/prompts/pmt-axbxtc0000xxx --region cn-hangzhou --WorkspaceId 114243 --header "Content-Type=application/json"

GetRun

命令描述

获取Run详情

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/runs/{RunId}

语法

aliyun aiworkspace GetRun
    --RunId <string>
    [--Verbose <bool>]
    [options]

参数

参数

类型

必填

说明

--RunId

String

是

运行ID

--Verbose

Boolean

否

是否获取Metrics, Params, Labels信息;非必填,默认为false

示例

aliyun aiworkspace GET /api/v1/runs/run-1qJhzJ2YXgX0000 --region cn-hangzhou --header "Content-Type=application/json"

GetWorkspace

命令描述

获取工作空间详细信息

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}

语法

aliyun aiworkspace GetWorkspace
    [--ExtraVerboseFields <string>]
    [--Verbose <bool>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--ExtraVerboseFields

String

否

逗号分隔的字符串,用于指定返回额外信息,该字段目前不生效

--Verbose

Boolean

否

是否显示工作空间Owner等补充信息。取值如下:
false(默认值):不显示补充信息。
true:显示补充信息

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/workspaces/12345 --region cn-hangzhou --header "Content-Type=application/json"

GetWorkspaceRole

命令描述

获取工作空间角色

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/roles/{RoleId}

语法

aliyun aiworkspace GetWorkspaceRole
    [--RoleId <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--RoleId

String

否

自定义角色ID

--WorkspaceId

String

是

工作空间ID。可通过 https://help.aliyun.com/document_detail/449124.html获取

示例

aliyun aiworkspace GET /api/v1/workspaces/image-tzi7f9czc0cxs9s45t/roles/role-sw0000002tij --region cn-hangzhou --header "Content-Type=application/json"

ListCodeSources

命令描述

查询代码配置列表,支持分页、排序和按条件过滤

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/codesources

语法

aliyun aiworkspace ListCodeSources
    [--DisplayName <string>]
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--SortBy <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DisplayName

String

否

代码配置的显示名称,支持模糊匹配

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。取值:
ASC(默认值):升序。
DESC:降序

--PageNumber

Integer

否

代码配置列表的页码。起始值为1,默认值为1

--PageSize

Integer

否

分页查询时设置的每页行数。默认为20

--SortBy

String

否

用于排序的字段名,取值如下:
GmtModifyTime:代码源修改时间。
DisplayName:展示名称。
CodeSourceId:代码源ID。
GmtCreateTime(默认值):代码源创建时间



--WorkspaceId

String

否

工作空间ID(必填)。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/codesources --region cn-hangzhou --Order desc --PageSize 10 --PageNumber 1 --SortBy GmtModifyTime --DisplayName MyDataSource --WorkspaceId 1234 --header "Content-Type=application/json"

ListConfigs

命令描述

获取工作空间配置列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/configs

语法

aliyun aiworkspace ListConfigs
    [--CategoryName <string>]
    [--ConfigKeys <string>]
    [--Labels <string>]
    [--Options <string>]
    [--Verbose <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--CategoryName

String

否

配置项的分类。目前支持如下分类
CommonResourceConfig 通用资源配置
DLCAutoRecycle DLC自动回收
DLCPriorityConfig DLC 优先级设置
DSWPriorityConfig DSW优先级设置
QuotaMaximumDuration Quota的DLC任务最大运行时长配置
CommonTagConfig 标签设置





--ConfigKeys

String

否

配置项的键。目前支持如下键:
tempStoragePath 临时存储路径,只有CategoryName为CommonResourceConfig时才允许使用该ConfigKey
isAutoRecycle 自动回收配置,只有CategoryName为DLCAutoRecycle时才允许使用该ConfigKey
priorityConfig 优先级配置,只有CategoryName为DLCPriorityConfig或者DSWPriorityConfig时才允许使用该ConfigKey
quotaMaximumDuration Quota的DLC任务最大运行时长配置,只有CategoryName为QuotaMaximumDuration时才允许使用该ConfigKey
predefinedTags 工作空间预置标签,创建的资源必须带上标签




--Labels

String

否

标签作为过滤条件,多个条件用逗号分隔,这些条件之间是与的关系

--Options

String

否

额外选项,目前只支持ThrowExceptionOnError,表示有异常时抛出错误

--Verbose

String

否

是否展示Label信息
true:展示Label信息
false:不展示Label信息

--WorkspaceId

String

是

工作空间ID

示例

aliyun aiworkspace GET /api/v1/workspaces/87000/configs --region cn-hangzhou --header "Content-Type=application/json"

ListConnections

命令描述

获取连接列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/connections

语法

aliyun aiworkspace ListConnections
    [--Accessibility <string>]
    [--ConnectionIds <array>]
    [--ConnectionName <string>]
    [--ConnectionTypes <array>]
    [--Creator <string>]
    [--EncryptOption <string>]
    [--MaxResults <int>]
    [--Model <string>]
    [--ModelTypes <array>]
    [--NextToken <string>]
    [--Order <string>]
    [--SortBy <string>]
    [--ToolCall <bool>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--Accessibility

String

否

可见性。可取值:
PUBLIC:工作空间内公开可见
PRIVATE:仅创建者可见

--ConnectionIds

List

否

连接ID列表

--ConnectionName

String

否

连接的名称

--ConnectionTypes

List

否

连接类型列表

--Creator

String

否

创建者

--EncryptOption

String

否

加密设置。可取值:
PlainText(明文)
Secret(密文)

--MaxResults

Integer

否

每页的最大数据条数

--Model

String

否

模型标识符

--ModelTypes

List

否

模型类型列表

--NextToken

String

否

分页游标的标识。用于标记下一页查询的起始位置

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序,与SortBy结合使用。
ASC:升序。
DESC(默认值):降序

--SortBy

String

否

分页查询时的排序字段,默认使用GmtCreateTime。取值如下。
GmtCreateTime(默认值):按创建时间

--ToolCall

Boolean

否

是否支持ToolCall工具调用。可取值:
true:支持
false:不支持

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/connections --region cn-hangzhou --Order DESC --ModelTypes LLM --ConnectionTypes OpenLLMConnection --NextToken 15 --ToolCall true --Accessibility PRIVATE --SortBy GmtCreateTime --MaxResults 10 --WorkspaceId '478**' --Creator '12908*******3242' --ConnectionName 'Database connection' --EncryptOption PlainText --Model model_001 --ConnectionIds 'conn-ljasd***jsx' --header "Content-Type=application/json"

ListDatasetFileMetas

命令描述

查询数据集文件列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetfilemetas

语法

aliyun aiworkspace ListDatasetFileMetas
    [--DatasetFileMetaIds <array>]
    --DatasetId <string>
    --DatasetVersion <string>
    [--EndFileUpdateTime <string>]
    [--EndTagUpdateTime <string>]
    [--MaxResults <int>]
    [--NextToken <string>]
    [--Order <string>]
    [--PageSize <int>]
    [--QueryContentTypeIncludeAny <array>]
    [--QueryExpression <string>]
    [--QueryFileDir <string>]
    [--QueryFileName <string>]
    [--QueryFileTypeIncludeAny <array>]
    [--QueryImage <string>]
    [--QueryTagsExclude <array>]
    [--QueryTagsIncludeAll <array>]
    [--QueryTagsIncludeAny <array>]
    [--QueryText <string>]
    [--QueryType <string>]
    [--QueryVideo <string>]
    [--ScoreThreshold <float>]
    [--SortBy <string>]
    [--StartFileUpdateTime <string>]
    [--StartTagUpdateTime <string>]
    [--Status <string>]
    [--ThumbnailMode <string>]
    [--TopK <int>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--DatasetFileMetaIds

List

否

要查询的元数据ID列表

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetVersion

String

是

数据集版本名

--EndFileUpdateTime

String

否

用于指定查询的起始文件更新时间。ISO 8601 格式的 UTC 时间戳

--EndTagUpdateTime

String

否

用于指定查询的结束标签最后更新时间。ISO 8601 格式的 UTC 时间戳

--MaxResults

Integer

否

使用NextToken方式查询时,每次最多返回的结果数。取值范围:1~100。默认值:10

--NextToken

String

否

分页游标标识。
如果不设置该参数,则表示获取第一页的数据。当该参数有返回值时,说明还有下一页,您可以将返回的NextToken作为参数再次请求获得下一页的数据,直到返回为Null为止,表示获取到了所有的数据

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序,与SortBy结合使用。默认DESC。
ASC:升序。
DESC:降序

  • 约束:

    • 允许值:["ASC", "DESC"]

--PageSize

Integer

否

每页数量。如果同时传入MaxResults,则以MaxResults数量为准。
该参数即将下线,推荐您使用 NextToken 与 MaxResults 完成分页查询操作

--QueryContentTypeIncludeAny

List

否

表示“包含以下任意文件内容类型”检索条件。用户可以选择多个文件内容类型,查询结果只需满足其中一个即可。如果为空,则不应用此条件。数组使用逗号分隔

--QueryExpression

String

否

查询语句(DSL)是一种用于表达复杂检索条件的领域特定语言。它支持分组、布尔逻辑(AND/OR/NOT)、范围比较(>, >=, <, <=)、属性存在性(HAS/NOT HAS)、分词匹配(:)与精确匹配(=)等,适用于高级检索场景。
一般用于较为复杂的高级检索条件。
<notice>为避免冲突,设置该查询语句后,建议不要与其他查询参数混用</notice>

--QueryFileDir

String

否

文件目录检索条件。支持模糊检索

--QueryFileName

String

否

文件名检索条件。支持模糊检索

--QueryFileTypeIncludeAny

List

否

表示“包含以下任意文件类型”检索条件。用户可以选择多个文件类型,查询结果只需满足其中一个即可。如果为空,则不应用此条件。数组使用逗号分隔

--QueryImage

String

否

以图搜图时,该参数传入图片的信息。
支持传入图片的可公网访问的oss url格式。格式为:oss://{bucket_name}/{object_path}。其中bucket_name为bucket名称,object_path为文件在bucket中的路径。
当QueryType=VECTOR或MIX时有效

--QueryTagsExclude

List

否

表示“排除以下标签”检索条件。用户可以选择多个标签,查询结果中不能包含这些标签。如果为空,则不应用此条件。
当QueryType=TAG或MIX时有效

--QueryTagsIncludeAll

List

否

表示“同时包含以下标签”检索条件。用户可以选择多个标签,查询结果必须同时满足这些标签。如果为空,则不应用此条件。数组使用逗号分隔。
当QueryType=TAG或MIX时有效。当QueryType=TAG时会将QueryText加入到该条件下

--QueryTagsIncludeAny

List

否

表示“包含以下任意标签”检索条件。 用户可以选择多个标签,查询结果只需满足其中一个即可。 如果为空,则不应用此条件。数组使用逗号分隔。
当QueryType=TAG或MIX时有效

--QueryText

String

否

待搜索文本内容

--QueryType

String

否

检索类型。
MIX:混合检索(默认值)。
TAG:仅标签检索。
VECTOR:仅向量检索


  • 约束:

    • 允许值:["MIX", "TAG", "VECTOR"]

--QueryVideo

String

否

以视频搜索时,该参数传入视频文件的信息。
支持传入视频的可公网访问的oss url格式。格式为:oss://{bucket_name}/{object_path}。其中bucket_name为bucket名称,object_path为文件在bucket中的路径。
当QueryType=VECTOR或MIX时有效

--ScoreThreshold

Float

否

相似度分数过滤。只返回大于ScoreThreshold的结果。
当QueryType=VECTOR或MIX时有效

--SortBy

String

否

分页查询时的排序字段,缺省时按检索时相关性由高到低排序。其他取值如下。
FileCreateTime:按文件创建时间。
FileUpdateTime:按文件最后修改时间

  • 约束:

    • 允许值:["FileCreateTime", "FileUpdateTime"]

--StartFileUpdateTime

String

否

用于指定查询的结束文件更新时间。ISO 8601 格式的 UTC 时间戳

--StartTagUpdateTime

String

否

用于指定查询的起始标签最后更新时间。ISO 8601 格式的 UTC 时间戳

--Status

String

否

指定要查询的元数据状态
ACTIVE: 仅查询未删除数据(缺省)
ALL: 查询全部数据
DELETED: 仅查询已逻辑删除数据


  • 约束:

    • 允许值:["ACTIVE", "ALL", "DELETED"]

--ThumbnailMode

String

否

图片缩略图的模式,当前仅OSS文件支持缩略图:
等比例缩小: p_{percentage}, percentage表示期望的缩放比例,取值范围为[1, 100] 。示例:p_50表示使用原始文件的50%大小作为缩略图。
宽度固定,高度自适应缩小: w_{width}, width表示期望的图片宽度,取值范围为[1, 16384]。示例:w_200表示将图片宽度固定为200像素,高度自适应进行缩小。
高度固定,宽度自适应缩小:h_{height}, height表示期望的图片高度,取值范围为[1, 16384]。示例:h_100表示将图片高度固定为100像素,宽度自适应进行缩小。
固定宽高,缩略填充:m_pad,w_{height},h_{height},color_{RGB}, m_pad表示图片缩放为指定w与h的矩形内的最大图片,RGB表示指定居中填充空白部分的颜色,若不设置该参数,默认用白色填充。width表示期望的图片宽度,height表示期望的图片高度。width和height的取值范围都为[1,16384]。示例:
固定宽高,居中裁剪:m_fill,w_{width},h_{height}。m_fill表示图片等比缩放为延伸出指定w与h的矩形框外的最小图片,超出的部分进行居中裁剪。width表示期望的图片宽度,height表示期望的图片高度。width和height的取值范围都为[1,16384]示例:m_fill,w_100,h_100表示将图片宽度和高度都固定为100像素进行居中裁剪缩放。
强制宽高缩放: m_fixed,w_{height},h_{height},width表示期望的图片宽度,height表示期望的图片高度。width和height的取值范围都为[1,16384]。示例:m_fixed,w_100,h_100表示将图片宽度和高度都固定为100像素进行强制宽高缩放





--TopK

Integer

否

检索结果返回数量,最多只返回TopK个检索结果。
当QueryType=VECTOR或MIX时有效

  • 约束:

    • 最大值:5000

    • 最小值:1

--WorkspaceId

String

是

数据集所在工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/datasets/d-rbvg500000jhc9ks92/datasetfilemetas --region cn-hangzhou --WorkspaceId 105173 --DatasetVersion v1 --header "Content-Type=application/json"

ListDatasetJobConfigs

命令描述

批量查询数据集任务配置

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetjobconfigs/

语法

aliyun aiworkspace ListDatasetJobConfigs
    [--ConfigType <string>]
    --DatasetId <string>
    [--DatasetVersion <string>]
    [--PageNumber <string>]
    [--PageSize <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--ConfigType

String

否

配置类型
MultimodalIntelligentTag
MultimodalSemanticIndex

  • 约束:

    • 允许值:["MultimodalIntelligentTag", "MultimodalSemanticIndex"]

--DatasetId

String

是

数据集id

--DatasetVersion

String

否

数据集版本名

--PageNumber

String

否

代码配置列表的页码。起始值为1,默认值为1

--PageSize

String

否

分页大小,默认为10

--WorkspaceId

String

否

工作空间ID

示例

aliyun aiworkspace GET /api/v1/datasets/d-rbvg5wz0000c9ks92/datasetjobconfigs/ --region cn-hangzhou --header "Content-Type=application/json"

ListDatasetJobs

命令描述

获取数据集任务列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/datasetjobs

语法

aliyun aiworkspace ListDatasetJobs
    --DatasetId <string>
    [--DatasetVersion <string>]
    [--JobAction <string>]
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--SortBy <string>]
    [--Status <string>]
    [--WithLogs <bool>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集版本ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetVersion

String

否

数据集版本名称

--JobAction

String

否

任务操作

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序,与SortBy结合使用。默认DESC。
ASC:升序。
DESC:降序

--PageNumber

Integer

否

分页编号。从1开始,默认为1

--PageSize

Integer

否

分页大小

--SortBy

String

否

排序参数,默认根据创建时间倒序

  • 约束:

    • 允许值:["CreateTime", "FinishTime", "JobAction", "Status"]

--Status

String

否

任务状态

  • 约束:

    • 允许值:["Deleted", "Deleting", "Failed", "ManuallyStop", "PartialFailed", "Pending", "Running", "Starting", "Succeeded"]

--WithLogs

Boolean

否

是否返回任务日志

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/datasets/d-lfd60v0p0000ujtsdx/datasetjobs --region cn-hangzhou --header "Content-Type=application/json"

ListDatasetVersions

命令描述

获取数据集版本列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/versions

语法

aliyun aiworkspace ListDatasetVersions
    --DatasetId <string>
    [--LabelKeys <string>]
    [--LabelValues <string>]
    [--Order <string>]
    --PageNumber <int>
    --PageSize <int>
    [--Properties <string>]
    [--SortBy <string>]
    [--SourceId <string>]
    [--SourceTypes <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--LabelKeys

String

否

数据集标签,用于过滤数据集列表。标签Key或Value中,有指定字符串的,都会被过滤出来

--LabelValues

String

否

数据集标签,用于过滤数据集列表。标签Key或Value中,有指定字符串的,都会被过滤出来

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。默认值为ASC。
ASC:升序。
DESC:降序

  • 约束:

    • 允许值:["ASC", "DESC"]

--PageNumber

Integer

是

数据集列表的页码。起始值为1,默认为1

--PageSize

Integer

是

分页查询时设置的每页行数。默认为10

--Properties

String

否

数据集属性,支持以下取值:
DIRECTORY:文件夹。
FILE:文件

  • 约束:

    • 允许值:["DIRECTORY", "FILE"]

--SortBy

String

否

分页查询时的排序字段,默认使用GmtCreateTime。取值如下。
GmtCreateTime(默认值):按创建时间。
GmtModifiedTime:按修改时间。
SourceType
DataSourceType
Property
DataSize
DataCount






  • 约束:

    • 允许值:["DataCount", "DataSize", "DataSourceType", "DatasetId", "GmtCreateTime", "GmtModifiedTime", "Property", "SourceType"]

--SourceId

String

否

数据来源ID。
当SourceTypes为USER时,SourceId支持自定义。
当SourceTypes为ITAG时,即iTAG模块标注结果生成的数据集时,SourceId为ITAG的任务ID。
当SourceTypes为PAI_PUBLIC_DATASET时,即使用PAI公共数据集创建的数据集时,SourceId默认为空


--SourceTypes

String

否

来源类型,支持以下取值:
PAI-PUBLIC-DATASET:PAI公共数据集。
ITAG:iTAG模块标注结果生成的数据集。
USER:用户注册的数据集


  • 约束:

    • 允许值:["ITAG", "PAI_PUBLIC_DATASET", "USER"]

示例

aliyun aiworkspace GET /api/v1/datasets/d-rbvg5wz0000c9ks92/versions --region cn-hangzhou --PageSize 10 --PageNumber 1 --header "Content-Type=application/json"

ListDatasets

命令描述

获取某个工作空间下的数据集列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/datasets

语法

aliyun aiworkspace ListDatasets
    [--Accessibility <string>]
    [--DataSourceTypes <string>]
    [--DataTypes <string>]
    [--DatasetIds <string>]
    [--Edition <string>]
    [--Label <string>]
    [--Name <string>]
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--Properties <string>]
    [--Provider <string>]
    [--ShareScope <string>]
    [--SortBy <string>]
    [--SourceDatasetId <string>]
    [--SourceId <string>]
    [--SourceTypes <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--Accessibility

String

否

数据集的可见性。
PUBLIC表示公开。
PRIVATE表示私有

  • 约束:

    • 允许值:["PRIVATE", "PUBLIC"]

--DataSourceTypes

String

否

数据源类型,多项之间使用半角逗号分隔。支持以下取值:
NAS:数据存储为阿里云文件存储(NAS)。
OSS:数据存储为阿里云对象存储(OSS)

  • 约束:

    • 允许值:["NAS", "OSS"]

--DataTypes

String

否

数据集的数据类型,多项之间使用半角逗号(,)分隔。支持以下取值:
VIDEO:视频。
COMMON:通用。
TEXT:文本。
PIC:图片。
AUDIO:音频




  • 约束:

    • 允许值:["AUDIO", "COMMON", "PIC", "TEXT", "VIDEO"]

--DatasetIds

String

否

数据集ID(支持输入多个数据集ID,用","分隔)

--Edition

String

否

数据集类型。枚举值:
BASIC:基础型。不支持数据集文件元数据管理。
ADVANCED:高级型。仅OSS类型支持,每个版本支持最多100万个文件元数据管理。
LOGICAL: 逻辑型。仅OSS类型支持,每个版本支持最多100万个文件元数据管理。适用于绝大部分场景,需配合SDK使用


  • 约束:

    • 允许值:["ADVANCED", "BASIC", "LOGICAL"]

--Label

String

否

数据集标签,用于过滤数据集列表。标签Key或Value中,有指定字符串的,都会被过滤出来

--Name

String

否

数据集名称,支持根据数据集名称模糊搜索

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。默认值为ASC。
ASC:升序。
DESC:降序

  • 约束:

    • 允许值:["ASC", "DESC"]

--PageNumber

Integer

否

数据集列表的页码。起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页行数。默认为10

--Properties

String

否

数据集属性,多项之间使用半角逗号(,)分隔。支持以下取值:
DIRECTORY:文件夹。
FILE:文件

  • 约束:

    • 允许值:["DIRECTORY", "FILE"]

--Provider

String

否

数据集提供方。返回值为"pai"时表示该数据集为PAI平台的公共数据集

--ShareScope

String

否

分享数据集过滤器:
TO_ME: 仅过滤分享给我的数据集。
BY_ME: 仅过滤我分享给他人的数据集,展示分享配置详情。
不设置该参数或设置为空:获取当前工作空间的所有的数据集,包括TO_ME


  • 约束:

    • 允许值:["BY_ME", "TO_ME"]

--SortBy

String

否

排序字段

  • 约束:

    • 允许值:["DataSourceType", "DataType", "GmtCreateTime", "GmtModifiedTime"]

--SourceDatasetId

String

否

iTag标注集的来源数据集ID

--SourceId

String

否

数据来源ID。
当SourceTypes为USER时,SourceId支持自定义。
当SourceTypes为ITAG时,即iTAG模块标注结果生成的数据集时,SourceId为ITAG的任务ID。
当SourceTypes为PAI_PUBLIC_DATASET时,即使用PAI公共数据集创建的数据集时,SourceId默认为空


--SourceTypes

String

否

来源类型,多项之间使用半角逗号分隔

  • 约束:

    • 允许值:["ITAG", "PAI_PUBLIC_DATASET", "USER"]

--WorkspaceId

String

否

数据集所在工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html。
如果不配置该参数,则会使用默认工作空间;如果默认工作空间不存在,则会报错

示例

aliyun aiworkspace GET /api/v1/datasets --region cn-hangzhou --Order ASC --PageSize 10 --Accessibility PRIVATE --SortBy GmtCreateTime --SourceId 'd-rbvg5wzljzjhc9ks92' --WorkspaceId '324**' --Label test --SourceDatasetId 'd-rcdg3wxxxxxhc5jk87
' --Properties FILE --Edition BASIC --Name myName --Provider pai --DataSourceTypes OSS --PageNumber 1 --DatasetIds 'd-rcdg3wxxxxxhc5jk87' --SourceTypes 'USER,ITAG' --ShareScope BY_ME --DataTypes 'COMMON,TEXT' --header "Content-Type=application/json"

ListExperiment

命令描述

获取实验列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/experiments

语法

aliyun aiworkspace ListExperiment
    [--Labels <string>]
    [--MaxResults <int>]
    [--Name <string>]
    [--Options <object>]
    [--Order <string>]
    [--OrderBy <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--PageToken <int>]
    [--SortBy <string>]
    [--Verbose <bool>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--Labels

String

否

标签过滤条件,多个条件以半角逗号(,)分隔。
单个条件过滤格式为Key=Value

--MaxResults

Integer

否

请求的最大结果数,默认为10

--Name

String

否

实验名称

--Options

Object

否

可选参数

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。
ASC:升序。
DESC(默认):降序

--OrderBy

String

否

排序方式字符串列表,支持排序的字段包括:GmtCreateTime、Name、GmtModifiedTime或ExperimentId。排序方式包括DESC和ASC,默认为ASC

--PageNumber

Integer

否

分页编号,从1开始

--PageSize

Integer

否

分页大小

--PageToken

Integer

否

分页token,从0开始,默认为0

--SortBy

String

否

分页查询时的排序字段。目前GmtCreateTime字段用于排序

--Verbose

Boolean

否

是否获取于实验相关的LatestRun信息

--WorkspaceId

String

否

实验所在工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html。
不填写工作空间ID,系统将返回默认工作空间的实验列表

示例

aliyun aiworkspace GET /api/v1/experiments --region cn-hangzhou --Order DESC --OrderBy 'GmtCreateTime DESC,Name ASC' --Options '{"match_name_exactly":"true"}' --PageSize 10 --Verbose false --PageNumber 1 --SortBy GmtCreateTime --MaxResults 10 --WorkspaceId '1517**' --PageToken 0 --Labels 'is_evaluation:true' --Name 'exp-test' --header "Content-Type=application/json"

ListFeatures

命令描述

列举特性

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/features

语法

aliyun aiworkspace ListFeatures
    [--Names <string>]
    [options]

参数

参数

类型

必填

说明

--Names

String

否

特性名称,以逗号分隔

示例

aliyun aiworkspace GET /api/v1/features --region cn-hangzhou --Names 'PaiConsole:IntegrateWithWorkspace' --header "Content-Type=application/json"

ListImageLabels

命令描述

获取镜像标签列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/image/labels

语法

aliyun aiworkspace ListImageLabels
    [--ImageId <string>]
    [--LabelFilter <string>]
    [--LabelKeys <string>]
    [--Region <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--ImageId

String

否

镜像ID。如何获取镜像ID,请参见https://help.aliyun.com/document_detail/449118.html

--LabelFilter

String

否

标签过滤条件,多个条件以逗号分隔。
单个条件过滤格式为key=value。
与LabelKeys分别独立生效

--LabelKeys

String

否

标签键的列表,以半角逗号(,)分隔。
系统标签以system开头,与LabelFilter分别独立生效

--Region

String

否

镜像所属地域

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/image/labels --region cn-hangzhou --ImageId 'image-4c62******53uor
' --WorkspaceId 12345 --Region 'cn-shanghai' --LabelKeys 'system.framework,system.official' --LabelFilter 'system.framework=XGBoost 1.6.0,system.official=true' --header "Content-Type=application/json"

ListImages

命令描述

获取镜像列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/images

语法

aliyun aiworkspace ListImages
    [--Accessibility <string>]
    [--ImageUri <string>]
    [--Labels <string>]
    [--Name <string>]
    [--Options <string>]
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--Query <string>]
    [--SortBy <string>]
    [--Verbose <bool>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--Accessibility

String

否

镜像的可见性,目前只对自定义镜像生效。
PUBLIC表示公开。
PRIVATE表示私有

--ImageUri

String

否

镜像地址

--Labels

String

否

标签过滤条件,多个条件以半角逗号(,)分隔。
单个条件过滤格式为Key=Value。
Key支持如下值:
system.chipType
system.dsw.cudaVersion
system.dsw.fromImageId
system.dsw.fromInstanceId
system.dsw.id
system.dsw.os
system.dsw.osVersion
system.dsw.resourceType
system.dsw.rootImageId
system.dsw.stage
system.dsw.tag
system.dsw.type
system.framework
system.origin
system.pythonVersion
system.source
system.supported.dlc
system.supported.dsw



















--Name

String

否

镜像名称,支持模糊搜索

--Options

String

否

选项,目前支持ExactMatchName,对于Name精确匹配搜索

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序,与SortBy结合使用。默认ASC。
ASC:升序。
DESC:降序

--PageNumber

Integer

否

镜像列表的页码。起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页行数。默认为20

--Query

String

否

模糊搜索镜像名称以及描述

--SortBy

String

否

分页查询时的排序字段。目前GmtCreateTime字段用于排序

--Verbose

Boolean

否

是否显示非必要信息,非必要信息目前包含Labels。取值如下:
true:包含非必要信息。
false:不包含非必要信息

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/images --region cn-hangzhou --Order DESC --Options ExactMatchName --PageSize 20 --Verbose true --Query name --Accessibility PUBLIC --PageNumber 1 --SortBy GmtCreateTime --WorkspaceId '20******55' --Labels 'system.framework=XGBoost 1.6.0,system.official=true
' --ImageUri 'registry.cn-hangzhou.aliyuncs.com/pai-compression/nlp:gpu' --Name 'tensorflow_2.9' --header "Content-Type=application/json"

ListMembers

命令描述

获取工作空间的成员列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/members

语法

aliyun aiworkspace ListMembers
    [--MemberName <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--Roles <string>]
    [--UserId <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--MemberName

String

否

成员名,支持模糊匹配

--PageNumber

Integer

否

工作空间列表的页码。起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页行数。默认为20

--Roles

String

否

使用角色过滤成员,多个角色以半角逗号(,)分隔。
支持以下角色名:
PAI.AlgoDeveloper:算法开发。
PAI.AlgoOperator:算法运维。
PAI.LabelManager:标注管理员。
PAI.MaxComputeDeveloper:MaxCompute开发。
PAI.WorkspaceAdmin:管理员。
PAI.WorkspaceGuest:访客。
PAI.WorkspaceOwner:负责人







--UserId

String

否

要查找的用户ID

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/workspaces/123/members --region cn-hangzhou --header "Content-Type=application/json"

ListModelVersions

命令描述

获取模型版本列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/models/{ModelId}/versions

语法

aliyun aiworkspace ListModelVersions
    [--ApprovalStatus <string>]
    [--FormatType <string>]
    [--FrameworkType <string>]
    [--Label <string>]
    --ModelId <string>
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--SortBy <string>]
    [--SourceId <string>]
    [--SourceType <string>]
    [--VersionName <string>]
    [options]

参数

参数

类型

必填

说明

--ApprovalStatus

String

否

根据准入状态来过滤模型版本列表,取值如下:
Pending:待定。
Approved:允许上线。
Rejected:不允许上线


--FormatType

String

否

配置模型格式,来过滤模型版本列表。取值如下:
OfflineModel
SavedModel
Keras H5
Frozen Pb
Caffe Prototxt
TorchScript
XGBoost
PMML
AlinkModel
ONNX









  • 约束:

    • 允许值:["AlinkModel", "Caffe Prototxt", "Frozen Pb", "Keras H5", "ONNX", "OfflineModel", "PMML", "SavedModel", "TorchScript", "XGBoost"]

--FrameworkType

String

否

配置模型框架,来过滤模型版本列表,取值如下:
Pytorch
-XGBoost
Keras
Caffe
Alink
Xflow
TensorFlow






  • 约束:

    • 允许值:["Alink", "Caffe", "Keras", "Pytorch", "TensorFlow", "XGBoost", "Xflow"]

--Label

String

否

标签串。用于列表过滤,标签中Key或Value中,有指定字符串的,都会被过滤出来

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。默认ASC。
ASC:升序。
DESC:降序

--PageNumber

Integer

否

模型版本列表的页码。起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页行数。默认为10

--SortBy

String

否

分页查询时的排序字段。目前GmtCreateTime字段用于排序

--SourceId

String

否

来源ID。
来源类型为Custom时,该字段不做限制。
来源为PAIFlow、TrainingService时,格式为
```
region=<region_id>,workspaceId=<workspace_id>,kind=<kind>,id=<id>
```
其中:
region为阿里云区域ID。
workspacceId为工作空间ID。
kind:为类型。取值:PipelineRun(PAIFlow工作流);ServiceJob(训练服务)。
id:为唯一标识









--SourceType

String

否

根据模型来源类型,来过滤模型版本列表。取值如下:
Custom(默认值):自定义。
PAIFlow:PAI工作流。
TrainingService:PAI训练服务


  • 约束:

    • 允许值:["Custom", "PAIFlow", "TrainingService"]

--VersionName

String

否

配置模型版本名称,来过滤模型版本列表

示例

aliyun aiworkspace GET /api/v1/models/model-dajbueh000000/versions --region cn-hangzhou --header "Content-Type=application/json"

ListModels

命令描述

获取模型列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/models

语法

aliyun aiworkspace ListModels
    [--Collections <string>]
    [--Conditions <array>]
    [--Domain <string>]
    [--Label <string>]
    [--ModelName <string>]
    [--ModelType <string>]
    [--Order <string>]
    [--Origin <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--Provider <string>]
    [--Query <string>]
    [--SortBy <string>]
    [--Tag <array>]
    [--Task <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--Collections

String

否

模型所在Collection,支持填写多个,用英文逗号分割

--Conditions

List

否

条件

--Domain

String

否

配置领域来过滤该领域内的模型列表。例如:nlp(自然语言处理)、cv(计算机视觉)等

--Label

String

否

标签串。用于列表过滤,标签中key或value中,有指定字符串的,都会被过滤出来

--ModelName

String

否

配置模型名称,用来过滤获取的模型列表

--ModelType

String

否

模型类型

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。默认ASC。
ASC:升序。
DESC:降序

--Origin

String

否

配置模型源,来过滤属于该社区或组织的模型列表。例如ModelScope,HuggingFace等

--PageNumber

Integer

否

模型列表的页码。起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页显示的模型数量,默认为10

--Provider

String

否

提供者。指定提供者,则只返回该提供者公开的模型。不填则返回用户自己的模型

--Query

String

否

配置查询条件。ModelName、Domain、Task、LabelKey、LabelValue相似匹配。
例如输入为nlp,则ModelName、Domain、Task、LabelKey、LabelValue中匹配的模型都会返回

--SortBy

String

否

分页查询时的排序字段。目前使用GmtCreateTime字段用于排序

--Tag

List

否

标签列表

--Task

String

否

配置任务来过滤属于该任务类型的模型列表。例如:text-classification(文本分类)等

--WorkspaceId

String

否

配置工作空间ID,返回列表中只获取该工作空间内的模型列表。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/models --region cn-hangzhou --Order DESC --Origin ModelScope --Task 'text-classification' --ModelName 'Sentiment analysis' --PageSize 10 --Query nlp --SortBy GmtCreateTime --WorkspaceId '324**' --Label key1 --Conditions '[{"Operator":"LessThan","Column":"ParameterSize","Value":"3000"}]' --Provider pai --PageNumber 1 --ModelType Endpoint --Tag '[{"Value":"value1","Key":"key1"}]' --Domain nlp --Collections 'AI4D,QuickStart' --header "Content-Type=application/json"

ListPermissions

命令描述

获取用户在工作空间内的权限列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/permissions

语法

aliyun aiworkspace ListPermissions
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/workspaces/123/permissions --region cn-hangzhou --header "Content-Type=application/json"

ListProducts

命令描述

列举产品

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/products

语法

aliyun aiworkspace ListProducts
    [--ProductCodes <string>]
    [--ServiceCodes <string>]
    [--Verbose <bool>]
    [options]

参数

参数

类型

必填

说明

--ProductCodes

String

否

逗号分割的商品 code

--ServiceCodes

String

否

逗号分割的服务 code

--Verbose

Boolean

否

The Verbose

示例

aliyun aiworkspace GET /api/v1/products --region cn-hangzhou --ProductCodes PAI_isolate --Verbose true --ServiceCodes oss --header "Content-Type=application/json"

ListPrompts

命令描述

获取提示词列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/prompts

语法

aliyun aiworkspace ListPrompts
    [--FrameworkType <string>]
    [--Order <string>]
    [--PageNumber <string>]
    [--PageSize <string>]
    [--SortBy <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--FrameworkType

String

否

提示词模版框架类型

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。默认ASC。
ASC:升序。
DESC:降序

--PageNumber

String

否

分页编号,从1开始,默认为1

--PageSize

String

否

分页大小,默认为20

--SortBy

String

否

用于排序的字段名,取值如下:
Name:Run名称。
GmtCreateTime(默认值):Run创建时间

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/prompts --region cn-hangzhou --WorkspaceId 145883 --header "Content-Type=application/json"

ListQuotas

命令描述

获取资源配额列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/quotas

语法

aliyun aiworkspace ListQuotas
    [--Name <string>]
    [options]

参数

参数

类型

必填

说明

--Name

String

否

资源配额名称,支持模糊搜索

示例

aliyun aiworkspace GET /api/v1/quotas --region cn-hangzhou --Name 'quota-name' --header "Content-Type=application/json"

ListResources

命令描述

获取工作空间内已关联的资源列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/resources

语法

aliyun aiworkspace ListResources
    [--GroupName <string>]
    [--Labels <string>]
    [--Option <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--ProductTypes <string>]
    [--QuotaIds <string>]
    [--ResourceName <string>]
    [--ResourceTypes <string>]
    [--Verbose <bool>]
    [--VerboseFields <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--GroupName

String

否

资源分组名。如何获取资源分组名,请参见https://help.aliyun.com/document_detail/449143.html

--Labels

String

否

Label过滤条件集合,多个条件用逗号分隔。只有同时满足这些标签的资源才会被返回。
目前只有ProductType=ACS的资源才支持用该参数过滤

--Option

String

否

选项,取值如下:
ListResourceByWorkspace(默认值):获取工作空间的资源列表。
ListResource:获取用户的资源列表

--PageNumber

Integer

否

资源列表的页码,起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页行数,默认为20

--ProductTypes

String

否

该字段已废弃,将会下线,请使用ResourceType字段

--QuotaIds

String

否

QuotaId集合,用逗号分割。只有同时具有这些QuotaId的资源才会被返回。
目前只有ResourceTypes=ACS的资源才支持用该参数过滤

--ResourceName

String

否

资源名。格式为:
长度为3~28个字符。
同地域内唯一

--ResourceTypes

String

否

资源类型列表。取值如下:
MaxCompute:大数据计算服务资源
ECS:通用计算资源
Lingjun:灵骏智算资源
ACS:ACS计算资源
FLINK:Flink资源
SelfManagedAckPro:AckPro统一管控集群资源
SelfManagedAckLingjun:AckLinjun统一管控集群资源
SelfManagedASI:ASI统一管控集群资源(三方云)







--Verbose

Boolean

否

是否展示详细信息,目前详细信息包含字段Quotas。取值如下:
true(默认值):展示详细信息
false:不展示详细信息

--VerboseFields

String

否

逗号分隔的集合,表明要返回的字段。目前支持:
Quota
Label
IsDefault


--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html。
当参数Option为ListResourceByWorkspace时,该参数必填。
当参数Option为ListResource时,该参数无需配置

示例

aliyun aiworkspace GET /api/v1/resources --region cn-hangzhou --GroupName group --ProductTypes MaxCompute --ResourceTypes MaxCompute --QuotaIds 'quota-k******da,quota-cd******w' --PageSize 20 --Verbose true --PageNumber 1 --ResourceName resource --WorkspaceId 123 --VerboseFields 'Quota,IsDefault' --Option ListResourceByWorkspace --Labels 'system.supported.dsw=true,system.supported.dlc=true' --header "Content-Type=application/json"

ListRunMetrics

命令描述

获取Run的指标记录列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/runs/{RunId}/metrics

语法

aliyun aiworkspace ListRunMetrics
    --Key <string>
    [--MaxResults <int>]
    [--PageToken <int>]
    --RunId <string>
    [options]

参数

参数

类型

必填

说明

--Key

String

是

运行的指标的Key

--MaxResults

Integer

否

请求的最大结果数,默认为10

--PageToken

Integer

否

分页token,从0开始,默认为0

--RunId

String

是

运行ID

示例

aliyun aiworkspace GET /api/v1/runs/run-1qJhzJ2YXgX0000/metrics --region cn-hangzhou --Key loss --header "Content-Type=application/json"

ListRuns

命令描述

获取Run列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/runs

语法

aliyun aiworkspace ListRuns
    [--ExperimentId <string>]
    [--GmtCreateTime <string>]
    [--Labels <string>]
    [--MaxResults <int>]
    [--Name <string>]
    [--Order <string>]
    [--OrderBy <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--PageToken <int>]
    [--SortBy <string>]
    [--SourceId <string>]
    [--SourceType <string>]
    [--Verbose <bool>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--ExperimentId

String

否

Run所属实验ID

--GmtCreateTime

String

否

实例创建时间,采用 ISO 8601 标准的 UTC 时间,格式为 YYYY-MM-DDTHH:mm:ss.sssZ

--Labels

String

否

任务的标签,精确匹配。支持:
单标签查询:"is_evaluation:true"
多标签场景(非特殊场景不推荐,可能存在性能问题):"is_evaluation:true,LLM_evaluation:true" 使用半角逗号(,)分隔,表示多个标签key-value需要同时匹配

--MaxResults

Integer

否

请求的最大结果数,默认为10

--Name

String

否

运行名称

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序,与SortBy结合使用。
ASC:升序。
DESC(默认值):降序

--OrderBy

String

否

排序方式的字符串列表,支持排序的字段包括:GmtCreateTime、Name。排序方式包括DESC和ASC,默认为ASC。支持多个字段,用半角逗号","分隔

--PageNumber

Integer

否

当前页数。 取值范围:大于0。 默认值:1

--PageSize

Integer

否

每页显示的记录数

--PageToken

Integer

否

分页token,从0开始,默认为0

--SortBy

String

否

用于排序的字段名,取值如下:
Name:Run名称。
GmtCreateTime(默认值):Run创建时间

--SourceId

String

否

Run关联的PAI Workload ID

--SourceType

String

否

Run关联的PAI Workload类型

--Verbose

Boolean

否

是否展示详细信息,包括:Metrics、Params和Labels。取值如下:
true:表示展示详细信息。
false(默认值):表示不展示详细信息

--WorkspaceId

String

否

实验所在工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html。
不填写工作空间ID,系统将返回默认工作空间的运行列表

示例

aliyun aiworkspace GET /api/v1/runs --region cn-hangzhou --OrderBy 'GmtCreateTime DESC,Name ASC' --Order DESC --Verbose true --PageSize 10 --SortBy GmtCreateTime --SourceType TrainingService --SourceId 'job-rbvg5wzlj****' --MaxResults 10 --WorkspaceId '228**' --PageToken 0 --Labels 'is_evaluation:true' --Name myName --PageNumber 1 --ExperimentId 'exp-1zpfthdx******' --GmtCreateTime '2021-01-30T12:51:33.028Z' --header "Content-Type=application/json"

ListUserConfigs

命令描述

获取用户配置

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/userconfigs

语法

aliyun aiworkspace ListUserConfigs
    [--CategoryNames <string>]
    [--ConfigKeys <string>]
    [options]

参数

参数

类型

必填

说明

--CategoryNames

String

否

分类,目前只支持DataPrivacyConfig

--ConfigKeys

String

否

配置键的集合,目前只支持customizePAIAssumedRole

示例

aliyun aiworkspace GET /api/v1/userconfigs --region cn-hangzhou --CategoryNames DataPrivacyConfig --ConfigKeys customizePAIAssumedRole --header "Content-Type=application/json"

ListWorkspaceRoles

命令描述

列举工作空间角色

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/roles

语法

aliyun aiworkspace ListWorkspaceRoles
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--RoleIds <string>]
    [--RoleName <string>]
    [--RoleType <string>]
    [--SortBy <string>]
    [--Status <string>]
    [--VerboseFields <string>]
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。取值如下:
ASC(默认值):升序。
DESC :降序

--PageNumber

Integer

否

分页编号,从1开始,默认为1

--PageSize

Integer

否

分页大小,默认为20

--RoleIds

String

否

角色ID列表,英文逗号分隔

--RoleName

String

否

角色名称

--RoleType

String

否

角色类型。
custom:自定义角色

--SortBy

String

否

分页查询时的排序字段。取值如下:
GmtCreateTime(默认值):按创建时间。
GmtModifiedTime:按修改时间

--Status

String

否

状态。(废弃字段)

--VerboseFields

String

否

逗号分隔的集合,表明要返回的字段。目前支持ModulePermissions,代表是否返回角色的权限配置

--WorkspaceId

String

是

工作空间ID。可通过 https://help.aliyun.com/document_detail/449124.html获取

示例

aliyun aiworkspace GET /api/v1/workspaces/87000/roles --region cn-hangzhou --header "Content-Type=application/json"

ListWorkspaceUsers

命令描述

列出未加入工作空间的用户列表,这些用户可被加入工作空间成为成员

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/users

语法

aliyun aiworkspace ListWorkspaceUsers
    [--UserId <string>]
    [--UserName <string>]
    [--WorkspaceId <string>]
    [options]

参数

参数

类型

必填

说明

--UserId

String

否

用户ID

--UserName

String

否

支持添加为工作空间成员的用户显示名称

--WorkspaceId

String

否

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

示例

aliyun aiworkspace GET /api/v1/workspaces/12345/users --region cn-hangzhou --UserName 'doctest****' --UserId '1611******3000' --header "Content-Type=application/json"

ListWorkspaces

命令描述

获取某个地域下的工作空间列表

HTTP 方法:GET

protocol:HTTPS

url:/api/v1/workspaces

语法

aliyun aiworkspace ListWorkspaces
    [--Fields <string>]
    [--ModuleList <string>]
    [--Option <string>]
    [--Order <string>]
    [--PageNumber <int>]
    [--PageSize <int>]
    [--ResourceGroupId <string>]
    [--SortBy <string>]
    [--Status <string>]
    [--UserId <string>]
    [--Verbose <bool>]
    [--WorkspaceIds <string>]
    [--WorkspaceName <string>]
    [options]

参数

参数

类型

必填

说明

--Fields

String

否

工作空间详情的返回字段列表。用于限定返回结果中的工作空间属性。
多个属性用半角逗号(,)分隔。目前只支持Id,表示工作空间ID

--ModuleList

String

否

逗号分割的模块列表。默认值:PAI

--Option

String

否

选项,取值如下:
GetWorkspaces(默认值):获取工作空间列表,会返回Workspaces。
GetResourceLimits:获取资源限制,会返回ResourceLimits

--Order

String

否

分页查询时,对指定的排序字段进行升序或降序。取值如下:
ASC(默认值):升序。
DESC :降序

--PageNumber

Integer

否

工作空间列表的页码。起始值为1,默认为1

--PageSize

Integer

否

分页查询时设置的每页行数,默认为20

--ResourceGroupId

String

否

资源组ID。如何查看资源组ID,请参见https://help.aliyun.com/document_detail/151181.html

--SortBy

String

否

分页查询时的排序字段,默认使用GmtCreateTime。取值如下。
GmtCreateTime(默认值):按创建时间。
GmtModifiedTime:按修改时间

--Status

String

否

工作空间状态,目前支持如下值:
ENABLED:正常。
INITIALIZING:初始化中。
FAILURE:失败。
DISABLED:手动禁用。
FROZEN:欠费冻结。
UPDATING:项目更新中





--UserId

String

否

用户ID

--Verbose

Boolean

否

是否显示工作空间详细信息。取值如下:
false(默认值):不显示。
true:显示

--WorkspaceIds

String

否

工作空间ID列表。多个工作空间ID用半角逗号(,)分隔

--WorkspaceName

String

否

工作空间名称

示例

aliyun aiworkspace GET /api/v1/workspaces --region cn-hangzhou --Order ASC --Status ENABLED --WorkspaceIds '123,234' --PageSize 20 --Verbose true --ResourceGroupId 'rg-acfmwp7rky****' --SortBy GmtCreateTime --Fields Id --PageNumber 1 --UserId '17*****1743' --WorkspaceName abc --ModuleList PAI --Option GetWorkspaces --header "Content-Type=application/json"

LogRunMetrics

命令描述

批量记录Run的指标

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/runs/{RunId}/metrics/action/log

语法

aliyun aiworkspace LogRunMetrics
    --RunId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--RunId

String

是

运行ID

--body

String

否

请求结构体

示例

aliyun aiworkspace POST /api/v1/runs/run-1qJhzJ2YXgX0000/metrics/action/log --region cn-hangzhou --header "Content-Type=application/json"

PublishCodeSource

命令描述

发布私有的代码配置到工作空间公开可见

HTTP 方法:PUT

protocol:HTTPS

url:/api/v1/codesources/{CodeSourceId}/publish

语法

aliyun aiworkspace PublishCodeSource
    --CodeSourceId <string>
    [options]

参数

参数

类型

必填

说明

--CodeSourceId

String

是

待发布的代码源配置ID。如何获取代码配置ID,请参见https://help.aliyun.com/document_detail/459922.html

示例

aliyun aiworkspace PUT /api/v1/codesources/code-a7970000000/publish --region cn-hangzhou --header "Content-Type=application/json"

PublishDataset

命令描述

将私有数据集在工作空间内公开

HTTP 方法:PUT

protocol:HTTPS

url:/api/v1/datasets/{DatasetId}/publish

语法

aliyun aiworkspace PublishDataset
    --DatasetId <string>
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg5w0000c9ks92/publish --region cn-hangzhou --header "Content-Type=application/json"

PublishImage

命令描述

发布镜像,把镜像的可见性从PRIVATE变为PUBLIC

HTTP 方法:PUT

protocol:HTTPS

url:/api/v1/images/{ImageId}/publish

语法

aliyun aiworkspace PublishImage
    --ImageId <string>
    [options]

参数

参数

类型

必填

说明

--ImageId

String

是

镜像ID。如何获取镜像ID,请参见https://help.aliyun.com/document_detail/449118.html

示例

aliyun aiworkspace PUT /api/v1/images/image-dk000000fa/publish --region cn-hangzhou --header "Content-Type=application/json"

RemoveImage

命令描述

删除镜像

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/images/{ImageId}

语法

aliyun aiworkspace RemoveImage
    --ImageId <string>
    [options]

参数

参数

类型

必填

说明

--ImageId

String

是

镜像ID。如何获取镜像ID,请参见https://help.aliyun.com/document_detail/449118.html

示例

aliyun aiworkspace DELETE /api/v1/images/image-rbv000000c9ks92 --region cn-hangzhou --header "Content-Type=application/json"

RemoveImageLabels

命令描述

移除镜像标签

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/images/{ImageId}/labels/{LabelKey}

语法

aliyun aiworkspace RemoveImageLabels
    --ImageId <string>
    --LabelKey <string>
    [options]

参数

参数

类型

必填

说明

--ImageId

String

是

镜像ID。如何获取镜像ID,请参见https://help.aliyun.com/document_detail/449118.html

--LabelKey

String

是

label 的 key

示例

aliyun aiworkspace DELETE /api/v1/images/image-d8df000000dsjfd/labels/key1 --region cn-hangzhou --header "Content-Type=application/json"

RemoveMemberRole

命令描述

删除成员角色

HTTP 方法:DELETE

protocol:HTTPS

url:/api/v1/workspaces/{WorkspaceId}/members/{MemberId}/roles/{RoleName}

语法

aliyun aiworkspace RemoveMemberRole
    --MemberId <string>
    --RoleName <string>
    --WorkspaceId <string>
    [options]

参数

参数

类型

必填

说明

--MemberId

String

是

成员ID。如何获取成员ID,请参见https://help.aliyun.com/document_detail/449135.html

--RoleName

String

是

要删除的角色,支持官方角色与自定义角色:
官方角色:取值如下所示,各角色权限请参见https://help.aliyun.com/document_detail/2840449.html 。
PAI.AlgoDeveloper:算法开发。
PAI.AlgoOperator:算法运维。
PAI.LabelManager:标注管理员。
PAI.MaxComputeDeveloper:MaxCompute开发。
PAI.WorkspaceAdmin:管理员。
PAI.WorkspaceGuest:访客。
PAI.WorkspaceOwner:负责人。
自定义角色:填写角色 ID。格式为 role-开头,例如 role-sw******2tij








--WorkspaceId

String

是

工作空间ID。可通过 https://help.aliyun.com/document_detail/449124.html获取

示例

aliyun aiworkspace DELETE /api/v1/workspaces/145883/members/145883-2151392600000088039/roles/PAI.AlgoDeveloper --region cn-hangzhou --header "Content-Type=application/json"

SetExperimentLabels

命令描述

更新实验标签

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/experiments/{ExperimentId}/labels

语法

aliyun aiworkspace SetExperimentLabels
    --ExperimentId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ExperimentId

String

是

实验ID

--body

String

否

body参数

示例

aliyun aiworkspace POST /api/v1/experiments/exp-1zpfthdx000000/labels --region cn-hangzhou --header "Content-Type=application/json"

SetUserConfigs

命令描述

更新用户配置

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/userconfigs

语法

aliyun aiworkspace SetUserConfigs
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

配置

示例

aliyun aiworkspace PUT /api/v1/userconfigs --region cn-hangzhou --header "Content-Type=application/json" --body '{"Configs":[{"ConfigValue":"role","ConfigKey":"customizePAIAssumedRole","Scope":"owner","CategoryName":"DataPrivacyConfig"}]}'

StopDatasetJob

命令描述

停止数据集任务

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetjobs/{DatasetJobId}/action/stop

语法

aliyun aiworkspace StopDatasetJob
    --DatasetId <string>
    --DatasetJobId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集版本ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetJobId

String

是

数据集任务ID

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg500000jhc9ks92/datasetjobs/dsjob-9jx100000uj9e/action/stop --region cn-hangzhou --header "Content-Type=application/json"

UpdateCodeSource

命令描述

更新代码配置

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/codesources/{CodeSourceId}

语法

aliyun aiworkspace UpdateCodeSource
    --CodeSourceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--CodeSourceId

String

是

代码配置的ID。可以通过 CreateCodeSource、GetCodeSource 或者 ListCodeSources 这些接口获取

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/codesources/code-2020000000000 --region cn-hangzhou --header "Content-Type=application/json"

UpdateConfig

命令描述

更新或新增工作空间配置

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/config

语法

aliyun aiworkspace UpdateConfig
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID

--body

String

否

请求参数

示例

aliyun aiworkspace PUT /api/v1/workspaces/12340000002/config --region cn-hangzhou --header "Content-Type=application/json"

UpdateConfigs

命令描述

批量更新或新增工作空间配置

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/configs

语法

aliyun aiworkspace UpdateConfigs
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID

--body

String

否

请求

示例

aliyun aiworkspace PUT /api/v1/workspaces/83000/configs --region cn-hangzhou --header "Content-Type=application/json"

UpdateConnection

命令描述

更新连接配置

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/connections/{ConnectionId}

语法

aliyun aiworkspace UpdateConnection
    --ConnectionId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ConnectionId

String

是

连接ID。如何获取连接 ID,详情请参见 [ListConnections](~~ListConnections~~)

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/connections/conn-pai9m000mi47 --region cn-hangzhou --header "Content-Type=application/json"

UpdateDataset

命令描述

更新数据集,支持更新名称,描述等

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}

语法

aliyun aiworkspace UpdateDataset
    --DatasetId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--body

String

否

请求体

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg5wz0000c9ks92 --region cn-hangzhou --header "Content-Type=application/json"

UpdateDatasetFileMetas

命令描述

批量更新数据集下的文件元数据记录

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetfilemetas

语法

aliyun aiworkspace UpdateDatasetFileMetas
    --DatasetId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--body

String

否

请求Body

示例

aliyun aiworkspace PUT /api/v1/datasets/d-lfd60v0p0000ujtsdx/datasetfilemetas --region cn-hangzhou --header "Content-Type=application/json" --body '{"DatasetFileMetas":[{"DatasetFileMetaId":"07914c9534586e4e7aa6e9dbca5009082df******fd8a0d857b33296c59bf6\n"}]}'

UpdateDatasetJob

命令描述

更新数据集任务

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetjobs/{DatasetJobId}

语法

aliyun aiworkspace UpdateDatasetJob
    --DatasetId <string>
    --DatasetJobId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集版本ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--DatasetJobId

String

是

数据集任务ID

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg500000jhc9ks92/datasetjobs/dsjob-9jx100000uj9e --region cn-hangzhou --header "Content-Type=application/json"

UpdateDatasetJobConfig

命令描述

更新数据集任务配置

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/datasetjobconfigs/{DatasetJobConfigId}

语法

aliyun aiworkspace UpdateDatasetJobConfig
    --DatasetId <string>
    --DatasetJobConfigId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集Id

--DatasetJobConfigId

String

是

配置id

--body

String

否

请求Body

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg500000jhc9ks92/datasetjobconfigs/dscfg-xxxxxxxxxxxx --region cn-hangzhou --header "Content-Type=application/json"

UpdateDatasetVersion

命令描述

更新指定版本的数据集信息

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/datasets/{DatasetId}/versions/{VersionName}

语法

aliyun aiworkspace UpdateDatasetVersion
    --DatasetId <string>
    --VersionName <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--DatasetId

String

是

数据集ID。如何获取数据集ID,详情请参见https://help.aliyun.com/document_detail/457222.html

--VersionName

String

是

数据集版本名称

--body

String

否

请求体

示例

aliyun aiworkspace PUT /api/v1/datasets/d-rbvg50000jhc9ks92/versions/v1 --region cn-hangzhou --header "Content-Type=application/json"

UpdateDefaultWorkspace

命令描述

将某个工作空间指定为默认工作空间

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/defaultWorkspaces

语法

aliyun aiworkspace UpdateDefaultWorkspace
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/defaultWorkspaces --region cn-hangzhou --header "Content-Type=application/json" --body '{"WorkspaceId":"12345"}'

UpdateExperiment

命令描述

更新实验

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/experiments/{ExperimentId}

语法

aliyun aiworkspace UpdateExperiment
    --ExperimentId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ExperimentId

String

是

实验ID

--body

String

否

body参数

示例

aliyun aiworkspace PUT /api/v1/experiments/exp-1zpfthdx000000 --region cn-hangzhou --header "Content-Type=application/json"

UpdateModel

命令描述

更新模型的基本配置信息

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/models/{ModelId}

语法

aliyun aiworkspace UpdateModel
    --ModelId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--body

String

否

请求体

示例

aliyun aiworkspace PUT /api/v1/models/model-rbvg5wz000000ks92 --region cn-hangzhou --header "Content-Type=application/json"

UpdateModelVersion

命令描述

更新模型版本

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/models/{ModelId}/versions/{VersionName}

语法

aliyun aiworkspace UpdateModelVersion
    --ModelId <string>
    --VersionName <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--ModelId

String

是

模型ID。如何获取模型ID,请参见https://help.aliyun.com/document_detail/461944.html

--VersionName

String

是

模型版本

--body

String

否

请求体

示例

aliyun aiworkspace PUT /api/v1/models/model-dfs100005c/versions/0.1.0 --region cn-hangzhou --header "Content-Type=application/json"

UpdatePrompt

命令描述

更新数据集提示词

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/prompts/{PromptId}

语法

aliyun aiworkspace UpdatePrompt
    --PromptId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--PromptId

String

是

Prompt的唯一标识

--body

String

否

请求体

示例

aliyun aiworkspace PUT /api/v1/prompts/pmt-axbxtc0000xxx --region cn-hangzhou --header "Content-Type=application/json" --body '{"WorkspaceId":"302914"}'

UpdateRun

命令描述

更新运行信息

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/runs/{RunId}

语法

aliyun aiworkspace UpdateRun
    --RunId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--RunId

String

是

运行ID

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/runs/run-1qJhzJ2YXgX0000 --region cn-hangzhou --header "Content-Type=application/json"

UpdateWorkspace

命令描述

更新工作空间名称和描述信息

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}

语法

aliyun aiworkspace UpdateWorkspace
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见https://help.aliyun.com/document_detail/449124.html

--body

String

否

请求结构

示例

aliyun aiworkspace PUT /api/v1/workspaces/123 --region cn-hangzhou --header "Content-Type=application/json"

UpdateWorkspaceResource

命令描述

更新工作空间的资源

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/resources

语法

aliyun aiworkspace UpdateWorkspaceResource
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--WorkspaceId

String

是

工作空间ID。如何获取工作空间ID,请参见 https://help.aliyun.com/document_detail/449124.html

--body

String

否

请求参数

示例

aliyun aiworkspace PUT /api/v1/workspaces/123/resources --region cn-hangzhou --header "Content-Type=application/json"

UpdateWorkspaceRole

命令描述

更新工作空间角色

contentType:application/json

HTTP 方法:PUT

protocol:HTTPS

requestBodyType:json

url:/api/v1/workspaces/{WorkspaceId}/roles/{RoleId}

语法

aliyun aiworkspace UpdateWorkspaceRole
    --RoleId <string>
    --WorkspaceId <string>
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--RoleId

String

是

角色ID

--WorkspaceId

String

是

工作空间ID。可通过 https://help.aliyun.com/document_detail/449124.html获取

--body

String

否

请求结构体

示例

aliyun aiworkspace PUT /api/v1/workspaces/83000/roles/role-dhg0000000 --region cn-hangzhou --header "Content-Type=application/json"

ValidateConnection

命令描述

验证连接

contentType:application/json

HTTP 方法:POST

protocol:HTTPS

requestBodyType:json

url:/api/v1/connections/validate

语法

aliyun aiworkspace ValidateConnection
    [--body <string>]
    [options]

参数

参数

类型

必填

说明

--body

String

否

请求体

示例

aliyun aiworkspace POST /api/v1/connections/validate --region cn-hangzhou --header "Content-Type=application/json" --body '{"WorkspaceId":"1234"}'

全局选项

以下为 CLI 通用选项,各选项的适用范围以说明为准。

选项

说明

--cli-dry-run

使用 --cli-dry-run 在执行校验后以人类可读格式输出请求详情,跳过实际运行

--cli-input-json

使用 --cli-input-json foo.json 从 JSON 对象读取产品 API 参数,命令行显式参数覆盖文件值

--cli-output

设置宿主 CLI Help、本地错误和更新检查的输出格式(json)

--cli-query

使用 --cli-query <jmespath> 通过 JMESPath 表达式过滤输出结果

--cli-sign-version

短横线命令的 OpenAPI 签名版本:当前仅支持 v4;设为空值可清空并恢复默认签名(aliyun configure set 可写入 Profile)

--language

使用 --language [en|zh] 来指定语言

--output -o

使用 --output cols=Field1,Field1 [rows=jmesPath] 使用表格方式打印输出

--profile -p

使用 --profile <profileName> 指定操作的配置集

--region

使用 --region <regionId> 来指定访问大区

--version --api-version

使用 --version <YYYY-MM-DD> 来指定访问的API版本

--yes -y

跳过安全策略的确认提示(用于非交互式/Agent 场景)