CreateTemplateInput

更新时间:
复制 MD 格式

名称

类型

描述

示例值

object

创建模板所需的输入参数

templateName

string

模板名称(要求账号唯一的)

browser-1766687911567

templateType

string

模板类型

Browser

description

string

模板描述

模板描述

cpu

number

CPU 资源配置(单位:核心)

2

memory

integer

内存资源配置(单位:MB)

2048

diskSize

integer

磁盘大小

10240

containerConfiguration ContainerConfiguration

容器配置,只允许基于 Browser/Code Interpreter 基础镜像的 image

networkConfiguration NetworkConfiguration

网络配置

credentialConfiguration CredentialConfiguration

凭证配置

logConfiguration LogConfiguration

日志配置

executionRoleArn

string

执行角色 ARN

acs:ram::123456789:role/aliyunfcdefaultrole

sandboxIdleTimeoutInSeconds

integer

沙箱空闲超时时间(秒)

1800

sandboxTTLInSeconds

integer

沙箱存活时间(秒)

26000

armsConfiguration ArmsConfiguration

ARMS 配置

allowAnonymousManage

boolean

是否允许数据链路调用创建/停止/删除沙箱接口

true

nasConfig NASConfig

NAS 挂载配置项目

enableAgent

boolean

Sandbox Agent 开关

workspaceId

string

关联的空间 ID

1e546db8-xxxx-xxxx-9be1-5a1351cdac95

scalingConfig ScalingConfig

弹性配置

enablePreStop

boolean

是否开启实例销毁前回调

preStopTimeoutInSeconds

integer

实例销毁前回调超时时间(秒)

10

disablePublicNetworkAccess

boolean

是否禁止公网访问

true

ossConfiguration

array

OSS 配置

OssConfiguration

OSS 配置项

environmentVariables

object

环境变量

string

环境变量 map

{'FCTEST_IDE_ENV': 'IDE'}

templateConfiguration

object

模板配置(灵活的对象结构,根据 templateType 不同而不同)

any

模板配置(灵活的对象结构,根据 templateType 不同而不同)

{"example":"value"}