Creates or modifies a provisioned configuration for a function.
Authorization information
Request syntax
PUT /2021-04-06/services/{serviceName}/functions/{functionName}/provision-config
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
serviceName | string | Yes | The name of the service. | demoService |
qualifier | string | Yes | The name of the alias. | prod |
functionName | string | Yes | The name of the function. | demoFunction |
body | object | No | The provisioned configurations. | |
target | long | Yes | The number of provisioned instances. Value range: [1,100000]. | 1 |
scheduledActions | array | No | The configurations of scheduled auto scaling. | |
ScheduledActions | No | The details of scheduled auto scaling. | ||
targetTrackingPolicies | array | No | The configurations of metric-based auto scaling. | |
TargetTrackingPolicies | No | The details of metric-based auto scaling. | ||
alwaysAllocateCPU | boolean | No | Specifies whether to always allocate CPU resources. Default value: true. | true |
X-Fc-Account-Id | string | No | The ID of your Alibaba Cloud account. | 188077086902**** |
X-Fc-Date | string | No | The time when Function Compute API is called. Specify the time 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 trace ID of the invocation request of Function Compute. | rid281s****** |
Response parameters
Examples
Sample success responses
JSON
format
{
"resource": "\"12345#servierName#qualifier#functionName\"",
"target": 5,
"current": 1,
"scheduledActions": [
{
"name": "name",
"startTime": "2020-10-10T10:10:10Z",
"endTime": "2021-10-10T10:10:10Z",
"target": 50,
"scheduleExpression": "cron(0/30 * * * *)"
}
],
"targetTrackingPolicies": [
{
"name": "test_1",
"startTime": "2020-10-10T10:10:10Z",
"endTime": "2020-10-10T10:10:10Z",
"metricType": "CPUUtilization",
"metricTarget": 0.6,
"minCapacity": 10,
"maxCapacity": 100
}
],
"alwaysAllocateCPU": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2021-06-30 | The input parameters of the API operation change. | |||||||||||||||
| ||||||||||||||||
2021-06-30 | The input parameters of the API operation change. | |||||||||||||||
| ||||||||||||||||
2021-06-30 | The input parameters of the API operation change. | |||||||||||||||
|