UpdateFunctionConfiguration

Last updated: 2019-08-18 22:55:00

PDF

1. API Description

API request domain name: scf.tencentcloudapi.com.

This API updates the function configuration based on the parameters passed in.

Default API request frequency limit: 20 times/second.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter name Required Type Description
Action Yes String Common parameter; the name for this API: UpdateFunctionConfiguration
Version Yes String Common parameter; the version of this API: 2018-04-16
Region Yes String Common parameters; for details, see the Region List.
FunctionName Yes String Name of the new function. The name: must be between 2 and 60 characters long; can contain any letters (both uppercase and lowercase) from a to z and any numbers from 0 through 9; can contain some special characters, including hyphen or dash, and underscore; must begin with a letter and be unique, and must not end with an underscore or a dash.
Description No String Description of the function. The description can be up to 1,000 characters long and can contain any letters (both uppercase and lowercase) from a to z, any numbers from 0 through 9, spaces, line breaks, commas and period. Chinese characters are also supported.
MemorySize No Integer The size of memory size available to the function during execution. Specify a value between 128 MB (default) and 1,536 MB in 128 MB increments.
Timeout No Integer The duration a function allowed to execute. Choose a value between 1 and 300 seconds; The default is 3 seconds.
Environment No Environment Environment variable of the function
Runtime No String Runtime environment of the function; supported environment: Python2.7 (default), Python3.6, Nodejs6.10, PHP5, PHP7, Golang1 and Java8.
VpcConfig No VpcConfig VPC configuration of the function

3. Output Parameters

Parameter name Type Description
RequestId String The ID of the request. Each request returns a unique ID. The RequestId is required to troubleshoot issues.

4. Sample

Updating Function Configuration

Input Sample Code

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

Output Sample Code

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

5. Developer Resources

API Explorer

This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

6. Error Codes

The following error codes are API business logic-related. For other error codes, see Common Error Codes.

Error Code Description
InternalError.System Internal system error.
InvalidParameterValue An invalid value was declared for the input parameter.
InvalidParameterValue.Environment An invalid value was declared for the input parameter: Environment.
InvalidParameterValue.FunctionName Function does not exist.
InvalidParameterValue.Handler An invalid value was declared for the input parameter: Handler.
LimitExceeded.Memory Memory exceeds the upper limit.
LimitExceeded.Timeout Timeout exceeds the upper limit.
ResourceNotFound.FunctionName Function does not exist.
UnauthorizedOperation.CAM CAM authentication failed.