Creates a function rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:PutFunctionOnDemandConfig |
create |
*All Resource
|
None | None |
Request syntax
PUT /2021-04-06/services/{serviceName}/functions/{functionName}/on-demand-config HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| serviceName |
string |
Yes |
The name of the service. |
demo-service |
| functionName |
string |
Yes |
The name of the function. |
demo-function |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| qualifier |
string |
Yes |
The service alias or latest version. Other versions are not supported. |
prod |
| body |
object |
No |
The request body. |
|
| maximumInstanceCount |
integer |
Yes |
The maximum number of on-demand instances. For more information, see Configure provisioned instances and auto scaling rules. |
10 |
| If-Match |
string |
No |
If the ETag specified in the request matches the ETag value of the object, the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. |
e19d5cd5af0378da05f63f891c7467af |
| X-Fc-Account-Id |
string |
No |
The ID of your Alibaba Cloud account. |
188077086902**** |
| X-Fc-Date |
string |
No |
The time when the function is invoked. The value is in the EEE,d MMM yyyy HH:mm:ss GMT format. |
Wed, 11 May 2022 09:00:00 GMT |
| X-Fc-Trace-Id |
string |
No |
The unique ID of the trace. |
r9s89isisi**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| resource |
string |
The description of the resource. |
12345#servierName#qualifier#functionName |
| maximumInstanceCount |
integer |
The maximum number of instances. |
10 |
Examples
Success response
JSON format
{
"resource": "12345#servierName#qualifier#functionName",
"maximumInstanceCount": 10
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.