tencent cloud

文档反馈

DeleteFunction

最后更新时间:2023-05-05 10:16:48

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 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.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DeleteFunction.
Version Yes String Common Params. The value used for this API: 2018-04-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
FunctionName Yes String Name of the function to be deleted
Namespace No String Function namespace
Qualifier No String ID of the version to delete. All versions are deleted if it’s left empty.

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 function

This example shows you how to delete a function with the 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

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.DeleteFunction This operation cannot be performed in the current function status. Please try again when the function is in normal status.
FailedOperation.FunctionNameStatusError You cannot update code in the current function state. Please try again when the state is normal.
FailedOperation.FunctionStatusError Operation failed. The function is deploying.
FailedOperation.ProvisionedInProgress The function version already has a provisioned concurrency setting task in progress. Please try again later.
InternalError.Cmq Failed to delete the cmq trigger.
InternalError.System Internal system error.
InvalidParameter.Payload Invalid request parameter.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.FunctionName The function does not exist.
InvalidParameterValue.Namespace Namespace error.
InvalidParameterValue.Qualifier Unsupported function version.
ResourceNotFound The resource does not exist.
ResourceNotFound.AttachedTagKeyNotFound The tag key does not exist.
ResourceNotFound.Function The function does not exist.
ResourceNotFound.FunctionName The function does not exist.
ResourceNotFound.Namespace Namespace does not exist.
ResourceNotFound.Qualifier The version does not exist.
UnauthorizedOperation.CAM CAM authentication failed.
UnauthorizedOperation.DeleteFunction Unauthorized operation.
UnsupportedOperation Unsupported operation.
UnsupportedOperation.AliasBind The resource is bound to an alias, and the current operation cannot be performed. Please unbind the alias and try again.