检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
For details, see (Optional) Binding a Custom Domain Name.
Deploying an MCP Server Using FunctionGraph What Is MCP Server? Model Context Protocol (MCP) is an open-source protocol that aims to provide context information to large language models (LLMs) in a standardized manner.
200 OK 400 Bad request. 401 Unauthorized. 403 Forbidden. 404 Not found. 500 Internal server error.
Content-Type Yes String Message body type (format). Table 3 Request body parameters Parameter Mandatory Type Description content Yes String Test event content, which is a Base64-encoded JSON character string.
ctx.response.status = 200; } }; app.use(main); app.listen(8000, '127.0.0.1'); console.log('Node.js web server at port 8000 is running..') Create a bootstrap file. Compress the project files and the bootstrap file into a ZIP package.
Container image-based function When creating an event function, create an HTTP server to implement a handler (method: POST, path: /invoke) and an initializer (method: POST, path: /init).
Figure 1 Initializing a custom model In the Initialize Custom Model dialog box, set the following parameters: VPC: Select vpc-fg (192.168.x.x/16). Subnet: Select subnet-fg (192.168.x.x/24). File System Type: Select SFS Turbo. File System: Select sfs-turbo-fg.
The following is a code example: const http = require('http'); // Import Node.js core module var server = http.createServer(function (req, res) { //create web server res.writeHead(200, { 'Content-Type': 'text/html' }); res.write('<html><body><h2>This is http function.
Minimum: 0 Maximum: 64 end_time String Flow instance end time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ. Minimum: 0 Maximum: 64 last_update_time String Flow instance last update time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ.
Content-Type Yes String Message body type (format). Response Parameters Status code: 200 Table 3 Response body parameters Parameter Type Description id String Test event ID. name String Test event name. content String Test event content. last_modified Number Last update time.
Content-Type Yes String Message body type (format).
Selecting a KMS key Select the enabled customer master key (CMK). If no key is available, create one by referring to Creating a Custom Key. CAUTION: Do not delete the CMK used for function encryption in DEW.
values: Java8 Java11 Node.js6.10 Node.js8.10 Node.js10.16 Node.js12.13 Node.js14.18 Node.js16.17 Node.js18.15 Python2.7 Python3.6 Python3.10 Go1.x C#(.NET Core 2.1) C#(.NET Core 3.1) Custom PHP7.3 Python3.9 http Custom Image Cangjie1.0 code_type String Function code type.
Content-Type Yes String Message body type (format).
Array Length: 0 - 200 id Yes String Node ID, which must be unique in the flow. Minimum: 0 Maximum: 64 name Yes String Node name. Minimum: 1 Maximum: 256 type Yes String Node type.
Content-Type Yes String Message body type (format). Response Parameters Status code: 200 Table 3 Response body parameters Parameter Type Description state String Snapshot status. code String Snapshot response code.
Content-Type Yes String Message body type (format).
Array Length: 0 - 200 id String Node ID, which must be unique in the flow. Minimum: 0 Maximum: 64 name String Node name. Minimum: 1 Maximum: 256 type String Node type.
Content-Type Yes String Message body type (format). Response Parameters Status code: 200 Table 3 Response body parameters Parameter Type Description [items] Array of ListVersionAliasResult objects Function versions and aliases.
Content-Type Yes String Message body type (format).