Disables function invocations. You can also stop all ongoing requests. When a function is disabled, new instances cannot be created and provisioned instances are destroyed. This OpenAPI is in beta.
Operation description
Use caution when calling this API for functions in a production environment because disabling function invocations can disrupt your services.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:DisableFunctionInvocation |
update |
*Function
|
None | None |
Request syntax
POST /2023-03-30/functions/{functionName}/invoke/disable HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| functionName |
string |
No |
The name of the function to disable. |
helloworld |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request parameters for disabling a function invocation |
|
| reason |
string |
No |
The reason for disabling the function invocation. |
业务下线 |
| abortOngoingRequest |
boolean |
No |
Specifies whether to immediately stop all ongoing requests. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response for successfully disabling a function invocation. |
||
| success |
boolean |
Indicates whether the function invocation was successfully disabled. |
true |
Examples
Success response
JSON format
{
"success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.