DeleteFunction

Last updated: 2020-02-28 10:12:12

1. API Description

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

This API is used to delete a function based on the input parameters.

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

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.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DeleteFunction
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. This API only supports: ap-beijing, ap-chengdu, ap-guangzhou, ap-guangzhou-open, ap-hongkong, ap-mumbai, ap-shanghai, ap-singapore, ap-taipei, na-siliconvalley, na-toronto
FunctionName Yes String Name of the function to be deleted
Namespace No String Function namespace

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 Deleting a Function

The following sample shows how to delete a function with specified version and namespace.

Input Example

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

Output Example

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

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

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.FunctionNameStatusError Failed to update the code. The function is deploying.
FailedOperation.FunctionStatusError Operation failed. The function is deploying.
InternalError.Cmq Failed to delete the cmq trigger.
InternalError.System Internal system error.
InvalidParameter.Payload Invalid request parameter.
InvalidParameterValue Incorrect parameter value.
ResourceNotFound.Function The function does not exist.
ResourceNotFound.FunctionName The function does not exist.
UnauthorizedOperation.CAM CAM authentication failed.
UnauthorizedOperation.DeleteFunction Unauthorized operation.