All Products
Search
Document Center

General data structures

Last Updated: May 19, 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 invocation. Valid values:

  • Preparing: The acceleration is being prepared. When the acceleration is being prepared, an original image is used for function invocation without acceleration.
  • Ready: The acceleration is complete. After the acceleration is complete, function invocation is accelerated.

CertConfig

The configuration of the HTTPS certificate.

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, you must enter multiple certificates in sequence.

privateKey

String

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

The private key.

Code

The error code returned.

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, you can use custom container images to execute functions.

Parameter

Type

Example

Description

args

String

["-arg1", "value1"]

The startup parameters of the container.

command

String

["/code/myserver"]

The command to start the container.

image

String

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

The URL of the container image.

accelerationType

String

Default

Indicates whether to enable image pull acceleration. Valid values:

  • Default: enables image pull acceleration.
  • None: disables image pull acceleration. Default value: None.

CustomContainerConfigInfo

The configuration of the custom container in the response.

Parameter

Type

Example

Description

args

String

["-arg1", "value1"]

The startup parameters of the container.

command

String

["/code/myserver"]

The command to start the container.

image

String

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

The URL of the container image.

accelerationType

String

Default

Indicates whether to enable image pull acceleration. Valid values:

  • Default: enables image pull acceleration.
  • None: disables image pull acceleration. Default value: None.

accelerationInfo

AccelerationInfo

The information about the acceleration of the custom container.

DestinationConfig

The configuration of the destination for 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 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 layer structure returned.

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 must be 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 structure of 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 monitor metrics for each request. If you enable this feature, you can view the time and memory consumed for a specific invocation of each function in the service.

  • false: disables monitoring of metrics for each request.
  • true: enables monitoring of metrics for each request. Default value: true.

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

An array that consists of the information of mount points.

mountDir

String

/home/test

The on-premises 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 function name that corresponds to the domain name.

methods

Array of String

GET

The request method of the domain name.

path

String

/login/*

The request method 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 is created.

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

An array that consists of the information 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 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 enables 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.