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{},
    DisableOndemand: interface{},
    DiskSize: interface{},
    EnvironmentVariables: interface{},
    GpuConfig: interface{},
    InstanceConcurrency: interface{},
    InstanceIsolationMode: interface{},
    InstanceLifecycleConfig: interface{},
    InternetAccess: interface{},
    Layers: interface{},
    LogConfig: interface{},
    MemorySize: interface{},
    NasConfig: interface{},
    OssMountConfig: interface{},
    Role: interface{},
    SessionAffinity: interface{},
    SessionAffinityConfig: interface{},
    Tags: *[]github.com/alibabacloud-go/ros-cdk/alicloudroscdkfc3.RosFunction.TagsProperty,
    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.
DisableOndemand interface{} Property disableOndemand: Whether to disable the creation of on-demand instances.
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.
InstanceIsolationMode interface{} Property instanceIsolationMode: Instance isolation mode.
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.
SessionAffinity interface{} Property sessionAffinity: The session affinity policy for Function Compute requests.
SessionAffinityConfig interface{} Property sessionAffinityConfig: Session affinity configuration.
Tags *[]TagsProperty Property tags: Tags to attach to function.
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.


DisableOndemandOptional

DisableOndemand interface{}
  • Type: interface{}

Property disableOndemand: Whether to disable the creation of on-demand instances.

When enabled, on-demand instances will not be created, and only reserved instances can be used.


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.


InstanceIsolationModeOptional

InstanceIsolationMode interface{}
  • Type: interface{}

Property instanceIsolationMode: Instance isolation mode.


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.


SessionAffinityOptional

SessionAffinity interface{}
  • Type: interface{}

Property sessionAffinity: The session affinity policy for Function Compute requests.

Set to MCP_SSE to implement MCP SSE protocol request affinity. Set to GENERATED_COOKIE for cookie-based affinity. Set to HEADER_FIELD for header-based affinity. If not set or set to NONE, there is no affinity effect, and requests are routed according to the default scheduling policy of Function Compute.


SessionAffinityConfigOptional

SessionAffinityConfig interface{}
  • Type: interface{}

Property sessionAffinityConfig: Session affinity configuration.


TagsOptional

Tags *[]TagsProperty

Property tags: Tags to attach to function.

Max support 20 tags to add during create function. Each tag with two properties Key and Value, and Key is required.


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.