|
名稱 |
類型 |
描述 |
樣本值 |
|---|---|---|---|
|
object |
函數更新要求參數。 |
||
| code | InputCodeLocation |
函數代碼 ZIP 包。code 和 customContainerConfig 二選一。 |
|
| cpu |
number |
函數的 CPU 規格,單位為 vCPU,取值需要為 0.05 vCPU 的倍數。 |
1 |
| customContainerConfig | CustomContainerConfig |
自訂容器運行時的相關配置,成功配置後函數可以使用自訂容器鏡像執行函數。code 和 customContainerConfig 二選一。 |
|
| customDNS | CustomDNS |
自訂 DNS 配置。 |
|
| customRuntimeConfig | CustomRuntimeConfig |
自訂運行時配置。 |
|
| description |
string |
函數的描述。 |
my function |
| diskSize |
integer |
函數的磁碟規格,單位為 MB,可選值為 512 MB 或 10240 MB。 |
512 |
| environmentVariables |
object |
函數的環境變數,可以在運行環境中訪問設定的環境變數。 |
|
|
string |
value1 |
||
| gpuConfig | GPUConfig |
函數 GPU 配置。 |
|
| handler |
string |
函數執行的入口,具體格式和運行時相關。 |
index.handler |
| instanceConcurrency |
integer |
執行個體最大並發度。 |
1 |
| instanceLifecycleConfig | InstanceLifecycleConfig |
執行個體生命週期回調方法配置。 |
|
| internetAccess |
boolean |
是否允許訪問公網。 |
true |
| layers |
array |
層的列表。多個層會按照數組下標從大到小的順序進行合并,下標小的層的內容會覆蓋下標大的層的同名檔案。 |
|
|
string |
層 ARN。 |
acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1 |
|
| logConfig | LogConfig |
日誌配置。函數產生的日誌會被寫入到配置的日誌庫中。 |
|
| memorySize |
integer |
函數的記憶體規格,單位為 MB,記憶體大小為 64 MB 的倍數。不同的函數執行個體類型,記憶體規格存在差異。 |
512 |
| nasConfig | NASConfig |
NAS 配置。配置此參數後,函數可以訪問指定的 NAS 資源。 |
|
| ossMountConfig | OSSMountConfig |
OSS 掛載配置。 |
|
| role |
string |
授予Function Compute要求的權限的 RAM 角色,使用情境包含:1. 把函數產生的日誌發送到您的日誌庫中。2. 為函數在執行過程中訪問其他雲資源產生的臨時存取權杖。 |
acs:ram::188077086902****:role/fc-test |
| runtime |
string |
函數的運行時環境。 |
nodejs14 |
| timeout |
integer |
函數啟動並執行逾時時間,單位為秒,最小 1 秒,預設 3 秒。函數超過這個時間後會被終止執行。 |
60 |
| tracingConfig | TracingConfig |
鏈路追蹤配置。當Function Compute與鏈路追蹤整合後,您可以記錄請求在Function Compute的耗時時間、查看函數的冷啟動時間、記錄函數內部時間的消耗等。 |
|
| vpcConfig | VPCConfig |
VPC 配置。配置此參數後,函數可以訪問指定的 VPC 資源。 |
|
| disableOndemand |
boolean |
是否禁止建立按量執行個體,功能開啟後,不會建立按量執行個體,只能使用預留執行個體。 |
|
| sessionAffinity |
string |
Function Compute調用請求的親和策略,如需實現 MCP SSE 協議的請求親和,可設定為 MCP_SSE。如使用 Cookie 親和,可設定為 GENERATED_COOKIE。如使用 Header 親和,可設定為 HEADER_FIELD。如不設定或設定為 NONE,則無親和效果,按Function Compute系統預設調度策略路由請求。 |
MCP_SSE |
| enableLongLiving |
boolean |
是否允許 GPU 函數的預留執行個體常駐,啟用該功能時,建立的函數執行個體不會被注入 STS token。 |
|
| instanceIsolationMode |
string |
執行個體隔離模式 |
|
| sessionAffinityConfig |
string |
當設定 sessionAffinity 親和類型時,需設定相關的親和配置。如 MCP_SSE 親和需填充 MCPSSESessionAffinityConfig 配置。Cookie 親和需填充 CookieSessionAffinityConfig 配置,Header Field 親和需填充 HeaderFieldSessionAffinityConfig 配置。 |
{\"sseEndpointPath\":\"/sse\", \"sessionConcurrencyPerInstance\":20} |