From 1511a40e7785a5c12c60783379a44e42c358e6b0 Mon Sep 17 00:00:00 2001 From: MonikaJassova Date: Mon, 5 Oct 2026 13:27:13 +0000 Subject: [PATCH] docs fixes and improvements --- .../devguide/bestpractices/performance.rst | 2 +- .../concepts/credentials/transferringKeys.rst | 2 +- .../dependencies/packagingDependencies.rst | 2 +- .../devguide/deployment/terraform/setuptf.rst | 6 ++--- .../devguide/dev_environment/_index.rst | 2 +- .../event_function/scratch/_index.rst | 4 ++-- .../event_function/scratch/context.rst | 2 +- .../event_function/scratch/project.rst | 4 ++-- .../event_function/trigger_events/_index.rst | 6 ++--- .../trigger_events/trigger_cts_event.rst | 2 +- .../http_function/container/creating.rst | 8 +++---- doc/source/devguide/invoke/invoke_api.rst | 23 +++++++++++++++---- doc/source/devguide/invoke/invoke_fg_aksk.rst | 2 +- .../devguide/invoke/invoke_fg_token.rst | 2 +- samples-doc/deploy-from-obs/README.md | 2 +- samples-doc/deploy-from-zip/README.md | 2 +- .../invoke-fg2fg/curl_AKSK/composer.json | 2 +- .../invoke-fg2fg/guzzle_AKSK/composer.json | 2 +- 18 files changed, 45 insertions(+), 30 deletions(-) diff --git a/doc/source/devguide/bestpractices/performance.rst b/doc/source/devguide/bestpractices/performance.rst index 4e7cf0e..042ff1a 100644 --- a/doc/source/devguide/bestpractices/performance.rst +++ b/doc/source/devguide/bestpractices/performance.rst @@ -87,7 +87,7 @@ Once a reserved instance is created, it will automatically load the function's c and the initialization entry function, and persist in the environment. Therefore, configuring a reserved instance for a function can avoid latency issues caused by cold starts. For configuration instructions on reserved instances for functions, please refer to -Reserved Instance Management. +:docs_otc:`Reserved Instance Management `. Use function initialization entry point --------------------------------------------------------------- diff --git a/doc/source/devguide/concepts/credentials/transferringKeys.rst b/doc/source/devguide/concepts/credentials/transferringKeys.rst index 188f559..10a4a42 100644 --- a/doc/source/devguide/concepts/credentials/transferringKeys.rst +++ b/doc/source/devguide/concepts/credentials/transferringKeys.rst @@ -24,7 +24,7 @@ To obtain the Security Access Key (AK), Security Secret Key (SK), and Security Token of an HTTP function as shown in Table 1, perform the following steps: -1. Log in to the :fg_console:`FunctionGraph console <>` console and go +1. Log in to the :fg_console:`FunctionGraph console <>` and go to the details page of the HTTP function to be configured 2. Choose **Configuration** > **Permissions** and specify diff --git a/doc/source/devguide/concepts/dependencies/packagingDependencies.rst b/doc/source/devguide/concepts/dependencies/packagingDependencies.rst index d09556c..954d963 100644 --- a/doc/source/devguide/concepts/dependencies/packagingDependencies.rst +++ b/doc/source/devguide/concepts/dependencies/packagingDependencies.rst @@ -40,5 +40,5 @@ The following uses **PHP 8.3** as an example to describe how to create a **fg_ev make create_package -6. Deploy the dependency package to FunctionGraph as described in :otc_fg_umn:`Configuring Dependency Packages ` +6. Deploy the dependency package to FunctionGraph as described in :otc_fg_umn:`Configuring Dependency Packages `. diff --git a/doc/source/devguide/deployment/terraform/setuptf.rst b/doc/source/devguide/deployment/terraform/setuptf.rst index 56f8219..80e53a8 100644 --- a/doc/source/devguide/deployment/terraform/setuptf.rst +++ b/doc/source/devguide/deployment/terraform/setuptf.rst @@ -44,15 +44,15 @@ Set following environment variables: * - TF_VAR_OTC_SDK_DOMAIN_NAME - Domain Name - - see: :api_usage:`Obtaining the Domain Name and Domain ID` in API usage guide. + - see: :api_usage:`Obtaining the Domain Name and Domain ID` in API usage guide. * - TF_VAR_OTC_SDK_PROJECTID - Project Id - - see: :api_usage:`Obtaining a Project ID` in API usage guide. + - see: :api_usage:`Obtaining a Project ID` in API usage guide. * - TF_VAR_OTC_SDK_PROJECTNAME - Project name - - see: :api_usage:`Obtaining a Project ID` in API usage guide. + - see: :api_usage:`Obtaining a Project ID` in API usage guide. * - TF_VAR_OTC_IAM_ENDPOINT - IAM endpoint URL diff --git a/doc/source/devguide/dev_environment/_index.rst b/doc/source/devguide/dev_environment/_index.rst index 790efeb..a36782f 100644 --- a/doc/source/devguide/dev_environment/_index.rst +++ b/doc/source/devguide/dev_environment/_index.rst @@ -26,7 +26,7 @@ Install PHP To build and run the PHP runtime for FunctionGraph, you need to install PHP. The PHP version depends on the version of the PHP runtime you are using when deploying your functions. -You can download PHP from the official website: `https://www.php.net/downloads.php` +You can download PHP from `the official website `_. Install an IDE --------------------------------- diff --git a/doc/source/devguide/event_function/scratch/_index.rst b/doc/source/devguide/event_function/scratch/_index.rst index a31372c..4062967 100644 --- a/doc/source/devguide/event_function/scratch/_index.rst +++ b/doc/source/devguide/event_function/scratch/_index.rst @@ -101,7 +101,7 @@ You can access the value of **order_id** by using the following code: $order_id = $event["order_id"]; // Using bracket notation // or - $order_id = $event->order_id; // Using dot notation + $order_id = $event->order_id; // Using object notation For example: @@ -111,7 +111,7 @@ For example: function handler($event, $context) { $order_id = $event["order_id"]; // Using bracket notation // or - $order_id = $event->order_id; // Using dot notation + $order_id = $event->order_id; // Using object notation $amount = $event["amount"]; $item = $event["item"]; diff --git a/doc/source/devguide/event_function/scratch/context.rst b/doc/source/devguide/event_function/scratch/context.rst index 0274b0d..c170ab2 100644 --- a/doc/source/devguide/event_function/scratch/context.rst +++ b/doc/source/devguide/event_function/scratch/context.rst @@ -21,7 +21,7 @@ Context interface * - getRequestID() - Obtains a request ID. - * - getRemainingTimeInMilliSeconds () + * - getRemainingTimeInMilliSeconds() - Obtains the remaining time in milliseconds. * - getAccessKey() diff --git a/doc/source/devguide/event_function/scratch/project.rst b/doc/source/devguide/event_function/scratch/project.rst index 5fb470c..fe01867 100644 --- a/doc/source/devguide/event_function/scratch/project.rst +++ b/doc/source/devguide/event_function/scratch/project.rst @@ -124,7 +124,7 @@ Create FunctionGraph function in console 7. Modify the initializer (if needed): 1. Click **Configuration** > **Lifecycle**. - 2. enable **Initialization** + 2. Enable **Initialization** 3. In the **Function Initializer** field, enter the initializer **src/index.initializer**. 4. Click **Save**. @@ -143,7 +143,7 @@ Testing the function 2. Click **Create** to save the test event. 3. Click **Test** to test the function. -4. the Execution Result window is displayed on the right. +4. The Execution Result window is displayed on the right. You can check whether the function is executed successfully. .. image:: ./scratch_event_function_test.png diff --git a/doc/source/devguide/event_function/trigger_events/_index.rst b/doc/source/devguide/event_function/trigger_events/_index.rst index 2933471..81462b6 100644 --- a/doc/source/devguide/event_function/trigger_events/_index.rst +++ b/doc/source/devguide/event_function/trigger_events/_index.rst @@ -77,7 +77,7 @@ invoked whenever the corresponding event is detected. For instructions on triggering and using the distributed messaging Kafka, please refer to: - - Use :ref:`Kafka triggers `. + - Using :ref:`Kafka triggers `. - Using :ref:`open-source Kafka triggers ` * - Log Tank Service (LTS) @@ -129,7 +129,7 @@ For example, to use the Timer Event trigger, you can use following composer.json "Makefile", "resources/**", "vendor/opentelekomcloud-community", - "!vendor/opentelekomcloud-community/fg_events/fg-events/fg-timer-event/src" + "!vendor/opentelekomcloud-community/otc-functiongraph-php-runtime/fg-events/fg-timer-event/src" ] }, "config": { @@ -145,7 +145,7 @@ Then, you can import the Timer Event class in your code: ` + | To obtain this, see: :api_usage:`Obtaining a Project ID` in API usage guide but use the **project name** instead of the project ID. * - OTC_SDK_AK - Your Access Key @@ -427,7 +427,7 @@ For **post_json** test event the output should be: "body": "eyJoZWxsbyI6IlQgQ2xvdWQgUHVibGljIiwiQUsiOiJubyBhZ2VuY3kvaW5jbHVkZSBrZXlzIn0=", "headers": { "Content-Length": [ - "56" + "101" ], "Content-Type": [ "application/json" @@ -453,4 +453,4 @@ After decoding, you will get the string: .. code-block:: json - {"hello":"T Cloud Public","AK":"no agency/include keys"} + {"hello":"T Cloud Public","AK":"no agency/include keys","USER_DATA_ENVVAR_1":"","SECRET_ENVVAR_1":""} diff --git a/doc/source/devguide/invoke/invoke_api.rst b/doc/source/devguide/invoke/invoke_api.rst index 8a84d64..eb5e354 100644 --- a/doc/source/devguide/invoke/invoke_api.rst +++ b/doc/source/devguide/invoke/invoke_api.rst @@ -56,6 +56,13 @@ in FunctionGraph API reference for more details about synchronous invocation. :caption: :github_repo_master:`samples-doc/invoke-fg/guzzle/composer.json ` :tab-width: 2 + To install the dependencies, run the following command in the terminal + in folder ``samples-doc/invoke-fg/guzzle``: + + .. code-block:: bash + + composer install + To execute the sample code, run the following command in the terminal in folder ``samples-doc/invoke-fg/guzzle``: @@ -75,6 +82,13 @@ in FunctionGraph API reference for more details about synchronous invocation. :caption: :github_repo_master:`samples-doc/invoke-fg/curl/composer.json ` :tab-width: 2 + To install the dependencies, run the following command in the terminal + in folder ``samples-doc/invoke-fg/curl``: + + .. code-block:: bash + + composer install + To execute the sample code, run the following command in the terminal in folder ``samples-doc/invoke-fg/curl``: @@ -87,10 +101,10 @@ in FunctionGraph API reference for more details about synchronous invocation. .. code-block:: bash :caption: Sample output of synchronous invocation using AK/SK - Result: {"statusCode":200,"headers":{"Content-Type":"application/json"},"isBase64Encoded":false,"body":"{\"key\":\"Hello World\"}"} - Log: 2026-03-17T10:13:22Z Start invoke request '960d089c-c812-4fe7-9997-a72f773e4bcb', version: latest + Status: 200 + Result: {"statusCode":200,"headers":{"Content-Type":"application/json"},"isBase64Encoded":false,"body":"{\"key\":\"Hello T-Cloud Public World - SYNC\"}"} + Log: 2026-03-17T10:13:22Z Start invoke request '960d089c-c812-4fe7-9997-a72f773e4bcb', version: latest 2026-03-17T10:13:22Z 960d089c-c812-4fe7-9997-a72f773e4bcb INFO Function name: php-sample-invoke-function - 2026-03-17T10:13:22Z 960d089c-c812-4fe7-9997-a72f773e4bcb INFO Key value from event: Hello World 2026-03-17T10:13:22Z Finish invoke request '960d089c-c812-4fe7-9997-a72f773e4bcb', duration: 2.049ms, billing duration: 3ms, memory used: 36.535MB, billing memory: 128MB, cpu used: 0.300U, storage used: 0.039MB @@ -148,4 +162,5 @@ In both cases, you should see an output similar to the following in the terminal .. code-block:: bash :caption: Sample output of asynchronous invocation using AK/SK - Response: {"request_id": "3d1a4f5a-b4e2-4429-80c8-3d82d2fe8791"} + Status: 202 + Response Body: {"request_id": "3d1a4f5a-b4e2-4429-80c8-3d82d2fe8791"} diff --git a/doc/source/devguide/invoke/invoke_fg_aksk.rst b/doc/source/devguide/invoke/invoke_fg_aksk.rst index 35d204a..388452e 100644 --- a/doc/source/devguide/invoke/invoke_fg_aksk.rst +++ b/doc/source/devguide/invoke/invoke_fg_aksk.rst @@ -10,7 +10,7 @@ This page demonstrates how to call a FunctionGraph implemented in PHP from another FunctionGraph function using API calls and **temporary security credentials** (SecurityAccessKey/SecurityKey/SecurityToken) provided by an agency of `Agency Type` **Cloud Service** -for `Cloud Service` **FunctionGraph Service** with permission to invoke FunctionGraph. +for `Cloud Service` **FunctionGraph Service** with permission to invoke FunctionGraph for authentication. Using temporary credentials the request has to be signed using the diff --git a/doc/source/devguide/invoke/invoke_fg_token.rst b/doc/source/devguide/invoke/invoke_fg_token.rst index 5aa747d..cf6e429 100644 --- a/doc/source/devguide/invoke/invoke_fg_token.rst +++ b/doc/source/devguide/invoke/invoke_fg_token.rst @@ -9,7 +9,7 @@ Invoke FunctionGraph Function from FunctionGraph using Token This page demonstrates how to call a FunctionGraph implemented in PHP from another FunctionGraph function using API calls and **token** provided by an agency of `Agency Type` **Cloud Service** -for `Cloud Service` **FunctionGraph Service** with permission to invoke FunctionGraph. +for `Cloud Service` **FunctionGraph Service** with permission to invoke FunctionGraph for authentication. See: :ref:`invoke_functiongraph_function_api` for more details on diff --git a/samples-doc/deploy-from-obs/README.md b/samples-doc/deploy-from-obs/README.md index 6e154fb..b455c2d 100644 --- a/samples-doc/deploy-from-obs/README.md +++ b/samples-doc/deploy-from-obs/README.md @@ -4,4 +4,4 @@ This sample demonstrates how to deploy FunctionGraph with **code from OBS** usin This approach is used, if your unpacked FunctionGraph deployment package is **greater than 40MB**. -For details see [Developer Documentation](https://opentelekomcloud-community.github.io/otc-functiongraph-php-runtime/devguide/deployment/terraform/deploy_from_zip/_index). \ No newline at end of file +For details see [Developer Documentation](https://opentelekomcloud-community.github.io/otc-functiongraph-php-runtime/devguide/deployment/terraform/deploy_from_obs/_index). \ No newline at end of file diff --git a/samples-doc/deploy-from-zip/README.md b/samples-doc/deploy-from-zip/README.md index 2bd2c9c..af42142 100644 --- a/samples-doc/deploy-from-zip/README.md +++ b/samples-doc/deploy-from-zip/README.md @@ -4,4 +4,4 @@ This sample demonstrates how to deploy FunctionGraph with **code from ZIP** usin This approach is used, if your unpacked FunctionGraph deployment package is **less than 40MB**. -For details see [Developer Documentation](https://opentelekomcloud-community.github.io/otc-functiongraph-php-runtime/devguide/deployment/terraform/deploy-from-zip/_index). +For details see [Developer Documentation](https://opentelekomcloud-community.github.io/otc-functiongraph-php-runtime/devguide/deployment/terraform/deploy_from_zip/_index). diff --git a/samples-doc/invoke-fg2fg/curl_AKSK/composer.json b/samples-doc/invoke-fg2fg/curl_AKSK/composer.json index 3334198..e8b5cf8 100644 --- a/samples-doc/invoke-fg2fg/curl_AKSK/composer.json +++ b/samples-doc/invoke-fg2fg/curl_AKSK/composer.json @@ -1,5 +1,5 @@ { - "name": "opentelekomcloud-community/invoke-fg2fg-curl_AKSK", + "name": "opentelekomcloud-community/invoke-fg2fg-curl_aksk", "description": "Samples on how to invoke FunctionGraph from FunctionGraph functions using AK,SK and cURL", "license": "Apache-2.0", "type": "project", diff --git a/samples-doc/invoke-fg2fg/guzzle_AKSK/composer.json b/samples-doc/invoke-fg2fg/guzzle_AKSK/composer.json index 4045b7b..06c1f75 100644 --- a/samples-doc/invoke-fg2fg/guzzle_AKSK/composer.json +++ b/samples-doc/invoke-fg2fg/guzzle_AKSK/composer.json @@ -1,5 +1,5 @@ { - "name": "opentelekomcloud-community/invoke-fg2fg-guzzle_AKSK", + "name": "opentelekomcloud-community/invoke-fg2fg-guzzle_aksk", "description": "Samples on how to invoke FunctionGraph from FunctionGraph functions using AK,SK and Guzzle", "license": "Apache-2.0", "type": "project",