huawei-cloud-functiongraph-function-create
БесплатноБез исполняемых скриптовНе проверенCreate and invoke FunctionGraph functions on Huawei Cloud. Supports VPC configuration, environment variables, synchronous and asynchronous function…
от huaweicloudskill558 установок в других каталогахОб этом скилле
FunctionGraph Function Creation & Invocation Skill
Overview
This skill manages FunctionGraph functions on Huawei Cloud, supporting creation with advanced configuration (VPC, environment variables) and function invocation (sync/async).
Architecture: Uses Huawei Cloud FunctionGraph Python SDK to interact with FunctionGraph service.
Applicable Scenarios:
- Quickly create cloud functions without manual console login
- Batch creation of multiple functions with VPC or environment variable configuration
- Foundation component for workflow deployment
- CI/CD integration for function deployment
- Invoke and test deployed functions
Typical Use Cases:
- "Create a Python function named my_handler"
- "Deploy this code to FunctionGraph with VPC configuration"
- "Create a function with environment variables"
- "Invoke the function I just created"
Prerequisites
1. Python Environment
- Python 3.9+
- Verify:
python --version
2. SDK Installation
pip install huaweicloudsdkfunctiongraph
3. Authentication Configuration
- Valid Huawei Cloud credentials (AK/SK mode)
- Configure via environment variables:
export HUAWEI_AK="your-access-key"
export HUAWEI_SK="your-secret-key"
export HUAWEI_REGION="cn-north-4"
export HUAWEI_PROJECT_ID="your-project-id"
Security Rules:
- NEVER expose AK/SK values in code or logs
- NEVER let users input AK/SK directly in conversation
- ALWAYS use environment variables for credentials
- Recommend using IAM user instead of main account
4. IAM Permission Requirements
functiongraph:function:create- Create functionfunctiongraph:function:get- Query function detailsfunctiongraph:function:list- List functionsfunctiongraph:function:invoke- Invoke function
See IAM Policies for detailed permission configuration.
Workflow
User Request → Parse Parameters → Validate Input
→ Create Function (with optional VPC/Env Vars) → Return Function URN
→ (Optional) Invoke Function → Return Invocation Result
Usage
Create a Function
cd scripts
# Basic creation
python create_function.py create \
--name my_function \
--runtime Python3.9 \
--handler index.handler \
--code main.py
# With VPC configuration
python create_function.py create \
--name my_function \
--runtime Python3.9 \
--handler index.handler \
--code main.py \
--vpc-id vpc-xxx \
--subnet-id subnet-xxx \
--security-group-id sg-xxx
# With environment variables
python create_function.py create \
--name my_function \
--runtime Python3.9 \
--handler index.handler \
--code main.py \
--env-vars '{"DB_HOST":"localhost","DB_PORT":"3306"}'
# Full configuration
python create_function.py create \
--name my_function \
--runtime Python3.9 \
--handler index.handler \
--code main.py \
--memory 256 \
--timeout 30 \
--description "My production function" \
--vpc-id vpc-xxx \
--subnet-id subnet-xxx \
--security-group-id sg-xxx \
--env-vars '{"DEBUG":"true","LOG_LEVEL":"info"}'
Invoke a Function
Note: The function URN uses the real FunctionGraph URN prefix
urn:fss:. ReplacePROJECT_IDin the examples below with your actual project ID (the same value as theHUAWEI_PROJECT_IDenvironment variable). The function package isdefaultand the version islatest(or a specific version/alias). You can copy the URN returned by thecreatecommand and append:latestfor invocation.
# Synchronous invocation (default)
python create_function.py invoke \
--function-urn urn:fss:cn-north-4:PROJECT_ID:function:default:my_function:latest \
--body '{"key1":"value1","source":"test"}'
# Asynchronous invocation
python create_function.py invoke \
--function-urn urn:fss:cn-north-4:PROJECT_ID:function:default:my_function:latest \
--body '{"async":true}' \
--invocation-type async
# Invoke with log tail (returns last 4KB of log)
python create_function.py invoke \
--function-urn urn:fss:cn-north-4:PROJECT_ID:function:default:my_function:latest \
--body '{"test":"data"}' \
--log-type tail
Parameter Confirmation
Create Parameters
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
--name |
Required | Function name, must follow naming rules | - |
--runtime |
Required | Runtime environment (Python3.9, etc.) | - |
--handler |
Required | Function entry point (e.g., index.handler) | - |
--code |
Required | Code file path or inline code content | - |
--memory |
Optional | Memory size in MB | 128 |
--timeout |
Optional | Timeout in seconds | 3 |
--description |
Optional | Function description | - |
--vpc-id |
Optional | VPC ID for VPC configuration (must be set together with --subnet-id and --security-group-id) |
- |
--subnet-id |
Optional | Subnet ID for VPC configuration (must be set together with `- |
Установить huawei-cloud-functiongraph-function-create в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-functiongraph-function-create?
Create and invoke FunctionGraph functions on Huawei Cloud. Supports VPC configuration, environment variables, synchronous and asynchronous function invocation. Use this skill when users ask to create, deploy, upload, or invoke cloud functions, serverless functions, or FunctionGraph functions. Triggered by keywords like "create function", "deploy function", "upload function", "invoke function", "create cloud function", "创建函数", "部署函数", "上传函数", "调用函数", "创建云函数", "FunctionGraph function", "serverless function", "function invocation".
Как установить скилл huawei-cloud-functiongraph-function-create?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-functiongraph-function-create запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub