All Products
Search
Document Center

Common data structures

Last Updated: Nov 18, 2021

AccelerationInfo

The information about the acceleration of the custom container.

Parameter

Type

Example

Description

status

String

Preparing

The status of the acceleration for function invocations. Valid values:

  • Preparing: The acceleration is being prepared. When the acceleration is being prepared, an original image is used for function invocations without acceleration.

  • Ready: Function invocations are accelerated.

CertConfig

The configuration of the certificate used for HTTPS.

Parameter

Type

Example

Description

certName

String

/login/

The name of the certificate, which can be customized.

certificate

String

-----BEGIN CERTIFICATE----- xxxxx -----END CERTIFICATE-----

The certificate. To configure a certificate chain, specify multiple certificates in sequence.

privateKey

String

-----BEGIN RSA PRIVATE KEY----- xxxxx -----END RSA PRIVATE KEY-----

The private key.

Code

The error code.

Parameter

Type

Example

Description

ossBucketName

String

test-bucket

The name of the Object Storage Service (OSS) bucket that stores the ZIP package of the function code.

ossObjectName

String

test-object

The name of the OSS object that stores the ZIP package of the function code.

zipFile

String

samplecode

The function code that is encoded in Base64.

CustomContainerConfig

The configuration of the custom container. After you configure the custom container, Function Compute can execute functions in a container created from a custom image.

Parameter

Type

Example

Description

args

String

["-arg1", "value1"]

The startup arguments of the container.

command

String

["/code/myserver"]

The command to be run to start the container.

image

String

registry-vpc.cn-hangzhou.aliyuncs.com/fc-demo/helloworld:v1beta1

The URL of the image from which the container is created.

accelerationType

String

Default

Specifies whether to accelerate the process of pulling images. Valid values:

  • Default: accelerates the process of pulling images.

  • None: does not accelerate the process of pulling images. This is the default value.

instanceID

String

cri-xxxxxx

The ID of the Container Registry Enterprise Edition instance. If you select an Enterprise Edition instance for the image from which the container is created, you must add the instance ID. The default resolution of the instance must be the IP address of the VPC for the instance. Alibaba Cloud DNS PrivateZone cannot be used for domain name resolution.

CustomContainerConfigInfo

The configuration of the custom container in the response.

Parameter

Type

Example

Description

args

String

["-arg1", "value1"]

The startup arguments of the container.

command

String

["/code/myserver"]

The command to be run to start the container.

image

String

registry-vpc.cn-hangzhou.aliyuncs.com/fc-demo/helloworld:v1beta1

The URL of the image from which the container is created.

accelerationType

String

Default

Indicates whether the process of pulling images is accelerated. Valid values:

  • Default: The process of pulling images is accelerated.

  • None: The process of pulling images is not accelerated. This is the default value.

accelerationInfo

AccelerationInfo

The information about the acceleration of the custom container.

DestinationConfig

The configuration of the destination for an asynchronous invocation.

Parameter

Type

Example

Description

onFailure

Object

The destination for a failed asynchronous invocation.

destination

String

acs:fc:cn-hangzhou:1986****43:services/service_name.alias/functions/testHelloWorld

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

onSuccess

Object

The destination for a successful asynchronous invocation.

destination

String

acs:mns:cn-shanghai:1986****43:/queues/queue_name/messages

The ARN of the destination.

Error

The error information.

Parameter

Type

Example

Description

errorCode

String

InvalidArgument

The error code returned by Function Compute. For more information, see Error codes.

errorMessage

String

%s

The error message returned by Function Compute. For more information, see Error codes.

Layer

The information about the layer in the response.

Parameter

Type

Example

Description

layerName

String

Layer-name

The name of the layer.

version

Integer

1

The version of the layer.

description

String

Layer-description

The description of the layer.

code

LayerCode

The code of the function. The code is packaged into a ZIP file.

codeSize

Long

421

The size of the function code package returned by the system. Unit: bytes.

codeChecksum

String

2825179536350****

The checksum of the layer code.

createTime

String

2020-11-11T11:08:00Z

The time when the layer was created.

acl

Integer

0

The access mode of the layer.

compatibleRuntime

Array of String

python3

The runtime environment compatible with the layer.

arn

String

02f81d283888f5ec63442a88fe82b260#Layer-name#1

The name of the layer resource.

LayerCode

The information about the layer code.

Parameter

Type

Example

Description

repositoryType

String

OSS

The type of the layer code.

location

String

https://xyz.oss-cnxxx.aliyuncs.com/xxx/xxx/xxx

The location of the layer code.

LogConfig

The log configuration, which specifies a Logstore to store function execution logs.

Parameter

Type

Example

Description

logstore

String

test_logstore

The name of the Logstore in Log Service.

project

String

test_project

The name of the project in Log Service.

enableRequestMetrics

Boolean

true

Specifies whether to enable collection of request-level metrics. If you enable this feature, you can view the amount of time and memory consumed for a specific invocation of each function in the service.

  • false: disables collection of request-level metrics.

  • true: enables collection of request-level metrics. This is the default value.

logBeginRule

String

DefaultRegex

The log splitting rule. The log is split based on the rule. The log blocks obtained after the splitting are written to Log Service.

None: disables the log splitting rule. This is the default value.

DefaultRegex: sets the log splitting rule to the default regular expression. If you set this parameter to DefaultRegex, the default log splitting rule splits the log based on whether a line in the log contains a date. For example, the line that contains 2021-10-10 in the log is considered the first line of a log block. The first line and the following consecutive lines that do not contain dates in the log are written to Log Service as a whole.

NASConfig

The configuration of the Apsara File Storage NAS file system, which allows functions in the specified service in Function Compute to access the NAS file system.

Parameter

Type

Example

Description

groupId

String

100

The ID of the group.

mountPoints

Array

The mount targets.

mountDir

String

/home/test

The local mount directory.

serverAddr

String

***-uni85.cn-hangzhou.nas.aliyuncs.com:/

The address of the NAS server.

userId

String

100

The ID of the account.

PathConfig

The single routing rule for a custom domain name.

Parameter

Type

Example

Description

functionName

String

function_name

The name of the function that corresponds to the domain name.

methods

Array of String

GET

The request method of the domain name.

path

String

/login/*

The request path of the domain name.

qualifier

String

test

The version or alias of the service in Function Compute.

serviceName

String

service_name

The name of the service where the function that corresponds to the domain name resides.

RouteConfig

The configuration of the route table. The route table maps paths to functions when the functions are invoked by using custom domain names.

Parameter

Type

Example

Description

routes

Array of PathConfig

The array of routes.

TracingConfig

The configuration of Tracing Analysis. After you configure Tracing Analysis for a service in Function Compute, you can record the execution duration of a request, view the amount of the cold start time for a function, and record the execution duration of a function. For more information, see Overview.

Parameter

Type

Example

Description

type

String

Jaeger

The type of the tracing system.

params

Map

The parameters that are used in tracing. Example: {"endpoint":"tracing_analysis_jaeger_endpoint"}.

VPCConfig

The Virtual Private Cloud (VPC) configuration, which allows a function to access the specified VPC.

Parameter

Type

Example

Description

securityGroupId

String

sg_bp18hj1wtxgy3***

The ID of the security group.

vSwitchIds

Array of String

vsw_***

The ID of the vSwitch.

vpcId

String

vpc_***

The ID of the VPC.