All Products
Search
Document Center

Function Compute:PutFunctionOnDemandConfig

Last Updated:Jun 02, 2023

Creates function rules.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

PUT /2021-04-06/services/{serviceName}/functions/{functionName}/on-demand-config

Request parameters

ParameterTypeRequiredDescriptionExample
serviceNamestringYes

The description of the resource.

demo-service
functionNamestringYes

The body of the request.

demo-function
qualifierstringYes

The trace ID of the request for Function Compute API, which is also the unique ID of the request.

prod
bodyobjectNo

If the ETag specified in the request matches the ETag value of the OndemandConfig, FC returns 200 OK. If the ETag specified in the request does not match the ETag value of the object, FC returns 412 Precondition Failed.

maximumInstanceCountlongYes

The maximum number of instances.

10
If-MatchstringNo

The name of the service.

e19d5cd5af0378da05f63f891c7467af
X-Fc-Account-IdstringNo

The ID of your Alibaba Cloud account.

188077086902****
X-Fc-DatestringNo

Example 1

Wed, 11 May 2022 09:00:00 GMT
X-Fc-Trace-IdstringNo

Creates function rules.

r9s89isisi****

Response parameters

ParameterTypeDescriptionExample
headersobject
ETagstring

Configures the on-demand configurations of a function.

139490
object

Xiaoqi

Examples

Sample success responses

JSONformat

{
  "resource": "12345#servierName#qualifier#functionName",
  "maximumInstanceCount": 10
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2021-06-30The internal configurations of the API operation change but you can still call the operation.
Change itemChange content
The internal configurations of the API operation change but you can still call the operation.
2021-06-30The input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: X-Fc-Account-Id
    Added Input Parameters: X-Fc-Code-Checksum
    Added Input Parameters: X-Fc-Log-Type
    Added Input Parameters: X-Fc-Invocation-Type
    Added Input Parameters: X-Fc-Date
    Added Input Parameters: X-Fc-Trace-Id
2021-06-30The input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: X-Fc-Account-Id
2021-06-30The input parameters of the API operation change.
Change itemChange content
Input ParametersThe input parameters of the API operation change.
    delete Input Parameters: X-Fc-Account-Id