Queries provisioned configurations.

Background information

You can use provisioned instances to respond to function invocation requests. This reduces the occurrences of cold starts and improves the response speed for latency-sensitive online services. You can perform scheduled auto scaling or metric tracking auto scaling to make better use of provisioned instances. For more information, see Auto-scaling of reserved instances.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /provision-configs HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
limit Long Query No 20

The maximum number of resources to be returned. Default value: 20. Maximum value: 100. The number of returned resources is smaller than or equal to the specified number.

nextToken String Query No next_service

The token used to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent calls to obtain more results. You do not need to provide this parameter in the first call.

serviceName String Query No service_name

The name of the service.

qualifier String Query No test

The version or alias of the service.

Response parameters

Parameter Type Example Description
nextToken String next_service

The token used to obtain more results. If this parameter is not returned, all results are returned.

provisionConfigs Array

The configurations.

resource String 19861144****3057#service_name#test#function_name

The description of the resource.

target Long 15

The expected number of provisioned instances.

current Long 15

The actual number of provisioned instances.

scheduledActions Array

The configuration of scheduled auto scaling. You can perform scheduled auto scaling to flexibly configure provisioned instances. You can configure the number of provisioned instances to be automatically adjusted to a specified value at a specified time. This way, the number of provisioned instances can meet the concurrency of your business.

name String demoScheduler

The name of the scheduled task.

startTime String 2020-10-10T10:10:10Z

The time when the configuration of scheduled auto scaling starts to take effect.

endTime String 2020-12-10T10:10:10Z

The time when the configuration of scheduled auto scaling expires.

target Long 10

The expected number of provisioned instances.

scheduleExpression String cron(0 30 8 * * *)

The scheduled expression that specifies when to run the scheduled task. Two formats are supported. For more information, see the Parameters table in the "Scheduled auto-scaling" section of the Auto-scaling of reserved instances topic.

targetTrackingPolicies Array

The configuration of metric tracking auto scaling. Provisioned instances are scaled in or out every minute based on the concurrency utilization of provisioned instances.

  • When the metric value exceeds the value of the metricTarget parameter, the system scales out provisioned instances based on a progressive policy to make the metric value near the value of the metricTarget parameter.
  • When the metric value is smaller than the value of the metricTarget parameter, the system scales in provisioned instances based on a conservative policy to make the metric value near the value of the metricTarget parameter.

If you specify the maximum and minimum numbers of provisioned instances, the system scales provisioned instances within the range from the minimum number to the maximum number. If the number of provisioned instances is beyond the range, scaling stops.

name String demoTargetTracking

The name of the scheduled task.

startTime String 2020-10-10T10:10:10Z

The time when the configuration of metric tracking auto scaling starts to take effect.

endTime String 2020-12-10T10:10:10Z

The time when the configuration of metric tracking auto scaling expires.

metricType String ProvisionedConcurrencyUtilization

The type of the metric to be tracked.

metricTarget double 0.6

The expected value of the metric.

minCapacity Long 10

The minimum number of provisioned instances for scale-in.

maxCapacity Long 100

The maximum number of provisioned instances for scale-out.

Examples

Sample requests

GET /2016-08-15/provision-configs HTTP/1.1 
Common request headers

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "provisionConfigs": [
    {
      "resource": "19861144****3057#service_name#test#function_name",
      "current": 15
      "scheduledActions": [
          {
            "endTime": "2020-12-10T10:10:10Z",
            "name": "demoScheduler",
            "scheduleExpression": "cron(0 30 8 * * *)",
            "startTime": "2020-10-10T10:10:10Z",
            "target": 5
          }
        ],
      "target": 15,
      "targetTrackingPolicies": [
          {
            "endTime": "2020-12-10T10:10:10Z",
            "maxCapacity": 100,
            "metricTarget": 0.6,
            "metricType": "ProvisionedConcurrencyUtilization",
            "minCapacity": 10,
            "name": "demoScheduler",
            "startTime": "2020-10-10T10:10:10Z"
        ]
      }
    }
  ]
}