All Products
Search
Document Center

Function Compute:UpdateFunctionInput

Last Updated:Aug 02, 2024
ParameterTypeDescriptionExample
object

The request parameters for updating the function.

codeInputCodeLocation

The code of the function. The code must be packaged into a ZIP file. You must configure one of the code parameter and the customContainerConfig parameter.

cpufloat

The number of vCPUs of the function. The value is a multiple of 0.05.

1
customContainerConfigCustomContainerConfig

The configurations of the Custom Container runtime. After you configure the Custom Container runtime, Function Compute can execute the function in a custom container image. You must configure one of the code parameter and the customContainerConfig parameter.

customDNSCustomDNS

The custom DNS settings.

customRuntimeConfigCustomRuntimeConfig

The configurations of the custom runtime.

descriptionstring

The description of the function.

my function
diskSizeinteger

The disk size of the function. Unit: MB. Valid values: 512 and 10240.

512
environmentVariablesobject

The environment variables of the function. You can access the environment variables configured in the runtime.

string
value1
gpuConfigGPUConfig

The GPU configurations of the function.

handlerstring

The handler of the function. The format of the handler is related to the runtime you use.

index.handler
instanceConcurrencyinteger

The number of requests that can be concurrently processed by the instance.

1
instanceLifecycleConfigInstanceLifecycleConfig

The configurations of instance lifecycle hooks.

internetAccessboolean

Specifies whether to allow the function to access the Internet.

true
layersarray

An array that consists of the information of layers. Multiple layers are merged based on the order of array subscripts. The content of a layer with a smaller subscript overwrites the file that has the same name as a layer with a larger subscript.

string

The Alibaba Cloud Resource Name (ARN) of the layer.

acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1
logConfigLogConfig

The log configurations. Function Compute writes function execution logs to the specified Logstore.

memorySizeinteger

The memory size of the function. Unit: MB. The value must be a multiple of 64. The memory size varies based on the function instance type.

512
nasConfigNASConfig

The configuration of the NAS file system. The configurations allow functions in the specified service to access the NAS file system.

ossMountConfigOSSMountConfig

The mount configurations of Object Storage Service (OSS).

rolestring

The Resource Access Management (RAM) role that is used to grant the required permissions to Function Compute. You can use the RAM role in the following scenarios: 1. Send the logs that the function generates to your Logstore. 2. Generate temporary tokens that are used to access other cloud resources during function execution.

acs:ram::188077086902****:role/fc-test
runtimestring

The runtime of the function.

nodejs14
timeoutinteger

The timeout period for the execution of the function. Unit: seconds. Default value: 3. Minimum value: 1. When this period is elapsed, the function execution is terminated.

60
tracingConfigTracingConfig

The configuration of Tracing Analysis. After Function Compute is integrated with Managed Service for OpenTelemetry, you can record the duration of a request in Function Compute, view the cold start duration of a function, and record the execution duration of a function.

vpcConfigVPCConfig

The VPC configurations. The configurations allow functions in the specified service to access the specified VPC.