/** * PauseSandboxInstance返回参数结构体 */ export interface PauseSandboxInstanceResponse { /** *
目标沙箱实例当前的状态
枚举值:
沙箱实例ID
*/ InstanceId: string; /** *可选。带内存暂停,恢复后保留进程和内存状态。true=带内存;false=仅磁盘;不传=系统默认(当前默认 true,带内存)。
*/ Memory?: boolean; } /** * 沙箱工具中实例存储挂载配置 */ export interface StorageMount { /** *存储挂载配置名称
*/ Name?: string; /** *存储配置
注意:此字段可能返回 null,表示取不到有效值。 */ StorageSource?: StorageSource; /** *沙箱实例本地挂载路径
*/ MountPath?: string; /** *存储挂载读写权限配置,默认为false
*/ ReadOnly?: boolean; } /** * 沙箱实例对象存储挂载配置 */ export interface CosStorageSource { /** * 对象存储访问域名 */ Endpoint?: string; /** * 对象存储桶名称 */ BucketName?: string; /** * 对象存储桶路径,必须为以/起始的绝对路径 */ BucketPath?: string; } /** * StartSandboxInstance请求参数结构体 */ export interface StartSandboxInstanceRequest { /** *沙箱工具 ID,与 ToolName 至少有一个要填
*/ ToolId?: string; /** *沙箱工具名称,与 ToolId 至少有一个要填
*/ ToolName?: string; /** *超时时间,超过这个时间就自动回收实例。支持格式:5m、300s、1h 等,默认 5m。最小 30s,最大 24h
*/ Timeout?: string; /** *幂等性 Token,长度不超过 64 字符
*/ ClientToken?: string; /** *沙箱实例存储挂载配置
*/ MountOptions?: Array沙箱实例自定义配置
*/ CustomConfiguration?: CustomConfiguration; /** *沙箱访问认证模式
枚举值:
默认值:DEFAULT
*/ AuthMode?: string; /** *沙箱元数据
*/ Metadata?: Array唯一的 Deployment 名称,必须符合 DNS-1123 命名规范,创建后不可修改。
*/ DeploymentName: string; /** *用于关联 Sandbox Tool 的标识,格式为 sdt- 加 8 位小写 base36 字符。
*/ ToolId?: string; /** *伸缩配置;省略的成员由服务端补全默认值。
*/ ScalingConfiguration?: ScalingConfiguration; /** *空闲生命周期配置;省略的成员由服务端补全默认值。
*/ LifecycleConfiguration?: LifecycleConfiguration; /** *Affinity 配置;省略或空 Mode 表示不启用。
*/ AffinityConfiguration?: AffinityConfiguration; /** *标签
*/ Tags?: ArrayAffinity 模式。
枚举值:
缺失或空字符串表示关闭 Affinity。
*/ Mode?: string; /** *请求和响应使用的 Affinity Header 名称。必须符合 HTTP field-name token 语法,长度为 1..128 个 ASCII 字节,且不能使用平台保留 Header。
*/ HeaderName?: string; } /** * StopSandboxInstance请求参数结构体 */ export interface StopSandboxInstanceRequest { /** * 沙箱实例ID */ InstanceId: string; } /** * metadata 项 */ export interface MetadataVar { /** *元数据名
*/ Name?: string; /** *元数据值
*/ Value?: string; } /** * DescribeSandboxToolList返回参数结构体 */ export interface DescribeSandboxToolListResponse { /** * 沙箱工具列表 */ SandboxToolSet?: Arraywaa沙箱工具配置
*/ WAAConfiguration?: WAAConfiguration; } /** * CreateAPIKey返回参数结构体 */ export interface CreateAPIKeyResponse { /** * 用户传入的API密钥名称,方便用户记忆 */ Name?: string; /** * 生成的API密钥,仅返回此一次,后续无法获取 */ APIKey?: string; /** * API密钥ID */ KeyId?: string; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * AcquireDeploymentToken请求参数结构体 */ export interface AcquireDeploymentTokenRequest { /** *目标 ACTIVE Deployment 的稳定 ID。
*/ DeploymentId: string; } /** * DescribeSandboxToolList请求参数结构体 */ export interface DescribeSandboxToolListRequest { /** * 沙箱工具ID列表,指定要查询的工具。如果为空则查询所有工具。最大支持100个ID */ ToolIds?: Array只用于目标 Deployment 数据面入口的短期 bearer Token,格式为 dpt_ 加非空、无 padding 的 Base64URL opaque 后缀。
*/ Token?: string; /** *Token 的绝对过期时间,UTC、秒精度 RFC3339 格式。
*/ ExpiresAt?: string; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * DescribeDeploymentList返回参数结构体 */ export interface DescribeDeploymentListResponse { /** *当前页完整 Deployment;无匹配时为空数组。
*/ DeploymentSet?: Array应用 Filters 后、分页前的结果总数。
*/ TotalCount?: number; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * CreateSandboxTool请求参数结构体 */ export interface CreateSandboxToolRequest { /** *沙箱工具名称,长度 1-50 字符,支持英文、数字、下划线和连接线。同一 AppId 下沙箱工具名称必须唯一
*/ ToolName: string; /** *沙箱工具类型,目前支持:browser、code-interpreter、custom等
枚举值:
网络配置
*/ NetworkConfiguration: NetworkConfiguration; /** *沙箱工具描述,最大长度 200 字符
*/ Description?: string; /** *默认超时时间,支持格式:5m、300s、1h 等,不指定则使用系统默认值(5 分钟)。最大 24 小时
*/ DefaultTimeout?: string; /** *标签规格,为沙箱工具绑定标签,支持多种资源类型的标签绑定
*/ Tags?: Array幂等性 Token,长度不超过 64 字符
*/ ClientToken?: string; /** *角色ARN
*/ RoleArn?: string; /** *沙箱工具存储配置
*/ StorageMounts?: Array沙箱工具自定义配置
*/ CustomConfiguration?: CustomConfiguration; /** *桌面电脑环境类沙箱配置
*/ ComputerConfiguration?: ComputerConfiguration; /** *沙箱工具日志推送相关配置
*/ LogConfiguration?: LogConfiguration; /** *常驻沙箱标识
*/ Persistent?: boolean; } /** * HTTP GET 探测动作配置 */ export interface HttpGetAction { /** * 路径 */ Path?: string; /** * 端口 */ Port?: number; /** * 协议 */ Scheme?: string; } /** * DescribePreCacheImageTask返回参数结构体 */ export interface DescribePreCacheImageTaskResponse { /** *镜像地址
*/ Image?: string; /** *镜像 Digest
*/ ImageDigest?: string; /** *镜像仓库类型:enterprise、personal。
镜像预热状态
*/ Status?: string; /** *镜像预热状态描述
*/ Message?: string; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * ResumeSandboxInstance请求参数结构体 */ export interface ResumeSandboxInstanceRequest { /** *沙箱实例ID
*/ InstanceId: string; /** *超时时间,超过这个时间就自动回收实例。支持格式:5m、300s、1h 等,默认 5m。最小 30s,最大 24h
*/ Timeout?: string; } /** * DeleteAPIKey返回参数结构体 */ export interface DeleteAPIKeyResponse { /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * API密钥简略信息 */ export interface APIKeyInfo { /** * API密钥名称 */ Name?: string; /** * API密钥ID */ KeyId?: string; /** * 密钥状态。可以为API_KEY_STATUS_ACTIVE,或API_KEY_STATUS_INACTIVE */ Status?: string; /** * 隐藏部分字符的API密钥,方便用户辨认 */ MaskedKey?: string; /** * API密钥创建时间 */ CreatedAt?: string; } /** * UpdateSandboxInstance返回参数结构体 */ export interface UpdateSandboxInstanceResponse { /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * Deployment 稳定访问入口定义 */ export interface Deployment { /** *Deployment 稳定 ID,格式为 dpl- 加 8 位小写 base36 字符。
*/ DeploymentId?: string; /** *唯一且创建后不可修改的名称,必须符合 DNS-1123 命名规范。
*/ DeploymentName?: string; /** *用于关联 Sandbox Tool 的标识,格式为 sdt- 加 8 位小写 base36 字符。
*/ ToolId?: string; /** *完整的活跃容量配置。
*/ ScalingConfiguration?: ScalingConfiguration; /** *完整的空闲生命周期配置。
*/ LifecycleConfiguration?: LifecycleConfiguration; /** *可选 Affinity 配置;未启用时省略。
*/ AffinityConfiguration?: AffinityConfiguration; /** *Deployment 控制面状态。
枚举值:
DELETE_FAILED 状态下 1..1024 个 UTF-8 字节的安全失败摘要,格式为 {Code}[.{SubCode}]: {Message};其他状态省略。
*/ StatusReason?: string; /** *创建时间,UTC、秒精度 RFC3339 格式。
*/ CreatedTime?: string; /** *最近一次成功公共配置写入或 Deployment 状态迁移时间,UTC、秒精度 RFC3339 格式。
*/ UpdatedTime?: string; /** *标签
*/ Tags?: Arraycpu 资源量
*/ CPU?: string; /** *内存资源量
*/ Memory?: string; /** *自定义磁盘大小
枚举值:
创建的沙箱工具 ID
*/ ToolId?: string; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * DescribeDeployment返回参数结构体 */ export interface DescribeDeploymentResponse { /** *完整 Deployment。
*/ Deployment?: Deployment; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * CreateAPIKey请求参数结构体 */ export interface CreateAPIKeyRequest { /** * API密钥名称,方便用户记忆 */ Name?: string; } /** * DescribeAPIKeyList请求参数结构体 */ export type DescribeAPIKeyListRequest = null; /** * 沙箱实例结构体 */ export interface SandboxInstance { /** *沙箱实例唯一标识符
*/ InstanceId: string; /** *所属沙箱工具 ID
*/ ToolId: string; /** *所属沙箱工具名称
*/ ToolName: string; /** *实例状态:STARTING(启动中)、RUNNING(运行中)、STOPPING(停止中)、STOPPED(已停止)、STOP_FAILED(停止失败)、FAILED(失败状态)
*/ Status: string; /** *是否常驻实例
*/ Persistent?: boolean; /** *超时时间(秒),null 表示无超时设置
*/ TimeoutSeconds?: number; /** *过期时间(ISO 8601 格式),null 表示无过期时间
*/ ExpiresAt?: string; /** *停止原因:manual(手动)、timeout(超时)、error(错误)、system(系统),仅在状态为 STOPPED、STOP_FAILED 或 FAILED 时有值。当 provider 停止失败时,状态为 STOP_FAILED,原因为 error
*/ StopReason?: string; /** *创建时间(ISO 8601 格式)
*/ CreateTime?: string; /** *更新时间(ISO 8601 格式)
*/ UpdateTime?: string; /** *存储挂载选项
*/ MountOptions?: Array沙箱实例自定义配置
*/ CustomConfiguration?: CustomConfigurationDetail; /** *桌面电脑环境类沙箱配置
*/ ComputerConfiguration?: ComputerConfiguration; /** *网络模式
枚举值:
可以覆盖工具级别的网络配置。但如果一个工具本身就不支持 VPC 网络,那么即便在实例设置里选了 VPC 模式,也是无效的
*/ NetworkMode?: string; /** *沙箱实例元数据
*/ Metadata?: Array沙箱访问认证模式
枚举值:
默认值:DEFAULT
*/ AuthMode?: string; } /** * DeleteSandboxTool返回参数结构体 */ export interface DeleteSandboxToolResponse { /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * 端口配置 */ export interface PortConfiguration { /** * 端口名 */ Name?: string; /** * 端口 */ Port?: number; /** * 协议 */ Protocol?: string; } /** * 沙箱自定义 dns 配置 */ export interface DNSConfig { /** *DNS 服务器地址
参数格式:需要有效 IP 地址
默认值:10.0.0.1
*/ Servers: Array搜索域(对应 resolv.conf 的 search 指令)
*/ Searches?: Array配置项(对应 resolv.conf 选项)
*/ Options?: Array活跃 Sandbox Instance 下限,必须大于等于 0。
*/ MinInstanceCount?: number; /** *活跃 Sandbox Instance 上限,必须大于等于 1,并且不小于 MinInstanceCount。
*/ MaxInstanceCount?: number; /** *每个活跃 Sandbox Instance 同时持有的 Deployment 请求或连接 Lease 上限,必须大于等于 1。
*/ MaxInstanceRequestConcurrency?: number; } /** * 沙箱工具结构体 */ export interface SandboxTool { /** *沙箱工具唯一标识符
*/ ToolId: string; /** *沙箱工具名称,长度 1-50 字符,支持中英文、数字、下划线。同一 AppId 下沙箱工具名称必须唯一
*/ ToolName?: string; /** *沙箱工具类型,取值:browser(浏览器工具)、code-interpreter(代码解释器工具)、computer(计算机控制工具)、mobile(移动设备工具)
*/ ToolType?: string; /** *沙箱工具状态,取值:CREATING(创建中)、ACTIVE(可用)、DELETING(删除中)、FAILED(失败)
*/ Status?: string; /** *沙箱工具描述信息,最大长度 200 字符
*/ Description?: string; /** *是否常驻沙箱
*/ Persistent?: boolean; /** *默认超时时间,支持格式:5m、300s、1h 等,不指定则使用系统默认值(5 分钟)。最大 24 小时
*/ DefaultTimeoutSeconds?: number; /** *网络配置
*/ NetworkConfiguration?: NetworkConfiguration; /** *标签规格,包含资源标签绑定关系。用于为沙箱工具绑定标签,支持多种资源类型的标签绑定
*/ Tags?: Array沙箱工具创建时间,格式:ISO8601
*/ CreateTime?: string; /** *沙箱工具更新时间,格式:ISO8601
*/ UpdateTime?: string; /** *沙箱工具绑定角色ARN
*/ RoleArn?: string; /** *沙箱工具中实例存储挂载配置
*/ StorageMounts?: Array沙箱工具自定义配置
*/ CustomConfiguration?: CustomConfigurationDetail; /** *沙箱工具日志推送相关配置
*/ LogConfiguration?: LogConfiguration; /** *桌面电脑环境类沙箱配置
*/ ComputerConfiguration?: ComputerConfiguration; /** *用于说明沙箱工具处于该状态的原因
*/ StatusReason?: string; } /** * DescribePreCacheImageTask请求参数结构体 */ export interface DescribePreCacheImageTaskRequest { /** *镜像地址
*/ Image: string; /** *镜像 Digest
*/ ImageDigest: string; /** *镜像仓库类型:enterprise、personal、custom 。
枚举值:
创建的沙箱实例完整信息
*/ Instance?: SandboxInstance; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * 沙箱自定义配置 */ export interface CustomConfiguration { /** *镜像地址
*/ Image?: string; /** *镜像仓库类型:enterprise、personal、custom
枚举值:
启动命令
*/ Command?: Array启动参数
*/ Args?: Array环境变量
*/ Env?: Array端口配置
*/ Ports?: Array资源配置
*/ Resources?: ResourceConfiguration; /** *探针配置
*/ Probe?: ProbeConfiguration; /** *沙箱 DNS 配置
*/ DNSConfig?: DNSConfig; } /** * 镜像卷挂载源配置 */ export interface ImageStorageSource { /** *镜像地址
*/ Reference?: string; /** *镜像仓库类型:enterprise、personal。
镜像内部的路径
*/ SubPath?: string; /** *镜像 Digest,请求时无需传入
*/ Digest?: string; } /** * AcquireSandboxInstanceToken请求参数结构体 */ export interface AcquireSandboxInstanceTokenRequest { /** *沙箱实例ID,生成的访问Token将仅可用于访问此沙箱实例
*/ InstanceId: string; } /** * waa自定义配置项 */ export interface WAAConfiguration { /** *自定义waa镜像ID
*/ ImageId?: string; } /** * 日志源配置 */ export interface LogSources { /** *需要采集的日志文件路径,必须是 /logs/ 目录下的文件,不支持子目录,最大支持 10 个文件。
注意:此字段可能返回 null,表示取不到有效值。 */ Files?: Array对象存储桶配置
*/ Cos?: CosStorageSource; /** *镜像卷配置
*/ Image?: ImageStorageSource; /** *文件存储配置
*/ Cfs?: CfsStorageSource; /** *AgentBucket 存储配置
*/ AgentBucket?: AgentBucketStorageSource; } /** * DescribeAPIKeyList返回参数结构体 */ export interface DescribeAPIKeyListResponse { /** * API密钥简略信息列表。 */ APIKeySet?: Array镜像地址
*/ Image?: string; /** *镜像 Digest
*/ ImageDigest?: string; /** *镜像仓库类型:enterprise、personal。
待查询的 Deployment ID。
*/ DeploymentId: string; } /** * DescribeSandboxInstanceList请求参数结构体 */ export interface DescribeSandboxInstanceListRequest { /** * 沙箱实例ID列表,指定要查询的实例。如果为空则查询所有实例。最大支持100个ID */ InstanceIds?: Array镜像地址
*/ Image?: string; /** *镜像仓库类型:enterprise、personal、custom。
枚举值:
镜像 Digest
*/ ImageDigest?: string; /** *启动命令
*/ Command?: Array启动参数
*/ Args?: Array环境变量
*/ Env?: Array端口配置
*/ Ports?: Array资源配置
*/ Resources?: ResourceConfiguration; /** *探针配置
*/ Probe?: ProbeConfiguration; /** *沙箱 DNS 配置
*/ DNSConfig?: DNSConfig; } /** * CreateDeployment返回参数结构体 */ export interface CreateDeploymentResponse { /** *已创建并完成默认值物化的 Deployment。
*/ Deployment?: Deployment; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * ModifyDeployment请求参数结构体 */ export interface ModifyDeploymentRequest { /** *待修改的 Deployment ID。
*/ DeploymentId: string; /** *完整替换伸缩配置;提供时必须包含全部三个成员。
*/ ScalingConfiguration?: ScalingConfiguration; /** *完整替换生命周期配置;提供时必须包含全部两个成员。
*/ LifecycleConfiguration?: LifecycleConfiguration; /** *标签
*/ Tags?: ArrayVPC子网ID列表
*/ SubnetIds?: Array安全组ID列表
*/ SecurityGroupIds?: Array用于传入 AgentBucket 的 LibraryID
*/ LibraryId?: string; /** *用于传入 AgentBucket 的 spaceId
*/ SpaceId?: string; /** *用于传入 AgentBucket 的 AccessDomain
*/ AccessDomain?: string; } /** * DeleteAPIKey请求参数结构体 */ export interface DeleteAPIKeyRequest { /** * 需要删除的API密钥ID */ KeyId: string; } /** * AcquireSandboxInstanceToken返回参数结构体 */ export interface AcquireSandboxInstanceTokenResponse { /** *访问Token
*/ Token?: string; /** *过期时间
*/ ExpiresAt?: string; /** *非管控面(envd)的访问Token
*/ TrafficToken?: string; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * 健康检查探针配置 */ export interface ProbeConfiguration { /** * HTTP GET 探测配置 */ HttpGet?: HttpGetAction; /** * 健康检查就绪超时 */ ReadyTimeoutMs?: number; /** * 健康检查单次探测超时 */ ProbeTimeoutMs?: number; /** * 健康检查间隔 */ ProbePeriodMs?: number; /** * 健康检查成功阈值 */ SuccessThreshold?: number; /** * 健康检查失败阈值 */ FailureThreshold?: number; } /** * ModifyDeployment返回参数结构体 */ export interface ModifyDeploymentResponse { /** *修改后的完整 Deployment。
*/ Deployment?: Deployment; /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * CreatePreCacheImageTask请求参数结构体 */ export interface CreatePreCacheImageTaskRequest { /** *镜像地址
*/ Image: string; /** *镜像仓库类型:enterprise、personal、custom
枚举值:
日志推送CLS的配置。
*/ CLSConfig?: CLSConfig; /** *日志源配置
*/ LogSources?: LogSources; } /** * DeleteDeployment请求参数结构体 */ export interface DeleteDeploymentRequest { /** *待删除的 Deployment ID。
*/ DeploymentId: string; } /** * 标签 */ export interface Tag { /** * 标签键 */ Key?: string; /** * 标签值 */ Value?: string; } /** * UpdateSandboxTool请求参数结构体 */ export interface UpdateSandboxToolRequest { /** *沙箱工具ID
*/ ToolId: string; /** *沙箱工具描述,最大长度200字符
*/ Description?: string; /** *网络配置
*/ NetworkConfiguration?: NetworkConfiguration; /** *标签
*/ Tags?: Array沙箱工具自定义配置
*/ CustomConfiguration?: CustomConfiguration; /** *桌面电脑环境类沙箱配置
*/ ComputerConfiguration?: ComputerConfiguration; } /** * ResumeSandboxInstance返回参数结构体 */ export interface ResumeSandboxInstanceResponse { /** * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 */ RequestId?: string; } /** * Deployment 管理的 Sandbox Instance 的空闲生命周期配置 */ export interface LifecycleConfiguration { /** *Sandbox Instance 没有活跃 Deployment 请求或连接后进入 IdleAction 的秒数,必须大于等于 30。
*/ IdleTimeoutSeconds?: number; /** *空闲处理动作。
枚举值:
分页偏移量,默认 0,必须大于等于 0。
*/ Offset?: number; /** *分页返回数量,默认 20,范围 1..200。
*/ Limit?: number; /** *查询过滤条件。
Filter.Name 枚举值:
所有匹配均区分大小写。不同 Filter 之间为 AND,同一 Filter 的 Values 之间为 OR。
*/ Filters?: Array沙箱实例ID
*/ InstanceId: string; /** *新的超时时间(从设置时开始重新计算超时),支持格式:5m、300s、1h等。最小30s,最大24h。如果不指定则保持原有超时设置
*/ Timeout?: string; /** *沙箱实例元数据
*/ Metadata?: Array