Sets the elastic configuration for a function.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:PutScalingConfig |
update |
*All Resource
|
None | None |
Request syntax
PUT /2023-03-30/functions/{functionName}/scaling-config HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| functionName |
string |
No |
The function name. |
my-func |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| qualifier |
string |
No |
The function alias. |
LATEST |
| body | PutScalingConfigInput |
No |
The elastic configuration for the function. |
Response elements
|
Element |
Type |
Description |
Example |
| ScalingConfigStatus |
The elastic configuration information for the function. |
Examples
Success response
JSON format
{
"functionArn": "acs:fc:cn-shanghai:124:functions/myFunction/prod",
"residentPoolId": "fc-pool-a2b664c1f87171j4******",
"minInstances": 1,
"currentInstances": 1,
"currentError": "image not found",
"targetInstances": 10,
"enableOnDemandScaling": true,
"scheduledPolicies": [
{
"name": "student_app_shop_analyzer",
"startTime": "1764432000000",
"endTime": "1633449590000",
"target": 5,
"scheduleExpression": "。",
"timeZone": "。"
}
],
"horizontalScalingPolicies": [
{
"name": "test",
"startTime": "2023-03-10T10:10:10Z",
"endTime": "2024-03-10T10:10:10Z",
"metricType": "CPUUtilization",
"metricTarget": 0.6,
"minInstances": 1,
"maxInstances": 10,
"timeZone": "Asia/Shanghai"
}
],
"enableMixMode": true,
"requestDispatchPolicy": "Balanced"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.