FunctionProps
Properties for defining a Function
.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-fc-function
Initializer
using AlibabaCloud.SDK.ROS.CDK.Fc;
new FunctionProps {
object FunctionName,
object Handler,
object Runtime,
object ServiceName,
object AsyncConfiguration = null,
object CaPort = null,
object Code = null,
object Cpu = null,
object CustomContainerConfig = null,
object CustomDns = null,
object CustomHealthCheckConfig = null,
object CustomRuntimeConfig = null,
object Description = null,
object DiskSize = null,
object EnvironmentVariables = null,
object GpuMemorySize = null,
object InitializationTimeout = null,
object Initializer = null,
object InstanceConcurrency = null,
object InstanceLifecycleConfig = null,
object InstanceSoftConcurrency = null,
object InstanceType = null,
object MemorySize = null,
object Timeout = null
};
Properties
Name | Type | Description |
---|---|---|
FunctionName |
object |
Property functionName: Function name. |
Handler |
object |
Property handler: The function execution entry point. |
Runtime |
object |
Property runtime: The function runtime environment. |
ServiceName |
object |
Property serviceName: Service name. |
AsyncConfiguration |
object |
Property asyncConfiguration: Configuration of asynchronous function calls. |
CaPort |
object |
Property caPort: Custom runtime and custom container runtime dedicated fields, which represent the port that the started custom http server listens to. |
Code |
object |
Property code: The code that contains the function implementation. |
Cpu |
object |
Property cpu: The number of vCPUs of the function. |
CustomContainerConfig |
object |
Property customContainerConfig: Custom container runtime related configuration. |
CustomDns |
object |
Property customDns: The custom DNS configurations of the function. |
CustomHealthCheckConfig |
object |
Property customHealthCheckConfig: The health check configurations for the custom runtime and custom container. |
CustomRuntimeConfig |
object |
Property customRuntimeConfig: Custom runtime related configuration. |
Description |
object |
Property description: Function description. |
DiskSize |
object |
Property diskSize: The disk size of the function. |
EnvironmentVariables |
object |
Property environmentVariables: The environment variable set for the function, you can get the value of the environment variable in the function. |
GpuMemorySize |
object |
Property gpuMemorySize: The GPU memory capacity for the function. |
InitializationTimeout |
object |
Property initializationTimeout: the max execution time of the initializer, in second. |
Initializer |
object |
Property initializer: the entry point of the initializer. |
InstanceConcurrency |
object |
Property instanceConcurrency: Function instance concurrency. |
InstanceLifecycleConfig |
object |
Property instanceLifecycleConfig: The configuration of the instance lifecycle function. |
InstanceSoftConcurrency |
object |
Property instanceSoftConcurrency: The soft concurrency of the instance. |
InstanceType |
object |
Property instanceType: Instance type. |
MemorySize |
object |
Property memorySize: The amount of memory that’s used to run function, in MB. |
Timeout |
object |
Property timeout: The maximum time duration a function can run, in seconds. |
FunctionName
Required
public object FunctionName { get; set; }
- Type: object
Property functionName: Function name.
Handler
Required
public object Handler { get; set; }
- Type: object
Property handler: The function execution entry point.
Runtime
Required
public object Runtime { get; set; }
- Type: object
Property runtime: The function runtime environment.
Supporting nodejs16、nodejs14、nodejs12、nodejs10、nodejs8、nodejs6、nodejs4.4、python3.10、python3.9、python3、python2.7、java11、java8、go1、php7.2、dotnetcore3.1、dotnetcore2.1、custom.debian10、custom和custom-container and so on
ServiceName
Required
public object ServiceName { get; set; }
- Type: object
Property serviceName: Service name.
AsyncConfiguration
Optional
public object AsyncConfiguration { get; set; }
- Type: object
Property asyncConfiguration: Configuration of asynchronous function calls.
CaPort
Optional
public object CaPort { get; set; }
- Type: object
Property caPort: Custom runtime and custom container runtime dedicated fields, which represent the port that the started custom http server listens to.
The default value is 9000
Code
Optional
public object Code { get; set; }
- Type: object
Property code: The code that contains the function implementation.
Cpu
Optional
public object Cpu { get; set; }
- Type: object
Property cpu: The number of vCPUs of the function.
The value must be a multiple of 0.05.
CustomContainerConfig
Optional
public object CustomContainerConfig { get; set; }
- Type: object
Property customContainerConfig: Custom container runtime related configuration.
After configuration, the function can be replaced with a custom container to execute the function
CustomDns
Optional
public object CustomDns { get; set; }
- Type: object
Property customDns: The custom DNS configurations of the function.
CustomHealthCheckConfig
Optional
public object CustomHealthCheckConfig { get; set; }
- Type: object
Property customHealthCheckConfig: The health check configurations for the custom runtime and custom container.
CustomRuntimeConfig
Optional
public object CustomRuntimeConfig { get; set; }
- Type: object
Property customRuntimeConfig: Custom runtime related configuration.
Description
Optional
public object Description { get; set; }
- Type: object
Property description: Function description.
DiskSize
Optional
public object DiskSize { get; set; }
- Type: object
Property diskSize: The disk size of the function.
Unit: MB. Valid values: 512 and 10240.
EnvironmentVariables
Optional
public object EnvironmentVariables { get; set; }
- Type: object
Property environmentVariables: The environment variable set for the function, you can get the value of the environment variable in the function.
GpuMemorySize
Optional
public object GpuMemorySize { get; set; }
- Type: object
Property gpuMemorySize: The GPU memory capacity for the function.
Unit: MB. The value must be a multiple of 1,024.
InitializationTimeout
Optional
public object InitializationTimeout { get; set; }
- Type: object
Property initializationTimeout: the max execution time of the initializer, in second.
Initializer
Optional
public object Initializer { get; set; }
- Type: object
Property initializer: the entry point of the initializer.
InstanceConcurrency
Optional
public object InstanceConcurrency { get; set; }
- Type: object
Property instanceConcurrency: Function instance concurrency.
Value can be between 1 to 100.
InstanceLifecycleConfig
Optional
public object InstanceLifecycleConfig { get; set; }
- Type: object
Property instanceLifecycleConfig: The configuration of the instance lifecycle function.
InstanceSoftConcurrency
Optional
public object InstanceSoftConcurrency { get; set; }
- Type: object
Property instanceSoftConcurrency: The soft concurrency of the instance.
You can use this parameter to implement graceful scale-up of instances. If the number of concurrent requests on an instance is greater than the value of soft concurrency, an instance scale-up is triggered. For example, if your instance requires a long time to start, you can specify a suitable soft concurrency to start the instance in advance.The value must be less than or equal to that of the instanceConcurrency parameter.
InstanceType
Optional
public object InstanceType { get; set; }
- Type: object
Property instanceType: Instance type.
Value:e1: flexible instance. Memory size between 128 and 3072c1: performance instance. Memory size allow values are 4096, 8192, 16384 and 32768
MemorySize
Optional
public object MemorySize { get; set; }
- Type: object
Property memorySize: The amount of memory that’s used to run function, in MB.
Function Compute uses this value to allocate CPU resources proportionally. Defaults to 128 MB. It can be multiple of 64 MB and between 128 MB and 3072 MB.
Timeout
Optional
public object Timeout { get; set; }
- Type: object
Property timeout: The maximum time duration a function can run, in seconds.
After which Function Compute terminates the execution. Defaults to 3 seconds, and can be between 1 to 86400 seconds.