tencent cloud

Serverless Cloud Function

Data Types

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-10-13 15:53:15

Alias

Version alias of function

Used by actions: ListAliases.

Name Type Required Description
FunctionVersion String Yes Master version pointed to by the alias
Name String Yes Alias name
RoutingConfig RoutingConfig Yes Routing information of alias
Note: this field may return null, indicating that no valid values can be obtained.
Description String No Description
Note: this field may return null, indicating that no valid values can be obtained.
AddTime Timestamp No Creation time
Note: this field may return null, indicating that no valid values can be obtained.
ModTime Timestamp No Update time
Note: this field may return null, indicating that no valid values can be obtained.

AsyncEvent

Async event

Used by actions: ListAsyncEvents.

Name Type Description
InvokeRequestId String Invocation request ID
InvokeType String Invocation type
Qualifier String Function version
Status String Event status. Values: RUNNING; FINISHED (invoked successfully); ABORTED (invocation ended); FAILED (invocation failed)
StartTime String Invocation start time in the format of "%Y-%m-%d %H:%M:%S.%f"
EndTime String Invocation end time in the format of "%Y-%m-%d %H:%M:%S.%f"

AsyncEventStatus

Async event status

Used by actions: GetAsyncEventStatus.

Name Type Description
Status String Async event status. Values: RUNNING (running); FINISHED (invoked successfully); ABORTED (invocation ended); FAILED (invocation failed).
StatusCode Integer Request status code
InvokeRequestId String Async execution request ID

AsyncTriggerConfig

Async retry configuration details of function

Used by actions: GetFunctionEventInvokeConfig, UpdateFunctionEventInvokeConfig.

Name Type Required Description
RetryConfig Array of RetryConfig Yes Async retry configuration of function upon user error
MsgTTL Integer Yes Message retention period

CfsConfig

Configuration description of the file system (cfs)

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
CfsInsList Array of CfsInsInfo Yes List of file system information

CfsInsInfo

cfs configuration message associated with the SCF

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
UserId String Yes User ID
UserGroupId String Yes User group id.
CfsId String Yes File system instance id
MountInsId String Yes File system mount point id
LocalMountDir String Yes Local mount point
RemoteMountDir String Yes Remote mount point.
IpAddress String No File system ip. No need to specify when configuring cfs.
Note: This field may return null, indicating that no valid values can be obtained.
MountVpcId String No VPC id where the file system is located. Not required when configuring cfs.
Note: This field may return null, indicating that no valid values can be obtained.
MountSubnetId String No Subnet id of the private network where the file system resides. Not required when configuring cfs.
Note: This field may return null, indicating that no valid values can be obtained.

Code

Function code

Used by actions: PublishLayerVersion, UpdateFunctionCode.

Name Type Required Description
CosBucketName String No Object bucket name (enter the custom part of the bucket name without -appid)
CosObjectName String No File path of code package stored in COS, which should start with “/”
ZipFile String No This parameter contains a .zip file (up to 50 MB) of the function code file and its dependencies. When this API is used, the content of the .zip file needs to be Base64-encoded
CosBucketRegion String No COS region. For Beijing regions, you need to import ap-beijing. For Beijing Region 1, you need to input ap-beijing-1. For other regions, no import is required.
DemoId String No DemoId is required if Demo is used for the creation.
TempCosObjectName String No TempCosObjectName is required if TempCos is used for the creation.
GitUrl String No (Disused) Git address
GitUserName String No (Disused) Git username
GitPassword String No (Disused) Git password
GitPasswordSecret String No (Disused) Git password after encryption. It’s usually not required.
GitBranch String No (Disused) Git branch
GitDirectory String No (Disused) Directory to the codes in the Git repository.
GitCommitId String No (Disused)
GitUserNameSecret String No (Disused) Git username after encryption. It’s usually not required.
ImageConfig ImageConfig No TCR image configurations

DeadLetterConfig

Dead letter queue parameter

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
Type String Yes Dead letter queue mode
Name String Yes Dead letter queue name
FilterType String No Tag format of the DLQ topic model

EipConfigIn

Public network access fixed ip configuration

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
EipStatus String Yes Eip status. Valid values: ENABLE and DISABLE

Environment

Environment variable parameters of the function

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
Variables Array of Variable No Environment variable array

Filter

Key-value pair filters for conditional filtering queries, such as filtering ID, name, and status.
If more than one filter exists, the logical relationship between these filters is AND.
If multiple values exist in one filter, the logical relationship between these values under the same filter is OR.

Used by actions: ListFunctions, ListTriggers.

Name Type Required Description
Name String Yes Fields to be filtered. Up to 10 conditions allowed.
Values of Name: VpcId, SubnetId, ClsTopicId, ClsLogsetId, Role, CfsId, CfsMountInsId, Eip. Values limit: 1.
Name options: Status, Runtime, FunctionType, PublicNetStatus, AsyncRunEnable, TraceEnable. Values limit: 20.
When Name is Runtime, CustomImage refers to the image type function
Values Array of String Yes Filter values of the field

Function

Function list

Used by actions: ListFunctions.

Name Type Description
ModTime String Modification time
AddTime String Creation time
Runtime String Runtime
Note: This parameter may return null, indicating that no valid values can be obtained.
FunctionName String Function name
FunctionId String Function ID
Namespace String Namespace
Status String Function status. For valid values and status change process, please see here
StatusDesc String Function status details
Description String Function description
Tags Array of Tag Function tag
Type String Function type. The value is HTTP or Event.
StatusReasons Array of StatusReason Cause of function failure
TotalProvisionedConcurrencyMem Integer Sum of provisioned concurrence memory for all function versions
Note: this field may return null, indicating that no valid values can be obtained.
ReservedConcurrencyMem Integer Reserved memory for function concurrence
Note: this field may return null, indicating that no valid values can be obtained.
AsyncRunEnable String Asynchronization attribute of the function. Values: TRUE and FALSE.
TraceEnable String Whether to enable call tracing for ansynchronized functions. Values: TRUE and FALSE.

FunctionLog

Log information

Used by actions: GetFunctionLogs.

Name Type Description
FunctionName String Function name.
RetMsg String Returned value after function execution
RequestId String requestId for executing the function
StartTime String Time point when the function starts execution
RetCode Integer Function execution result. 0 indicates successful execution, 2 indicates the function is running, 3 indicates an execution interrupt, and other values indicate failure.
InvokeFinished Integer Whether the function call ends. If so, 1 means execution ended, and additional values indicate a call exception.
Duration Float Function execution duration in milliseconds.
BillDuration Integer Billing duration of a function. It is rounded up to the nearest 100 ms based on the duration, in ms.
MemUsage Integer Memory size actually consumed during function execution, in bytes.
Log String Log output during function execution
RetryNum Integer Number of retries.

FunctionVersion

Function version information

Used by actions: ListVersionByFunction.

Name Type Required Description
Version String Yes Function version name
Description String No Version description
Note: This field may return null, indicating that no valid values is found.
AddTime Timestamp No The creation time
Note: This field may return null, indicating that no valid value was found.
ModTime Timestamp No Update time
Note: This field may return null, indicating that no valid value was found.
Status String No Version status
Note: this field may return null, indicating that no valid values can be obtained.

ImageConfig

TCR image information

Used by actions: PublishLayerVersion, UpdateFunctionCode.

Name Type Required Description
ImageType String Yes Image repository type, which can be personal or enterprise
ImageUri String Yes {domain}/{namespace}/{imageName}:{tag}@{digest}
RegistryId String No The temp token that a TCR Enterprise instance uses to obtain an image. It’s required when ImageType is enterprise.
Note: this field may return null, indicating that no valid values can be obtained.
EntryPoint String No Disused
Note: this field may return null, indicating that no valid values can be obtained.
Command String No The command to start up the container, such as python. If it’s not specified, Entrypoint in Dockerfile is used.
Note: this field may return null, indicating that no valid values can be obtained.
Args String No The parameters to start up the container. Separate parameters with spaces, such as u app.py. If it’s not specified, CMD in Dockerfile is used.<br/>Note: This field may returnnull`, indicating that no valid value can be found.
ContainerImageAccelerate Boolean No Whether to enable image acceleration. It defaults to False.
Note: This field may return null, indicating that no valid values can be obtained.
ImagePort Integer No Image function port settings
-1: No port-specific image functions
0: Default port (Port 9000)
Others: Special ports
Note: This field may return null, indicating that no valid values can be obtained.

InstanceConcurrencyConfig

Configuration description for multiple concurrent executions

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
DynamicEnabled String No Whether intelligent dynamic concurrency is enabled. If set to FALSE, static concurrency is used. If set to '', the multi-concurrency configuration is canceled.
MaxConcurrency Integer No Maximum number of concurrent requests per instance. Value range: [1,100]
InstanceIsolationEnabled String No Safety isolation switch
Type String No Session-Based or Request-Based. Choose one.
MixNodeConfig Array of MixNodeConfig No Dynamic concurrency parameter
SessionConfig SessionConfig No Session configuration parameters

IntranetConfigIn

Private network configuration

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
IpFixed String Yes Whether a fixed private IP address is enabled
ENABLE: enable
DISABLE means not enabled.

K8SLabel

k8s label

Used by actions: CreateNamespace.

Name Type Required Description
Key String Yes Name of the label
Value String Yes Value of the label

K8SToleration

Kubernetes taint and toleration. Please note the supported fields for your Kubernetes version during use.
See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/

Used by actions: CreateNamespace.

Name Type Required Description
Key String No Matched taint name
Operator String No Match mode. Default value: Equal.
Effect String No Execution policy
Value String No Taint value to match. Required when Operator is Equal.
TolerationSeconds Integer No How long a Pod can still run on a node when the taint is not tolerated

LayerVersionInfo

Layer version information

Used by actions: ListLayerVersions, ListLayers.

Name Type Description
CompatibleRuntimes Array of String Runtime applicable to a version
Note: This field may return null, indicating that no valid values can be obtained.
AddTime String Creation time
Description String Version description
Note: This field may return null, indicating that no valid values can be obtained.
LicenseInfo String License information
Note: This field may return null, indicating that no valid values can be obtained.
LayerVersion Integer Version number
LayerName String Layer name
Status String Current status of specific layer version. For valid values, please see here
Stamp String Stamp
Note: This field may return null, indicating that no valid values can be obtained.

LayerVersionSimple

Specify a Layer version

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
LayerName String Yes Name of the bound layer. Pass an empty string to unbind the layer.
LayerVersion Integer Yes Bind or unbind a layer version. To unbind the last layer version associated with a function version, set LayerVersion to 0.

LimitsInfo

Limit information

Used by actions: GetAccount.

Name Type Description
NamespacesCount Integer Limit of namespace quantity
Namespace Array of NamespaceLimit Namespace limit information

LogFilter

Log filter criteria, used to distinguish between correct and error logs

Used by actions: GetFunctionLogs.

Name Type Required Description
RetCode String No Valid values of filter.RetCode:
not0 means only error logs are returned.
is0 means only return correct logs.
TimeLimitExceeded returns the logs of function call timed out.
ResourceLimitExceeded returns the logs of resource limit exceeded during function calls.
UserCodeException returns the logs of user code errors in function calls.
If there is no input, all logs are returned.

LogSearchContext

Log search context

Used by actions: GetFunctionLogs.

Name Type Required Description
Offset String Yes Offset.
Limit Integer Yes Number of logs.
Keyword String No Log keyword
Type String No Log type. Valid values: Application, Platform. Default value: Application.

MixNodeConfig

Dynamic concurrency configuration

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
NodeSpec String No GPU model name
Num Integer No Number of concurrencies

Namespace

Namespace

Used by actions: ListNamespaces.

Name Type Description
ModTime Timestamp Creation time of the namespace
AddTime Timestamp Modification time of the namespace
Description String Namespace description
Name String Namespace name
Type String The default value is default. TCB indicates that the namespace is developed and created through the mini-program cloud.

NamespaceLimit

Namespace limit

Used by actions: GetAccount.

Name Type Description
FunctionsCount Integer Total number of functions
Trigger TriggerCount Trigger information
Namespace String Namespace name
ConcurrentExecutions Integer Concurrency
TimeoutLimit Integer Timeout limit
TestModelLimit Integer Test event limit
Note: this field may return null, indicating that no valid values can be obtained.
InitTimeoutLimit Integer Initialization timeout limit
RetryNumLimit Integer Limit of async retry attempt quantity
MinMsgTTL Integer Lower limit of message retention time for async retry
MaxMsgTTL Integer Upper limit of message retention time for async retry

NamespaceResourceEnv

Namespace resource pool configuration

Used by actions: CreateNamespace.

Name Type Required Description
TKE NamespaceResourceEnvTKE No Resource pool based on a TKE cluster
OFFLINE Boolean No Namespace of the near-offline computing type

NamespaceResourceEnvTKE

Resource pool options based on TKE

Used by actions: CreateNamespace.

Name Type Required Description
ClusterID String Yes Cluster ID
SubnetID String Yes Subnet ID.
Namespace String Yes Namespace
DataPath String No Data storage address
NodeSelector Array of K8SLabel No node selector
Tolerations Array of K8SToleration No Taint and toleration
Port Integer No Starting node port number occupied by the scf component
PodTemplatePatch String No pod patch content in yaml format, for example
metadata:
labels:
key: value

NamespaceUsage

Namespace usage information

Used by actions: GetAccount.

Name Type Description
Functions Array of String Function array
Namespace String Namespace name
FunctionsCount Integer Number of functions in namespace
TotalConcurrencyMem Integer Total memory quota of the namespace
Note: This field may return null, indicating that no valid values can be obtained.
TotalAllocatedConcurrencyMem Integer Concurrency usage of the namespace
Note: This field may return null, indicating that no valid value can be obtained.
TotalAllocatedProvisionedMem Integer Provisioned concurrency usage of the namespace
Note: This field may return null, indicating that no valid value can be obtained.

ProtocolParams

Parameters for HTTP function support of other access protocols

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
WSParams WSParams No Supported parameters of the WebSockets protocol

PublicNetConfigIn

Public network access configuration

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
PublicNetStatus String Yes Whether to enable public network access. Valid values: DISABLE, ENABLE.
EipConfig EipConfigIn No Eip configuration

RequestStatus

Running status of the function

Used by actions: GetRequestStatus.

Name Type Description
FunctionName String Function name
RetMsg String Return value after the function is executed
RequestId String Request ID
StartTime String Request start time
RetCode Integer Result of the request. 0: succeeded, 1: running, -1: exception
Duration Float Time consumed for the request in ms
MemUsage Float Time consumed by the request in MB
RetryNum Integer Retry Attempts

Result

Response of the executed function

Used by actions: Invoke, InvokeFunction.

Name Type Description
Log String It indicates the log output during the function execution. Null is returned for asynchronous invocations.
RetMsg String It indicates the response from the executed function. Null is returned for asynchronous invocations.
ErrMsg String It indicates the error message of the executed function. Null is returned for asynchronous invocations.
MemUsage Integer It indicates the memory size (in bytes) when the function is running. Null is returned for asynchronous invocations.
Duration Float It indicates the duration (in milliseconds) required for running the function. Null is returned for asynchronous invocations.
BillDuration Integer It indicates the billing duration (in milliseconds) for the function. Null is returned for asynchronous invocations.
FunctionRequestId String ID of the executed function
InvokeResult Integer The status code of the request. It’s not available for Invoke API.

RetryConfig

Async retry configuration

Used by actions: GetFunctionEventInvokeConfig, UpdateFunctionEventInvokeConfig.

Name Type Required Description
RetryNum Integer Yes Number of retry attempts

RoutingConfig

Version routing configuration of alias

Used by actions: CreateAlias, GetAlias, ListAliases, UpdateAlias.

Name Type Required Description
AdditionalVersionWeights Array of VersionWeight No Additional version with random weight-based routing
AddtionVersionMatchs Array of VersionMatch No Additional version with rule-based routing

SearchKey

Key-value condition for keyword search

Used by actions: ListNamespaces.

Name Type Required Description
Key String Yes Search range
Value String Yes Keyword for search

SessionConfig

Session parameter

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
SessionSource String No session source. Valid values: 'HEADER', 'COOKIE', 'QUERY_STRING'
SessionName String No session name. It must start with a letter. Other characters can consist of digits, letters, underscores, and hyphens. Length: 5-40 characters.
MaximumConcurrencySessionPerInstance Integer No Maximum concurrent sessions
MaximumTTLInSeconds Integer No Lifecycle
MaximumIdleTimeInSeconds Integer No Idle duration
SessionPath String No Path information corresponding to the session
IdleTimeoutStrategy String No Automatically destroy FATAL and auto-pause PAUSE. This only occurs when security isolation is started.

StatusReason

State reason description

Used by actions: ListFunctions.

Name Type Description
ErrorCode String Error code
ErrorMessage String Error message

Tag

Function tag

Used by actions: ListFunctions.

Name Type Required Description
Key String Yes Tag key
Value String Yes Tag value

TimeInterval

Left-closed-right-open time range between the start time and end time in the format of "%Y-%m-%d %H:%M:%S"

Used by actions: ListAsyncEvents.

Name Type Required Description
Start String Yes Start time (inclusive) in the format of "%Y-%m-%d %H:%M:%S"
End String Yes End time (exclusive) in the format of "%Y-%m-%d %H:%M:%S"

Trigger

Trigger type

Used by actions: CreateTrigger.

Name Type Description
ModTime Timestamp Last modification time of the trigger
Type String Trigger type
TriggerDesc String Trigger detailed configuration
TriggerName String Trigger name.
AddTime Timestamp Trigger creation time
Enable Integer Enable switch
CustomArgument String Customer custom parameter
AvailableStatus String Trigger status
Qualifier String Alias name or version bound to the trigger
Description String Trigger description.

TriggerAction

Details of a scheduled provisioned concurrency scaling action

Used by actions: GetProvisionedConcurrencyConfig, PutProvisionedConcurrencyConfig.

Name Type Required Description
TriggerName String Yes Scheduled action name
Note: this field may return null, indicating that no valid values can be obtained.
TriggerProvisionedConcurrencyNum Integer Yes Target provisioned concurrency of the scheduled scaling action
Note: this field may return null, indicating that no valid values can be obtained.
TriggerCronConfig String Yes Trigger time of the scheduled action in Cron expression. Seven fields are required and should be separated with a space.
Note: this field may return null, indicating that no valid values can be obtained.
ProvisionedType String No The provision type. Value: Default
Note: This field may return null, indicating that no valid value can be found.

TriggerCount

TriggerCount describes the numbers of triggers in different types

Used by actions: GetAccount.

Name Type Description
Cos Integer Number of COS triggers
Timer Integer Number of timer triggers
Cmq Integer Number of CMQ triggers
Total Integer Total number of triggers
Ckafka Integer Number of CKafka triggers
Apigw Integer Number of API Gateway triggers
Cls Integer Number of CLS triggers
Clb Integer Number of CLB triggers
Mps Integer Number of MPS triggers
Cm Integer Number of CM triggers
Vod Integer Number of VOD triggers
Eb Integer Number of EventBridge triggers
Note: This field may return null, indicating that no valid values can be obtained.

TriggerInfo

Trigger information

Used by actions: ListTriggers.

Name Type Description
Enable Integer Whether to enable
Qualifier String Function version or alias
TriggerName String Trigger name
Type String Trigger type
TriggerDesc String Detailed configuration of trigger
AvailableStatus String Whether the trigger is available
CustomArgument String Custom parameter
Note: this field may return null, indicating that no valid values can be obtained.
AddTime Timestamp Trigger creation time
ModTime Timestamp Trigger last modified time
Description String Description of a custom trigger
Note: This parameter may return null, indicating that no valid values can be obtained.

UsageInfo

Usage information

Used by actions: GetAccount.

Name Type Description
NamespacesCount Integer Number of namespaces
Namespace Array of NamespaceUsage Namespace details
TotalConcurrencyMem Integer Upper limit of user concurrency memory in the current region
TotalAllocatedConcurrencyMem Integer Quota of configured user concurrency memory in the current region
UserConcurrencyMemLimit Integer Quota of account concurrency actually configured by user

Variable

Variable parameters

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
Key String No Variable name. Cannot be empty.
Value String No Variable value. Cannot be empty.

VersionMatch

Function version with match rule

Used by actions: CreateAlias, GetAlias, UpdateAlias.

Name Type Required Description
Version String Yes Function version name
Key String Yes Matching rule key. When the API is called, pass in the key to route the request to the specified version based on the matching rule
Header method:
Enter "invoke.headers.User" for key and pass in RoutingKey:{"User":"value"} when invoking a function through invoke for invocation based on rule matching
Method String Yes Match method. Valid values:
range: range match
exact: exact string match
Expression String Yes Rule requirements for range match:
It should be described in an open or closed range, i.e., (a,b) or [a,b], where both a and b are integers
Rule requirements for exact match:
Exact string match

VersionProvisionedConcurrencyInfo

Provisioned concurrency information of function version, including the set provisioned concurrency amount, available provisioned concurrency amount, and provisioned concurrency setting task status.

Used by actions: GetProvisionedConcurrencyConfig.

Name Type Description
AllocatedProvisionedConcurrencyNum Integer Set provisioned concurrency amount.
AvailableProvisionedConcurrencyNum Integer Currently available provisioned concurrency amount.
Status String Provisioned concurrency setting task status. Done: completed; InProgress: in progress; Failed: partially or completely failed.
StatusReason String Status description of provisioned concurrency setting task.
Qualifier String Function version number
TriggerActions Array of TriggerAction List of scheduled provisioned concurrency scaling actions
Note: this field may return null, indicating that no valid values can be obtained.

VersionWeight

Function version with weight

Used by actions: CreateAlias, GetAlias, UpdateAlias.

Name Type Required Description
Version String Yes Function version name
Weight Float Yes Version weight

VpcConfig

Private network parameter configuration

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
VpcId String No Id of the private network
SubnetId String No Subnet Id

WSParams

Parameters for accessing an HTTP function over the WebSockets protocol

Used by actions: UpdateFunctionConfiguration.

Name Type Required Description
IdleTimeOut Integer No Idle timeout in seconds. Default value: 15s. Configurable range: 1-1800s.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백