Skip to content

FunctionProps

Properties for defining a Function.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-fc3-function

Initializer

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkfc3"
&alicloudroscdkfc3.FunctionProps {
    FunctionName: interface{},
    Handler: interface{},
    Runtime: interface{},
    Code: interface{},
    Cpu: interface{},
    CustomContainerConfig: interface{},
    CustomDns: interface{},
    CustomRuntimeConfig: interface{},
    Description: interface{},
    DiskSize: interface{},
    EnvironmentVariables: interface{},
    GpuConfig: interface{},
    InstanceConcurrency: interface{},
    InstanceLifecycleConfig: interface{},
    InternetAccess: interface{},
    Layers: interface{},
    LogConfig: interface{},
    MemorySize: interface{},
    NasConfig: interface{},
    OssMountConfig: interface{},
    Role: interface{},
    Timeout: interface{},
    TracingConfig: interface{},
    VpcConfig: interface{},
}

Properties

Name Type Description
FunctionName interface{} Property functionName: The name of the function.
Handler interface{} Property handler: The handler of the function.
Runtime interface{} Property runtime: The programming language of the function.
Code interface{} Property code: Function code ZIP package.
Cpu interface{} Property cpu: The CPU size of the function in vCPU as a multiple of 0.05 vCPU. The minimum value is 0.05 and the maximum value is 16. At the same time, the ratio of cpu to memorySize (in GB) should be between 1:1 and 1:4.
CustomContainerConfig interface{} Property customContainerConfig: Custom container configuration.
CustomDns interface{} Property customDns: Custom DNS configuration.
CustomRuntimeConfig interface{} Property customRuntimeConfig: Custom runtime configuration.
Description interface{} Property description: Function description.
DiskSize interface{} Property diskSize: The disk size of the function, in MB.
EnvironmentVariables interface{} Property environmentVariables: The environment variables of the function.
GpuConfig interface{} Property gpuConfig: The GPU configuration of the function.
InstanceConcurrency interface{} Property instanceConcurrency: The maximum number of concurrent instances of the function.
InstanceLifecycleConfig interface{} Property instanceLifecycleConfig: The instance lifecycle configuration of the function.
InternetAccess interface{} Property internetAccess: Whether the function can access the Internet.
Layers interface{} Property layers: The layers of the function.
LogConfig interface{} Property logConfig: The log configuration of the function.
MemorySize interface{} Property memorySize: The memory size of the function, in MB.
NasConfig interface{} Property nasConfig: The NAS configuration of the function.
OssMountConfig interface{} Property ossMountConfig: The OSS mount configuration of the function.
Role interface{} Property role: The user is authorized to the RAM role of Function Compute.
Timeout interface{} Property timeout: The timeout of the function.
TracingConfig interface{} Property tracingConfig: The tracing configuration of the function.
VpcConfig interface{} Property vpcConfig: The VPC configuration of the function.

FunctionNameRequired

FunctionName interface{}
  • Type: interface{}

Property functionName: The name of the function.


HandlerRequired

Handler interface{}
  • Type: interface{}

Property handler: The handler of the function.


RuntimeRequired

Runtime interface{}
  • Type: interface{}

Property runtime: The programming language of the function.


CodeOptional

Code interface{}
  • Type: interface{}

Property code: Function code ZIP package.

Choose one of Code and CustomContainerConfig.


CpuOptional

Cpu interface{}
  • Type: interface{}

Property cpu: The CPU size of the function in vCPU as a multiple of 0.05 vCPU. The minimum value is 0.05 and the maximum value is 16. At the same time, the ratio of cpu to memorySize (in GB) should be between 1:1 and 1:4.


CustomContainerConfigOptional

CustomContainerConfig interface{}
  • Type: interface{}

Property customContainerConfig: Custom container configuration.

Choose one of Code and CustomContainerConfig.


CustomDnsOptional

CustomDns interface{}
  • Type: interface{}

Property customDns: Custom DNS configuration.


CustomRuntimeConfigOptional

CustomRuntimeConfig interface{}
  • Type: interface{}

Property customRuntimeConfig: Custom runtime configuration.


DescriptionOptional

Description interface{}
  • Type: interface{}

Property description: Function description.


DiskSizeOptional

DiskSize interface{}
  • Type: interface{}

Property diskSize: The disk size of the function, in MB.


EnvironmentVariablesOptional

EnvironmentVariables interface{}
  • Type: interface{}

Property environmentVariables: The environment variables of the function.


GpuConfigOptional

GpuConfig interface{}
  • Type: interface{}

Property gpuConfig: The GPU configuration of the function.


InstanceConcurrencyOptional

InstanceConcurrency interface{}
  • Type: interface{}

Property instanceConcurrency: The maximum number of concurrent instances of the function.


InstanceLifecycleConfigOptional

InstanceLifecycleConfig interface{}
  • Type: interface{}

Property instanceLifecycleConfig: The instance lifecycle configuration of the function.


InternetAccessOptional

InternetAccess interface{}
  • Type: interface{}

Property internetAccess: Whether the function can access the Internet.


LayersOptional

Layers interface{}
  • Type: interface{}

Property layers: The layers of the function.


LogConfigOptional

LogConfig interface{}
  • Type: interface{}

Property logConfig: The log configuration of the function.


MemorySizeOptional

MemorySize interface{}
  • Type: interface{}

Property memorySize: The memory size of the function, in MB.


NasConfigOptional

NasConfig interface{}
  • Type: interface{}

Property nasConfig: The NAS configuration of the function.


OssMountConfigOptional

OssMountConfig interface{}
  • Type: interface{}

Property ossMountConfig: The OSS mount configuration of the function.


RoleOptional

Role interface{}
  • Type: interface{}

Property role: The user is authorized to the RAM role of Function Compute.

After setting, Function Compute will assume the role and generate temporary access credentials. The temporary access credentials of this role can be used in functions to access specified Alibaba Cloud services, such as OSS and OTS.


TimeoutOptional

Timeout interface{}
  • Type: interface{}

Property timeout: The timeout of the function.


TracingConfigOptional

TracingConfig interface{}
  • Type: interface{}

Property tracingConfig: The tracing configuration of the function.


VpcConfigOptional

VpcConfig interface{}
  • Type: interface{}

Property vpcConfig: The VPC configuration of the function.