tencent cloud

Feedback

UpdateFunctionConfiguration

Last updated: 2022-02-16 11:28:19

1. API Description

Domain name for API request: scf.tencentcloudapi.com.

This API is used to update the function configuration based on the input parameters.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: UpdateFunctionConfiguration.
Version Yes String Common parameter. The value used for this API: 2018-04-16.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
FunctionName Yes String Name of the function to be modified
Description No String Function description. It can contain up to 1,000 characters, including letters, digits, spaces, commas (,), periods (.), and Chinese characters.
MemorySize No Integer Memory size available for function during execution. Default value: 128 MB. Value range: 64 or 128-3,072 MB in increments of 128 MB.
Timeout No Integer Maximum execution duration of function in seconds. Value range: 1-900 seconds. Default value: 3 seconds
Runtime No String Function runtime environment. Valid values: Python2.7, Python3.6, Nodejs6.10, Nodejs8.9, Nodejs10.15, Nodejs12.16, PHP5, PHP7, Go1, Java8, CustomRuntime
Environment No Environment Function environment variable
Namespace No String Function namespace
VpcConfig No VpcConfig Function VPC configuration
Role No String Role bound to the function
InstallDependency No String Specifies whether to install dependency online. TRUE: yes. Default to FALSE. It is only available for Node.js functions.
ClsLogsetId No String CLS logset ID to which logs are shipped
ClsTopicId No String CLS Topic ID to which logs are shipped
Publish No String It specifies whether to synchronously publish a new version during the update. The default value is FALSE, indicating not to publish a new version
L5Enable No String Whether to enable L5 access. TRUE: enable; FALSE: not enable
Layers.N No Array of LayerVersionSimple List of layer versions that bound with the function. Files with the same name will be overridden by the bound layer versions according to the ascending order in the list.
DeadLetterConfig No DeadLetterConfig Information of a dead letter queue associated with a function
PublicNetConfig No PublicNetConfigIn Public network access configuration
CfsConfig No CfsConfig File system configuration input parameter, which is used for the function to bind the CFS file system
InitTimeout No Integer The function initialization timeout period
ProtocolParams No ProtocolParams Parameters of the specified protocol

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Updating function configuration

Input Example

https://scf.tencentcloudapi.com/?Action=UpdateFunctionConfiguration
&FunctionName=<FunctionName>
&Description=<Description>
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "eac6b301-a322-493a-8e36-83b295459397"
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
FailedOperation.ApmConfigInstanceId Failed to obtain Apm InstanceId
FailedOperation.DebugModeUpdateTimeOutFail Execution timeout period cannot be updated in debug mode.
FailedOperation.QcsRoleNotFound The role does not exist.
FailedOperation.ReservedInProgress The function already has a reserved concurrency setting task in progress. Please try again later.
FailedOperation.UpdateFunctionConfiguration The UpdateFunctionConfiguration operation failed.
InternalError.System Internal system error.
InternalError.SystemError Internal service error.
InvalidParameter.Payload Invalid request parameter.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.ApmConfig ApmConfig input error
InvalidParameterValue.ApmConfigInstanceId ApmConfigInstanceId input error
InvalidParameterValue.ApmConfigRegion ApmConfigRegion input error
InvalidParameterValue.CfsParameterDuplicate The cfs configuration item already exists.
InvalidParameterValue.CfsParameterError The value of cfs configuration item does not meet the specification.
InvalidParameterValue.Cls Cls error.
InvalidParameterValue.ClsRole To modify CLS configuration, Role parameter is required. Please check and try again.
InvalidParameterValue.Description Description error.
InvalidParameterValue.DnsInfo The configuration of the environment variable DNS[OS_NAMESERVER] is incorrect.
InvalidParameterValue.EipConfig EipConfig parameter error.
InvalidParameterValue.Environment Environment error.
InvalidParameterValue.EnvironmentExceededLimit The size of the environment variable exceeds the limit. Please keep it within 4 KB.
InvalidParameterValue.EnvironmentSystemProtect You cannot modify the function's system environment variables or runtime environment variables.
InvalidParameterValue.FunctionName The function does not exist.
InvalidParameterValue.Handler Handler error.
InvalidParameterValue.IdleTimeOut IdleTimeOut input parameter error
InvalidParameterValue.Layers Layers parameter error.
InvalidParameterValue.LimitExceeded The parameter exceeds the length limit.
InvalidParameterValue.Memory The value of Memory does not conform to the specification. Please fix it and try again. For more information, please visit https://tencentcs.com/5jXKFnBW.
InvalidParameterValue.MemorySize MemorySize error.
InvalidParameterValue.Namespace Namespace error.
InvalidParameterValue.NodeSpec NodeSpec parameter error
InvalidParameterValue.NodeType NodeType parameter error
InvalidParameterValue.PublicNetConfig The PublicNetConfig parameter is invalid.
InvalidParameterValue.Runtime Runtime error.
InvalidParameterValue.SystemEnvironment The system environment variable is invalid.
InvalidParameterValue.TraceEnable The value of TraceEnable is invalid. Please modify and try again.
InvalidParameterValue.WebSocketsParams WebSocketsParams input parameter error
LimitExceeded.Eip The EIP resource exceeded the limit.
LimitExceeded.InitTimeout The value of InitTimeout has reached the upper limit. You can submit a ticket to increase it at https://tencentcs.com/7Fixwt63.
LimitExceeded.Memory The memory exceeds the upper limit.
LimitExceeded.Timeout Timeout exceeds the upper limit.
ResourceNotFound.CfsVpcNotMatch VPCs of the CFS instance and the SCF function are different.
ResourceNotFound.Cmq Cmq does not exist.
ResourceNotFound.Function The function does not exist.
ResourceNotFound.FunctionName The function does not exist.
ResourceNotFound.GetCfsMountInsError An error occurred while getting the CFS mount target information.
ResourceNotFound.GetCfsNotMatch An error occurred while getting the CFS information.
ResourceNotFound.Layer The layer does not exist.
ResourceNotFound.Namespace Namespace does not exist.
ResourceNotFound.Role The role does not exist.
ResourceNotFound.Vpc The VPC or subnet does not exist.
UnauthorizedOperation.CAM CAM authentication failed.
UnsupportedOperation Unsupported operation.
UnsupportedOperation.EipFixed The specified EipFixed does not exist.
UnsupportedOperation.VpcConfig The specified VpcConfig does not exist.