流控信息
请求语法
GET /2021-04-06/services/{serviceName}/functions/{functionName} HTTP/1.1
路径参数
字段名称 | 字段详情 |
---|---|
serviceNamestring | 服务的名称。 示例值:service_name参考取值来源: UpdateService CreateService ListServices |
functionNamestring | 函数的名称。 示例值:function_name参考取值来源: UpdateFunction CreateFunction ListFunctions PutFunctionAsyncInvokeConfig |
请求参数
字段名称 | 字段详情 |
---|---|
qualifierstring | 服务的版本 ID 或者别名。 示例值:demoQualifier |
X-Fc-Account-Idstring | 您的阿里云账号(主账号)ID。 示例值:188077086902**** |
X-Fc-Datestring | 函数的调用开始日期,格式为EEE,d MMM yyyy HH:mm:ss GMT。 示例值:Wed, 11 May 2022 09:00:00 GMT |
X-Fc-Trace-Idstring | 自定义请求 ID。 示例值:asdf**** |
返回参数
字段名称 | 字段详情 |
---|---|
codeChecksumstring | 函数代码包的 CRC-64 值。 示例值:2825179536350**** |
codeSizeinteger<int64> | 系统返回的函数代码包的大小,单位 Byte。 注意
请注意,该值为 Long 类型,在某些语言中可能存在精度丢失的风险,请小心使用。 示例值:421 |
createdTimestring | 函数的创建时间。 示例值:2020-04-01T08:15:27Z |
descriptionstring | 函数的描述。 示例值:test_description |
environmentVariablesmap<string> | 为函数设置的环境变量,可以在函数中获取环境变量的值。更多信息,请参见环境变量。 |
functionIdstring | 系统为每个函数生成的 ID,全局唯一。 示例值:aa715851-1c20-4b89-a8fb-*** |
functionNamestring | 函数的名称。 示例值:function_name |
handlerstring | 函数执行的入口,更多信息,请参见函数入口。 示例值:index.handler |
lastModifiedTimestring | 函数上一次被更新的时间。 示例值:2020-04-01T08:15:27Z |
memorySizeinteger<int32> | 函数的内存规格,单位为 MB,内存大小为 64 MB 的倍数。不同的函数实例类型,内存规格存在差异。更多信息,请参见实例规格。 示例值:256 |
runtimestring | 函数运行的语言环境。当前支持 nodejs20、nodejs18、nodejs16、nodejs14、nodejs12、nodejs10、nodejs8、nodejs6、nodejs4.4、python3.10、python3.9、python3、python2.7、java11、java8、go1、php7.2、dotnetcore2.1、custom.debian10、custom 和custom-container。 示例值:python3 |
timeoutinteger<int32> | 函数运行的超时时间,单位为秒,默认 60 秒。最小 1 秒,最长 10 分钟。如果函数运行超过设置的时间,函数运行将被终止。 示例值:60 |
initializationTimeoutinteger<int32> | 初始化函数运行的超时时间,单位为秒,默认 3 秒。最小 1 秒,最长 5 分钟。初始化函数超过这个时间后会被终止执行。 示例值:60 |
initializerstring | 初始化函数执行的入口,具体格式与语言相关,更多信息,请参见 Initializer 函数。 示例值:index.handler |
caPortinteger<int32> | Custom Runtime 或 Custom Container 运行时 HTTP Server 的监听端口。 示例值:9000 |
customContainerConfigCustomContainerConfigInfo | Custom Container 运行时的相关配置,配置后函数可以使用自定义容器镜像执行函数。 |
layersarray<string> | 层的列表(ARN V1 版本)。展开详情 |
instanceConcurrencyinteger<int32> | 单个函数实例的并发度。 示例值:10 |
instanceSoftConcurrencyinteger<int32> | 实例软并发度,用于优雅扩容。当实例上的并发数超过软并发度时,会触发实例扩容。例如,您的实例启动较慢,可以通过设置合适的软实例并发度,提前启动实例。展开详情 示例值:5 |
instanceTypestring | 函数的实例类型,取值如下:展开详情 示例值:e1 |
instanceLifecycleConfigInstanceLifecycleConfig | 实例生命周期配置。 |
customDNSCustomDNS | 函数自定义 DNS 配置。 |
customRuntimeConfigCustomRuntimeConfig | Custom Runtime 函数详细配置。 |
customHealthCheckConfigCustomHealthCheckConfig | 函数自定义健康检查配置,仅适用于 Custom Runtime 和 Custom Container。 |
layersArnV2array<string> | 层的列表(ARN V2 版本)。展开详情 |
cpunumber<float> | 函数的 CPU 规格,单位为 vCPU,为 0.05 vCPU 的倍数。 示例值:1.5 |
diskSizeinteger<int32> | 函数的磁盘规格,单位为 MB,可选值为 512 MB 或 10240 MB。 示例值:512 |
gpuMemorySizeinteger<int32> | function 的 GPU 显存规格,单位为 MB,为 1024MB 的倍数 示例值:2048 |