文档

Function

更新时间:
名称类型描述示例值
object

函数配置信息。

codeChecksumstring

函数代码包的 CRC-64 值。

2825179536350****
codeSizelong

系统返回的函数代码包的大小,单位 Byte。

412
cpufloat

函数的 CPU 规格,单位为 vCPU,为 0.05 vCPU 的倍数。最小值为 0.05,最大值为 16。同时 cpu 和 memorySize(按 GB 算)比例要在 1:1 和 1:4 之间。

1
createdTimestring

函数的创建时间。

2023-04-01T08:15:27Z
customContainerConfigCustomContainerConfig

自定义容器运行时的相关配置,成功配置后函数可以使用自定义容器镜像执行函数。code 和 customContainerConfig 二选一。

customDNSCustomDNS

自定义 DNS 配置。

customRuntimeConfigCustomRuntimeConfig

自定义运行时配置。

descriptionstring

函数的描述。

my function
diskSizeinteger

函数的磁盘规格,单位为 MB,可选值为 512 MB 或 10240 MB。

512
environmentVariablesobject

函数的环境变量,可以在运行环境中访问设置的环境变量。

string

环境变量的值。

value1
functionArnstring

函数资源标识。

acs:fc:cn-shanghai:123:functions/functionName
functionIdstring

系统为每个函数生成的 ID,全局唯一。

aa715851-1c20-4b89-a8fb-***
functionNamestring

函数的名称。

my-function-1
gpuConfigGPUConfig

函数 GPU 配置。

handlerstring

函数执行的入口,具体格式和运行时相关。

index.handler
instanceConcurrencyinteger

实例最大并发度

1
instanceLifecycleConfigInstanceLifecycleConfig

实例生命周期回调方法配置。

internetAccessboolean

是否允许函数访问公网。默认值为 true。

true
lastModifiedTimestring

函数上一次被更新的时间。

2023-05-01T08:15:27Z
lastUpdateStatusstring

最近一次函数更新操作的状态,当函数新建成功时,此值为 Successful,可选值:Successful、 Failed、 InProgress。

InProgress
lastUpdateStatusReasonstring

导致最近一次函数更新操作状态为当前值的原因。

The system is currently processing the acceleration optimization for the image.
lastUpdateStatusReasonCodestring

导致最近一次函数更新操作状态为当前值的原因的状态码。

ImageOptimizing
layersarray

层的列表。

FunctionLayer

层信息。

logConfigLogConfig

日志配置。函数产生的日志会被写入到配置的日志库中。

memorySizeinteger

函数的内存规格,单位为 MB,内存大小为 64 MB 的倍数。最小值为 128MB,最大值为 32GB。同时 cpu 和 memorySize(按 GB 算)比例要在 1:1 和 1:4 之间。

512
nasConfigNASConfig

NAS 配置。配置此参数后,函数可以访问指定的 NAS 资源。

ossMountConfigOSSMountConfig

OSS 挂载配置。

rolestring

用户授权给函数计算的 RAM 角色,设置后函数计算将扮演该角色生成临时访问凭证。在函数中可以使用该角色的临时访问凭证来访问指定的阿里云服务,例如 OSS 和 OTS。

acs:ram::188077086902****:role/fc-test
runtimestring

函数的运行时环境。目前支持的运行环境有:nodejs8, nodejs10, nodejs12, nodejs14, nodejs16, nodejs18, nodejs20, go1, python3, python3.9, python3.10, java8, java11, php7.2, dotnetcore3.1, custom, custom.debian10, custom-container。

python3.10
statestring

function state

Pending
stateReasonstring

函数处于当前状态的原因。

Function creating
stateReasonCodestring

函数处于当前状态的原因的状态码。

Creating
timeoutinteger

函数运行的超时时间,单位为秒,最小 1 秒,最大值为 86400 秒,默认值是 3 秒。函数超过这个时间后会被终止执行。

60
tracingConfigTracingConfig

链路追踪配置。当函数计算与链路追踪集成后,您可以记录请求在函数计算的耗时时间、查看函数的冷启动时间、记录函数内部时间的消耗等。

vpcConfigVPCConfig

VPC 配置。配置此参数后,函数可以访问指定的 VPC 资源。