Skip to content

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.

FunctionNameRequired

public object FunctionName { get; set; }
  • Type: object

Property functionName: Function name.


HandlerRequired

public object Handler { get; set; }
  • Type: object

Property handler: The function execution entry point.


RuntimeRequired

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


ServiceNameRequired

public object ServiceName { get; set; }
  • Type: object

Property serviceName: Service name.


AsyncConfigurationOptional

public object AsyncConfiguration { get; set; }
  • Type: object

Property asyncConfiguration: Configuration of asynchronous function calls.


CaPortOptional

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


CodeOptional

public object Code { get; set; }
  • Type: object

Property code: The code that contains the function implementation.


CpuOptional

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.


CustomContainerConfigOptional

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


CustomDnsOptional

public object CustomDns { get; set; }
  • Type: object

Property customDns: The custom DNS configurations of the function.


CustomHealthCheckConfigOptional

public object CustomHealthCheckConfig { get; set; }
  • Type: object

Property customHealthCheckConfig: The health check configurations for the custom runtime and custom container.


CustomRuntimeConfigOptional

public object CustomRuntimeConfig { get; set; }
  • Type: object

Property customRuntimeConfig: Custom runtime related configuration.


DescriptionOptional

public object Description { get; set; }
  • Type: object

Property description: Function description.


DiskSizeOptional

public object DiskSize { get; set; }
  • Type: object

Property diskSize: The disk size of the function.

Unit: MB. Valid values: 512 and 10240.


EnvironmentVariablesOptional

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.


GpuMemorySizeOptional

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.


InitializationTimeoutOptional

public object InitializationTimeout { get; set; }
  • Type: object

Property initializationTimeout: the max execution time of the initializer, in second.


InitializerOptional

public object Initializer { get; set; }
  • Type: object

Property initializer: the entry point of the initializer.


InstanceConcurrencyOptional

public object InstanceConcurrency { get; set; }
  • Type: object

Property instanceConcurrency: Function instance concurrency.

Value can be between 1 to 100.


InstanceLifecycleConfigOptional

public object InstanceLifecycleConfig { get; set; }
  • Type: object

Property instanceLifecycleConfig: The configuration of the instance lifecycle function.


InstanceSoftConcurrencyOptional

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.


InstanceTypeOptional

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


MemorySizeOptional

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.


TimeoutOptional

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.