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

Configuring Dependency Packages

Updated on 2023-11-21 GMT+08:00

Overview

Generally, the code of a function consists of public libraries and service logic. The public libraries can be packaged as a dependency and shared among functions, reducing the size of the function code package for easy deployment and update.

FunctionGraph also provides some public dependencies, which are cached internally for quick loading. These dependencies are recommended.

FunctionGraph enables you to manage dependencies in a unified manner. You can upload dependencies from a local path, or through OBS if they are too large, and specify names for them. Dependencies can be iterated. Each dependency can have multiple versions.

For details, see How Do I Create Function Dependencies?

NOTE:
  • The name of each file in the dependency package cannot end with a tilde (~).
  • A dependency package can contain up to 30,000 files.
  • If your function uses a large private dependency, increase the execution timeout by choosing Configuration > Basic Settings on the function details page.

Creating a Dependency

  1. Log in to the FunctionGraph console, and choose Functions > Dependencies in the navigation pane.
  2. Click Create Dependency.
  3. Set the following parameters:

    Table 1 Dependency configuration parameters

    Parameter

    Description

    Name

    Dependency name.

    Code Entry Mode

    Upload a ZIP file directly or upload a file from OBS.

    • Upload ZIP: Click Select File to upload one.
    • Upload from OBS: Specify an OBS link URL.

    Runtime

    Select a runtime.

    Description

    Description of the dependency. This parameter is optional.

  4. Click OK. By default, a new dependency is version 1.
  5. Click the dependency name, and view all versions and related information on the displayed page. Each dependency can have multiple versions.

    • To create a dependency version, click Create Version in the upper right corner of the page.
    • To view the address of a version, click the version.
    • To delete a version, click the delete icon in the same row.

Configuring Dependencies for a Function

  1. Return to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click the name of the desired function.
  3. On the displayed function details page, click the Code tab, click Add in the Dependencies area.
  4. On the displayed Select Dependency dialog box, select dependencies and click OK.

    Table 2 Dependency configuration

    Parameter

    Description

    Runtime

    Runtime of this function. It cannot be changed.

    Type

    Add a Public or Private dependency.

    Name

    Select a dependency.

    Version

    Select a version to be added.

    NOTE:
    • You can add a maximum of 20 dependencies for a function.
    • Except your private dependencies, FunctionGraph provides some public dependencies, which you can choose when creating a function.

Deleting a Dependency

To delete a dependency, just delete all of its versions.

  1. Return to the FunctionGraph console, and choose Functions > Dependencies in the navigation pane.
  2. Click the name of the target dependency to go to the Versions page.
  3. Click the delete icon in the row of a version. Repeat this operation if the dependency has multiple versions.

    Figure 1 Deleting a dependency version
    NOTE:

    Dependencies referenced by functions cannot be deleted.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback