Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Description of the function Field

Updated on 2023-10-19 GMT+08:00

function Field

Table 1 Description of the function field

Parameter Name

Required

Type

Description

functionName

True

String

Function name

handler

True

String

Handler of the function in the format of "xx.xx". It must contain a period (.).

runtime

True

String

Runtime

package

False

String

Package (or group) to which the function belongs. Default: default

memorySize

True

Number

Memory size (MB) allocated to the function. The options include 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, and 4096.

timeout

True

Number

Timeout duration the function can be executed. Value range: 3s–900s.

Code Type

True

String

Function code type

codeUrl

False

String

If CodeType is set to obs, enter the OBS URL of the function code package. If CodeType is not set to obs, leave this parameter blank.

environmentVariables

False

Struct

Environment variable. A maximum of 20 environment variables can be defined. The total length cannot exceed 4 KB.

agencyName

False

String

Name of an agency created in Identity and Access Management (IAM). This is required when the function needs to access other services.

vpcId

False

String

Specifies the unique VPC (Virtual Private Cloud) ID. During configuration, agencyName is required. You can log in to the VPC Console to view the VPC ID.

subnetId

False

String

Subnet ID. agencyName is required when this parameter is set. To obtain the subnet ID, log in to the VPC Subnet page.

dependVersionList

False

List<String>

Dependency package ID

code

False

Struct

Local code address, which is required if CodeType is set to zip.

concurrency

False

Number

Maximum number of instances in which a function can run. Range: –1 to +1000. –1: The function can run in any number of instances. 0: The function is disabled.

concurrentNum

False

Number

Maximum number of concurrent requests per instance. Range: –1 to +1000

description

False

String

Brief description of a function

Example:
function:
  functionName: event-function
  description: this is a test
  runtime: Node.js14.18
  handler: index.handler
  memorySize: 128
  timeout: 60
  code: 
    codeUri: ./code
  environmentVariables:
    test: 123
    hello: world

runtime

Currently, the runtime supports the following versions:

  • Node.js 14.18, Node.js 12.13, Node.js 10.16, Node.js 8.10, Node.js 6, Node.js 4.4
  • Python 3.9, Python 3.6, Python 2.7
  • Java 11, Java 8
  • Go 1.x, Go 1.8
  • PHP 7.3
  • HTTP
  • Custom

Code Type

Supported code types:

  • inline: inline code
  • zip: ZIP file
  • obs: function code stored in an OBS bucket
  • jar: JAR file, mainly for Java functions

Func Code

Table 2 Func Code parameters

Parameter Name

Required

Type

Description

codeUri

True

String

Local code address

Environment Variables

Object format. For example:
DB_connection: jdbc:mysql://ip:port/dbname

Do not write sensitive information to s.yaml in plaintext.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback