diff --git a/docs/fg/api-ref/ALL_META.TXT.json b/docs/fg/api-ref/ALL_META.TXT.json new file mode 100644 index 00000000..c0d3403d --- /dev/null +++ b/docs/fg/api-ref/ALL_META.TXT.json @@ -0,0 +1,1761 @@ +[ + { + "dockw":"API Reference" + }, + { + "uri":"functiongraph_06_1600.html", + "node_id":"functiongraph_06_1600.xml", + "product_code":"functiongraph", + "code":"1", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Before You Start", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Before You Start", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0100.html", + "node_id":"functiongraph_06_0100.xml", + "product_code":"functiongraph", + "code":"2", + "des":"Welcome to FunctionGraph. FunctionGraph hosts and computes event-driven functions in a serverless context while ensuring high availability, high scalability, and zero mai", + "doc_type":"api", + "kw":"Overview,Before You Start,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Overview", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1601.html", + "node_id":"functiongraph_06_1601.xml", + "product_code":"functiongraph", + "code":"3", + "des":"FunctionGraph supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.", + "doc_type":"api", + "kw":"API Calling,Before You Start,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"API Calling", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1602.html", + "node_id":"functiongraph_06_1602.xml", + "product_code":"functiongraph", + "code":"4", + "des":"An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.", + "doc_type":"api", + "kw":"Endpoints,Before You Start,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Endpoints", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1603.html", + "node_id":"functiongraph_06_1603.xml", + "product_code":"functiongraph", + "code":"5", + "des":"The number of functions that you can create is determined by your quota. For details, see .For more constraints, see API description.", + "doc_type":"api", + "kw":"Constraints,Before You Start,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Constraints", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1604.html", + "node_id":"functiongraph_06_1604.xml", + "product_code":"functiongraph", + "code":"6", + "des":"AccountAn account is created upon successful registration with the cloud system. The account has full access permissions for all of its cloud services and resources. It c", + "doc_type":"api", + "kw":"Concepts,Before You Start,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Concepts", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0101.html", + "node_id":"functiongraph_06_0101.xml", + "product_code":"functiongraph", + "code":"7", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Model Definition", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Function Model Definition", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0102.html", + "node_id":"functiongraph_06_0102.xml", + "product_code":"functiongraph", + "code":"8", + "des":"The function model of FunctionGraph is as follows:Table 1 describes the parameters in the function model.The format of a function URN is as follows:A function URN is divi", + "doc_type":"api", + "kw":"Function Model,Function Model Definition,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Function Model", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0103.html", + "node_id":"functiongraph_06_0103.xml", + "product_code":"functiongraph", + "code":"9", + "des":"Table 1 describes the parameters in the trigger type model.Table 2 describes the parameters in the trigger instance model.The data of a Simple Message Notification (SMN) ", + "doc_type":"api", + "kw":"Trigger Management Models,Function Model Definition,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Trigger Management Models", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1500.html", + "node_id":"functiongraph_06_1500.xml", + "product_code":"functiongraph", + "code":"10", + "des":"FunctionGraph provides developers and partners with open APIs for development, deployment, hosting, and O&M, helping users quickly implement service innovations at low co", + "doc_type":"api", + "kw":"API Overview,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"API Overview", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0200.html", + "node_id":"functiongraph_06_0200.xml", + "product_code":"functiongraph", + "code":"11", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Calling APIs", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Calling APIs", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0210.html", + "node_id":"functiongraph_06_0210.xml", + "product_code":"functiongraph", + "code":"12", + "des":"This section describes the structure of a REST API request, and uses the Identity and Access Management (IAM) API for obtaining a user token as an example to demonstrate ", + "doc_type":"api", + "kw":"Making an API Request,Calling APIs,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Making an API Request", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0230.html", + "node_id":"functiongraph_06_0230.xml", + "product_code":"functiongraph", + "code":"13", + "des":"Requests for calling an API can be authenticated using either of the following methods:Token-based authentication: Requests are authenticated using a token.AK/SK-based au", + "doc_type":"api", + "kw":"Authentication,Calling APIs,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Authentication", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0220.html", + "node_id":"functiongraph_06_0220.xml", + "product_code":"functiongraph", + "code":"14", + "des":"After sending a request, you will receive a response, including a status code, response header, and response body.A status code is a group of digits, ranging from 1xx to ", + "doc_type":"api", + "kw":"Response,Calling APIs,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Response", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0201.html", + "node_id":"functiongraph_06_0201.xml", + "product_code":"functiongraph", + "code":"15", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Examples", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "opensource":"false", + "prodname":"functiongraph" + } + ], + "title":"Examples", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0202.html", + "node_id":"functiongraph_06_0202.xml", + "product_code":"functiongraph", + "code":"16", + "des":"This example guides you through the procedure for creating a Python 2.7 function and associating a timer trigger with it to periodically download files from an OBS bucket", + "doc_type":"api", + "kw":"Example 1: Using a Timer Trigger to Periodically Download Files from an OBS Bucket,Examples,API Refe", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph", + "opensource":"true" + } + ], + "title":"Example 1: Using a Timer Trigger to Periodically Download Files from an OBS Bucket", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0203.html", + "node_id":"functiongraph_06_0203.xml", + "product_code":"functiongraph", + "code":"17", + "des":"This example guides you through the procedure for creating a Python 2.7 function and associating an APIG trigger with it to obtain a static web page.For details about how", + "doc_type":"api", + "kw":"Example 2: Using an APIG Trigger to Obtain a Static Web Page,Examples,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph", + "opensource":"true" + } + ], + "title":"Example 2: Using an APIG Trigger to Obtain a Static Web Page", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0204.html", + "node_id":"functiongraph_06_0204.xml", + "product_code":"", + "code":"18", + "des":"This example guides you through the procedure for uploading local code to an OBS bucket and creating a Python 2.7 function using the link URL of the OBS bucket.For detail", + "doc_type":"", + "kw":"Example 3: Creating a Function by Uploading Code to an OBS Bucket,Examples,API Reference", + "search_title":"", + "metedata":[ + { + + } + ], + "title":"Example 3: Creating a Function by Uploading Code to an OBS Bucket", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1704.html", + "node_id":"functiongraph_06_1704.xml", + "product_code":"", + "code":"19", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"", + "kw":"APIs", + "search_title":"", + "metedata":[ + { + + } + ], + "title":"APIs", + "githuburl":"" + }, + { + "uri":"FunctionInvocation.html", + "node_id":"functioninvocation.xml", + "product_code":"", + "code":"20", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Invocation", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Invocation", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0125.html", + "node_id":"functiongraph_06_0125.xml", + "product_code":"", + "code":"21", + "des":"This API is used to execute a function synchronously. Clients must wait for explicit responses to their requests from the function. Responses are returned only after func", + "doc_type":"api", + "kw":"Executing a Function Synchronously,Function Invocation,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"InvokeFunction" + } + ], + "title":"Executing a Function Synchronously", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0126.html", + "node_id":"functiongraph_06_0126.xml", + "product_code":"", + "code":"22", + "des":"This API is used to execute a function asynchronously.POST /v2/{project_id}/fgs/functions/{function_urn}/invocations-asyncStatus code: 202Status code: 400Status code: 401", + "doc_type":"api", + "kw":"Executing a Function Asynchronously,Function Invocation,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"AsyncInvokeFunction" + } + ], + "title":"Executing a Function Asynchronously", + "githuburl":"" + }, + { + "uri":"FunctionQuotas.html", + "node_id":"functionquotas.xml", + "product_code":"", + "code":"23", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Quotas", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Quotas", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0137.html", + "node_id":"functiongraph_06_0137.xml", + "product_code":"", + "code":"24", + "des":"This API is used to query tenant quotas.GET /v2/{project_id}/fgs/quotasStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 500Query quotas.Status", + "doc_type":"api", + "kw":"Querying Tenant Quotas,Function Quotas,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListQuotas" + } + ], + "title":"Querying Tenant Quotas", + "githuburl":"" + }, + { + "uri":"Dependencies.html", + "node_id":"dependencies.xml", + "product_code":"", + "code":"25", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Dependencies", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Dependencies", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0127.html", + "node_id":"functiongraph_06_0127.xml", + "product_code":"", + "code":"26", + "des":"This API is used to query all dependencies.GET /v2/{project_id}/fgs/dependenciesStatus code: 200Status code: 401Status code: 403Status code: 404Status code: 500Dependenci", + "doc_type":"api", + "kw":"Querying Dependencies,Dependencies,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListDependencies" + } + ], + "title":"Querying Dependencies", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0152.html", + "node_id":"functiongraph_06_0152.xml", + "product_code":"", + "code":"27", + "des":"This API is used to create a dependency version.POST /v2/{project_id}/fgs/dependencies/versionStatus code: 200Status code: 401Status code: 403Status code: 404Status code:", + "doc_type":"api", + "kw":"Creating a Dependency Version,Dependencies,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateDependencyVersion" + } + ], + "title":"Creating a Dependency Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0153.html", + "node_id":"functiongraph_06_0153.xml", + "product_code":"", + "code":"28", + "des":"This API is used to query dependency versions.GET /v2/{project_id}/fgs/dependencies/{depend_id}/versionStatus code: 200Status code: 401Status code: 403Status code: 404Sta", + "doc_type":"api", + "kw":"Querying Dependency Versions,Dependencies,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListDependencyVersion" + } + ], + "title":"Querying Dependency Versions", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0154.html", + "node_id":"functiongraph_06_0154.xml", + "product_code":"", + "code":"29", + "des":"This API is used to query the details about a dependency version.GET /v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}Status code: 200Status code: 401Status", + "doc_type":"api", + "kw":"Querying a Dependency Version,Dependencies,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowDependencyVersion" + } + ], + "title":"Querying a Dependency Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0155.html", + "node_id":"functiongraph_06_0155.xml", + "product_code":"", + "code":"30", + "des":"This API is used to delete a dependency version.DELETE /v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}Status code: 401Status code: 403Status code: 404Stat", + "doc_type":"api", + "kw":"Deleting a Dependency Version,Dependencies,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteDependencyVersion" + } + ], + "title":"Deleting a Dependency Version", + "githuburl":"" + }, + { + "uri":"TestEvents.html", + "node_id":"testevents.xml", + "product_code":"", + "code":"31", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Test Events", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Test Events", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0132.html", + "node_id":"functiongraph_06_0132.xml", + "product_code":"", + "code":"32", + "des":"This API is used to query the test events of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/eventsStatus code: 200Status code: 400Status code: 401Status cod", + "doc_type":"api", + "kw":"Querying Test Events of a Function,Test Events,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListEvents" + } + ], + "title":"Querying Test Events of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0133.html", + "node_id":"functiongraph_06_0133.xml", + "product_code":"", + "code":"33", + "des":"This API is used to create a test event.POST /v2/{project_id}/fgs/functions/{function_urn}/eventsStatus code: 200Status code: 400Status code: 401Status code: 403Status co", + "doc_type":"api", + "kw":"Creating a Test Event,Test Events,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateEvent" + } + ], + "title":"Creating a Test Event", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0129.html", + "node_id":"functiongraph_06_0129.xml", + "product_code":"", + "code":"34", + "des":"This API is used to delete a test event.DELETE /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}Status code: 400Status code: 401Status code: 403Status code:", + "doc_type":"api", + "kw":"Deleting a Test Event,Test Events,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteEvent" + } + ], + "title":"Deleting a Test Event", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0135.html", + "node_id":"functiongraph_06_0135.xml", + "product_code":"", + "code":"35", + "des":"This API is used to query the details of a test event.GET /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}Status code: 200Status code: 400Status code: 401S", + "doc_type":"api", + "kw":"Obtaining the Details of a Test Event,Test Events,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowEvent" + } + ], + "title":"Obtaining the Details of a Test Event", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0136.html", + "node_id":"functiongraph_06_0136.xml", + "product_code":"", + "code":"36", + "des":"This API is used to update a test event.PUT /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}Status code: 200Status code: 400Status code: 401Status code: 40", + "doc_type":"api", + "kw":"Updating a Test Event,Test Events,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateEvent" + } + ], + "title":"Updating a Test Event", + "githuburl":"" + }, + { + "uri":"FunctionLifecycleManagement.html", + "node_id":"functionlifecyclemanagement.xml", + "product_code":"", + "code":"37", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Lifecycle Management", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Lifecycle Management", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0105.html", + "node_id":"functiongraph_06_0105.xml", + "product_code":"", + "code":"38", + "des":"This API is used to query all functions.GET /v2/{project_id}/fgs/functionsStatus code: 200Status code: 401Status code: 403Status code: 404Status code: 500Query functions ", + "doc_type":"api", + "kw":"Querying Functions,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctions" + } + ], + "title":"Querying Functions", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0108.html", + "node_id":"functiongraph_06_0108.xml", + "product_code":"", + "code":"39", + "des":"This API is used to create a function.POST /v2/{project_id}/fgs/functionsStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 404Status code: 500S", + "doc_type":"api", + "kw":"Creating a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateFunction" + } + ], + "title":"Creating a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0109.html", + "node_id":"functiongraph_06_0109.xml", + "product_code":"", + "code":"40", + "des":"This API is used to delete a function or a non-latest version of a function.If the URN contains a function version or alias, the function version or the version correspon", + "doc_type":"api", + "kw":"Deleting a Function or Function Version,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteFunction" + } + ], + "title":"Deleting a Function or Function Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0107.html", + "node_id":"functiongraph_06_0107.xml", + "product_code":"", + "code":"41", + "des":"This API is used to query the code of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/codeStatus code: 200Status code: 400Status code: 401Status code: 403Sta", + "doc_type":"api", + "kw":"Querying the Code of a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowFunctionCode" + } + ], + "title":"Querying the Code of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0110.html", + "node_id":"functiongraph_06_0110.xml", + "product_code":"", + "code":"42", + "des":"This API is used to modify the code of a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/codeStatus code: 200Status code: 400Status code: 401Status code: 403St", + "doc_type":"api", + "kw":"Modifying the Code of a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateFunctionCode" + } + ], + "title":"Modifying the Code of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0106.html", + "node_id":"functiongraph_06_0106.xml", + "product_code":"", + "code":"43", + "des":"This API is used to query the metadata of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/configStatus code: 200Status code: 400Status code: 401Status code: ", + "doc_type":"api", + "kw":"Querying the Metadata of a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowFunctionConfig" + } + ], + "title":"Querying the Metadata of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0111.html", + "node_id":"functiongraph_06_0111.xml", + "product_code":"", + "code":"44", + "des":"This API is used to modify the metadata of a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/configStatus code: 200Status code: 400Status code: 401Status code:", + "doc_type":"api", + "kw":"Modifying the Metadata of a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateFunctionConfig" + } + ], + "title":"Modifying the Metadata of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1018.html", + "node_id":"functiongraph_06_1018.xml", + "product_code":"", + "code":"45", + "des":"This API is used to update the maximum number of instances of a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/config-max-instanceStatus code: 200Status code:", + "doc_type":"api", + "kw":"Updating Max. Instances of a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateFunctionMaxInstanceConfig" + } + ], + "title":"Updating Max. Instances of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_23_1031_01.html", + "node_id":"functiongraph_23_1031_01.xml", + "product_code":"", + "code":"46", + "des":"This API is used to query function tags.GET /v2/{project_id}/{resource_type}/{resource_id}/tagsStatus code: 200Status code: 400Status code: 401Status code: 403Status code", + "doc_type":"api", + "kw":"Querying Function Tags,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctionTags" + } + ], + "title":"Querying Function Tags", + "githuburl":"" + }, + { + "uri":"functiongraph_23_1031_02.html", + "node_id":"functiongraph_23_1031_02.xml", + "product_code":"", + "code":"47", + "des":"This API is used to query ServiceBridge functions bound to a specified function.GET /v2/{project_id}/fgs/functions/{function_urn}/servicebridge/relationStatus code: 200St", + "doc_type":"api", + "kw":"Querying ServiceBridge Functions Bound to a Specified Function,Function Lifecycle Management,API Ref", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListBridgeFunctions" + } + ], + "title":"Querying ServiceBridge Functions Bound to a Specified Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1022.html", + "node_id":"functiongraph_06_1022.xml", + "product_code":"", + "code":"48", + "des":"This API is used to query resource tags.GET /v2/{project_id}/{resource_type}/tagsStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 500Query res", + "doc_type":"api", + "kw":"Querying Resource Tags,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowProjectTagsList" + } + ], + "title":"Querying Resource Tags", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1021.html", + "node_id":"functiongraph_06_1021.xml", + "product_code":"", + "code":"49", + "des":"This API is used to query resources.POST /v2/{project_id}/{resource_type}/resource-instances/{action}Status code: 200Status code: 400Status code: 401Status code: 403Statu", + "doc_type":"api", + "kw":"Querying Resources,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowResInstanceInfo" + } + ], + "title":"Querying Resources", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1024.html", + "node_id":"functiongraph_06_1024.xml", + "product_code":"", + "code":"50", + "des":"This API is used to delete resource tags.DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/deleteStatus code: 400Delete resource tags.NoneSee Error Codes.", + "doc_type":"api", + "kw":"Deleting Resource Tags,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteTags" + } + ], + "title":"Deleting Resource Tags", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1023.html", + "node_id":"functiongraph_06_1023.xml", + "product_code":"", + "code":"51", + "des":"This API is used to create resource tags.POST /v2/{project_id}/{resource_type}/{resource_id}/tags/createStatus code: 400Create resource tags testKey1:testValue1 and testK", + "doc_type":"api", + "kw":"Creating Resource Tags,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateTags" + } + ], + "title":"Creating Resource Tags", + "githuburl":"" + }, + { + "uri":"functiongraph_23_1031_04.html", + "node_id":"functiongraph_23_1031_04.xml", + "product_code":"", + "code":"52", + "des":"This API is used to update the pinning status of a function.PUT /v2/{project_id}/fgs/functions/{func_urn}/collect/{state}Status code: 500Update the pinning status of a fu", + "doc_type":"api", + "kw":"Updating the Pinning Status of a Function,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateFunctionCollectState" + } + ], + "title":"Updating the Pinning Status of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_23_1031_03.html", + "node_id":"functiongraph_23_1031_03.xml", + "product_code":"", + "code":"53", + "des":"This API is used to query the available ServiceBridge version.GET /v2/{project_id}/fgs/servicebridge/versionStatus code: 200Status code: 400Status code: 401Status code: 4", + "doc_type":"api", + "kw":"Querying the Available ServiceBridge Version,Function Lifecycle Management,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListBridgeVersions" + } + ], + "title":"Querying the Available ServiceBridge Version", + "githuburl":"" + }, + { + "uri":"VersionsandAliases.html", + "node_id":"versionsandaliases.xml", + "product_code":"", + "code":"54", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Versions and Aliases", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Versions and Aliases", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0118.html", + "node_id":"functiongraph_06_0118.xml", + "product_code":"", + "code":"55", + "des":"This API is used to query the versions and aliases of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/aliasesStatus code: 200Status code: 401Status code: 403", + "doc_type":"api", + "kw":"Querying All Versions and Aliases of a Function,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListVersionAliases" + } + ], + "title":"Querying All Versions and Aliases of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0114.html", + "node_id":"functiongraph_06_0114.xml", + "product_code":"", + "code":"56", + "des":"This API is used to create an alias for a function version.POST /v2/{project_id}/fgs/functions/{function_urn}/aliasesStatus code: 200Status code: 400Status code: 401Statu", + "doc_type":"api", + "kw":"Creating an Alias for a Function Version,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateVersionAlias" + } + ], + "title":"Creating an Alias for a Function Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0116.html", + "node_id":"functiongraph_06_0116.xml", + "product_code":"", + "code":"57", + "des":"This API is used to delete an alias of a function version.DELETE /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}Status code: 401Status code: 403Status ", + "doc_type":"api", + "kw":"Deleting an Alias of a Function Version,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteVersionAlias" + } + ], + "title":"Deleting an Alias of a Function Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0117.html", + "node_id":"functiongraph_06_0117.xml", + "product_code":"", + "code":"58", + "des":"This API is used to query the alias of a function version.GET /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}Status code: 200Status code: 401Status cod", + "doc_type":"api", + "kw":"Querying the Alias of a Function Version,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowVersionAlias" + } + ], + "title":"Querying the Alias of a Function Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0115.html", + "node_id":"functiongraph_06_0115.xml", + "product_code":"", + "code":"59", + "des":"This API is used to modify the alias of a function version.PUT /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}Status code: 200Status code: 400Status co", + "doc_type":"api", + "kw":"Modifying the Alias of a Function Version,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateVersionAlias" + } + ], + "title":"Modifying the Alias of a Function Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0113.html", + "node_id":"functiongraph_06_0113.xml", + "product_code":"", + "code":"60", + "des":"This API is used to query the versions of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/versionsStatus code: 200Status code: 400Status code: 401Status code", + "doc_type":"api", + "kw":"Querying the Versions of a Function,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctionVersions" + } + ], + "title":"Querying the Versions of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0144.html", + "node_id":"functiongraph_06_0144.xml", + "product_code":"", + "code":"61", + "des":"This API is used to publish a function version.POST /v2/{project_id}/fgs/functions/{function_urn}/versionsStatus code: 200Status code: 400Status code: 401Status code: 403", + "doc_type":"api", + "kw":"Publishing a Function Version,Versions and Aliases,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateFunctionVersion" + } + ], + "title":"Publishing a Function Version", + "githuburl":"" + }, + { + "uri":"FunctionMetrics.html", + "node_id":"functionmetrics.xml", + "product_code":"", + "code":"62", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Metrics", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Metrics", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0139.html", + "node_id":"functiongraph_06_0139.xml", + "product_code":"", + "code":"63", + "des":"This API is used to query tenant-level function statistics.The statistics include function format, quota and usage, and traffic report.You can query data in a specific pe", + "doc_type":"api", + "kw":"Querying Tenant-Level Function Statistics,Function Metrics,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListStatistics" + } + ], + "title":"Querying Tenant-Level Function Statistics", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0138.html", + "node_id":"functiongraph_06_0138.xml", + "product_code":"", + "code":"64", + "des":"This API is used to query metrics of a function in a specified period.GET /v2/{project_id}/fgs/functions/{func_urn}/statistics/{period}Status code: 200Query metrics of a ", + "doc_type":"api", + "kw":"Querying Metrics in a Specified Period,Function Metrics,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctionStatistics" + } + ], + "title":"Querying Metrics in a Specified Period", + "githuburl":"" + }, + { + "uri":"FunctionLogs.html", + "node_id":"functionlogs.xml", + "product_code":"", + "code":"65", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Logs", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Logs", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0145.html", + "node_id":"functiongraph_06_0145.xml", + "product_code":"", + "code":"66", + "des":"This API is used to query the LTS log group and stream settings of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/lts-log-detailStatus code: 200Status code:", + "doc_type":"api", + "kw":"Querying the Log Group and Stream of a Function,Function Logs,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowLtsLogDetails" + } + ], + "title":"Querying the Log Group and Stream of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0112_01.html", + "node_id":"functiongraph_06_0112_01.xml", + "product_code":"", + "code":"67", + "des":"This API is used to enable log reporting to LTS.POST /v2/{project_id}/fgs/functions/enable-lts-logsStatus code: 429Enable log reporting to LTS.Status code: 429Too many re", + "doc_type":"api", + "kw":"Enabling Log Reporting to LTS,Function Logs,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"EnableLtsLogs" + } + ], + "title":"Enabling Log Reporting to LTS", + "githuburl":"" + }, + { + "uri":"Templates.html", + "node_id":"templates.xml", + "product_code":"", + "code":"68", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Templates", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Templates", + "githuburl":"" + }, + { + "uri":"functiongraph_23_1031_06.html", + "node_id":"functiongraph_23_1031_06.xml", + "product_code":"", + "code":"69", + "des":"This API is used to query a specified function template.GET /v2/{project_id}/fgs/templates/{template_id}Status code: 200Status code: 400Status code: 401Status code: 403St", + "doc_type":"api", + "kw":"Querying a Specified Function Template,Function Templates,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowFunctionTemplate" + } + ], + "title":"Querying a Specified Function Template", + "githuburl":"" + }, + { + "uri":"ReservedInstances.html", + "node_id":"reservedinstances.xml", + "product_code":"", + "code":"70", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Reserved Instances", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Reserved Instances", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0112_2.html", + "node_id":"functiongraph_06_0112_2.xml", + "product_code":"", + "code":"71", + "des":"This API is used to query reserved instances of a function.GET /v2/{project_id}/fgs/functions/reservedinstanceconfigsStatus code: 200Status code: 400Status code: 401Statu", + "doc_type":"api", + "kw":"Querying Reserved Instances of a Function,Reserved Instances,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListReservedInstanceConfigs" + } + ], + "title":"Querying Reserved Instances of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0112_1.html", + "node_id":"functiongraph_06_0112_1.xml", + "product_code":"", + "code":"72", + "des":"This API is used to change the number of reserved instances.PUT /v2/{project_id}/fgs/functions/{function_urn}/reservedinstancesStatus code: 200Status code: 400Status code", + "doc_type":"api", + "kw":"Changing the Number of Reserved Instances,Reserved Instances,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateFunctionReservedInstancesCount" + } + ], + "title":"Changing the Number of Reserved Instances", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0112_3.html", + "node_id":"functiongraph_06_0112_3.xml", + "product_code":"", + "code":"73", + "des":"This API is used to query the number of instances reserved for a function.GET /v2/{project_id}/fgs/functions/reservedinstancesStatus code: 200Status code: 400Status code:", + "doc_type":"api", + "kw":"Querying the Number of Reserved Instances,Reserved Instances,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctionReservedInstances" + } + ], + "title":"Querying the Number of Reserved Instances", + "githuburl":"" + }, + { + "uri":"FunctionImportAndExport.html", + "node_id":"functionimportandexport.xml", + "product_code":"", + "code":"74", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Import and Export", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Import and Export", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0108_1.html", + "node_id":"functiongraph_06_0108_1.xml", + "product_code":"", + "code":"75", + "des":"This API is used to export a function.GET /v2/{project_id}/fgs/functions/{function_urn}/exportStatus code: 404Status code: 500Export function code only.GET /v2/{project_i", + "doc_type":"api", + "kw":"Exporting a Function,Function Import and Export,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ExportFunction" + } + ], + "title":"Exporting a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0108_0.html", + "node_id":"functiongraph_06_0108_0.xml", + "product_code":"", + "code":"76", + "des":"This API is used to import a function.POST /v2/{project_id}/fgs/functions/importStatus code: 200Status code: 409Status code: 500Import a function from a Base64-encoded fi", + "doc_type":"api", + "kw":"Importing a Function,Function Import and Export,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ImportFunction" + } + ], + "title":"Importing a Function", + "githuburl":"" + }, + { + "uri":"FunctionTriggers.html", + "node_id":"functiontriggers.xml", + "product_code":"", + "code":"77", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Function Triggers", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Function Triggers", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0121.html", + "node_id":"functiongraph_06_0121.xml", + "product_code":"", + "code":"78", + "des":"This API is used to delete all triggers of a function.If a non-latest function version is specified, all triggers corresponding to the version will be deleted.If an alias", + "doc_type":"api", + "kw":"Deleting All Triggers of a Function,Function Triggers,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"BatchDeleteFunctionTriggers" + } + ], + "title":"Deleting All Triggers of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0119.html", + "node_id":"functiongraph_06_0119.xml", + "product_code":"", + "code":"79", + "des":"This API is used to query all triggers of a function.GET /v2/{project_id}/fgs/triggers/{function_urn}Status code: 200Status code: 400Status code: 401Status code: 403Statu", + "doc_type":"api", + "kw":"Querying All Triggers of a Function,Function Triggers,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctionTriggers" + } + ], + "title":"Querying All Triggers of a Function", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0122.html", + "node_id":"functiongraph_06_0122.xml", + "product_code":"", + "code":"80", + "des":"This API is used to create a trigger.Trigger types include timer, APIG, CTS, DDS, DMS, DIS, LTS, OBS, SMN, and Kafka.Trigger types include timer, APIG, CTS, DDS, DMS, DIS", + "doc_type":"api", + "kw":"Creating a Trigger,Function Triggers,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CreateFunctionTrigger" + } + ], + "title":"Creating a Trigger", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0123.html", + "node_id":"functiongraph_06_0123.xml", + "product_code":"", + "code":"81", + "des":"This API is used to delete a trigger.DELETE /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}Status code: 400Status code: 401Status code: 403S", + "doc_type":"api", + "kw":"Deleting a Trigger,Function Triggers,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteFunctionTrigger" + } + ], + "title":"Deleting a Trigger", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0120.html", + "node_id":"functiongraph_06_0120.xml", + "product_code":"", + "code":"82", + "des":"This API is used to query a specified trigger.GET /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}Status code: 200Status code: 400Status code", + "doc_type":"api", + "kw":"Querying a Trigger,Function Triggers,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowFunctionTrigger" + } + ], + "title":"Querying a Trigger", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0124.html", + "node_id":"functiongraph_06_0124.xml", + "product_code":"", + "code":"83", + "des":"This API is used to update a trigger.PUT /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}Status code: 200Status code: 404Enable a trigger.Sta", + "doc_type":"api", + "kw":"Updating a Trigger,Function Triggers,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateTrigger" + } + ], + "title":"Updating a Trigger", + "githuburl":"" + }, + { + "uri":"AsynchronousExecutionNotification.html", + "node_id":"asynchronousexecutionnotification.xml", + "product_code":"", + "code":"84", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Asynchronous Execution Notification", + "search_title":"", + "metedata":[ + { + "documenttype":"api" + } + ], + "title":"Asynchronous Execution Notification", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0140.html", + "node_id":"functiongraph_06_0140.xml", + "product_code":"", + "code":"85", + "des":"This API is used to query the asynchronous invocation setting of a function version.GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configStatus code: 200S", + "doc_type":"api", + "kw":"Querying Asynchronous Execution Notification Settings of a Function Version,Asynchronous Execution N", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ShowFunctionAsyncInvokeConfig" + } + ], + "title":"Querying Asynchronous Execution Notification Settings of a Function Version", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0141.html", + "node_id":"functiongraph_06_0141.xml", + "product_code":"", + "code":"86", + "des":"This API is used to delete the asynchronous execution notification settings of a function.DELETE /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configStatus c", + "doc_type":"api", + "kw":"Deleting Asynchronous Execution Notification Settings,Asynchronous Execution Notification,API Refere", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"DeleteFunctionAsyncInvokeConfig" + } + ], + "title":"Deleting Asynchronous Execution Notification Settings", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0142.html", + "node_id":"functiongraph_06_0142.xml", + "product_code":"", + "code":"87", + "des":"This API is used to configure asynchronous execution notification for a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configStatus code: 200Stat", + "doc_type":"api", + "kw":"Configuring Asynchronous Execution Notification,Asynchronous Execution Notification,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"UpdateFunctionAsyncInvokeConfig" + } + ], + "title":"Configuring Asynchronous Execution Notification", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0143.html", + "node_id":"functiongraph_06_0143.xml", + "product_code":"", + "code":"88", + "des":"This API is used to query the asynchronous execution notification settings of a function's all versions.GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-con", + "doc_type":"api", + "kw":"Querying Asynchronous Execution Notification Settings of a Function's All Versions,Asynchronous Exec", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListFunctionAsyncInvokeConfig" + } + ], + "title":"Querying Asynchronous Execution Notification Settings of a Function's All Versions", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0112_00_3.html", + "node_id":"functiongraph_06_0112_00_3.xml", + "product_code":"", + "code":"89", + "des":"This API is used to query the asynchronous invocation requests of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/async-invocationsStatus code: 200Status cod", + "doc_type":"api", + "kw":"Querying Asynchronous Invocation Requests,Asynchronous Execution Notification,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"ListAsyncInvocations" + } + ], + "title":"Querying Asynchronous Invocation Requests", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0146_00_1.html", + "node_id":"functiongraph_06_0146_00_1.xml", + "product_code":"", + "code":"90", + "des":"This API is used to stop asynchronous invocation of a function with N concurrent instances. When calling this API, set recursive to false and force to true. The API will ", + "doc_type":"api", + "kw":"Stopping an Asynchronous Invocation Request,Asynchronous Execution Notification,API Reference", + "search_title":"", + "metedata":[ + { + "opensource":"true", + "documenttype":"api", + "operation_id":"CancelAsyncInvocation" + } + ], + "title":"Stopping an Asynchronous Invocation Request", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1300.html", + "node_id":"functiongraph_06_1300.xml", + "product_code":"functiongraph", + "code":"91", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Appendix", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Appendix", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1310.html", + "node_id":"functiongraph_06_1310.xml", + "product_code":"functiongraph", + "code":"92", + "des":"Table 1 describes the status codes.", + "doc_type":"api", + "kw":"Status Codes,Appendix,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Status Codes", + "githuburl":"" + }, + { + "uri":"ErrorCode.html", + "node_id":"errorcode.xml", + "product_code":"functiongraph", + "code":"93", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Error Codes,Appendix,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Error Codes", + "githuburl":"" + }, + { + "uri":"functiongraph_06_0260.html", + "node_id":"functiongraph_06_0260.xml", + "product_code":"functiongraph", + "code":"94", + "des":"When calling APIs, you need to enter a project ID in some URLs. To obtain a project ID, perform the following steps:Log in to the management console.Click the username an", + "doc_type":"api", + "kw":"Obtaining a Project ID,Appendix,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"Obtaining a Project ID", + "githuburl":"" + }, + { + "uri":"functiongraph_06_1340.html", + "node_id":"functiongraph_06_1340.xml", + "product_code":"functiongraph", + "code":"95", + "des":"This section describes the function metrics reported to Cloud Eye.Their namespace and dimension are also included. You can view monitoring graphs and alarm messages on th", + "doc_type":"api", + "kw":"FunctionGraph Metrics,Appendix,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"functiongraph" + } + ], + "title":"FunctionGraph Metrics", + "githuburl":"" + } +] \ No newline at end of file diff --git a/docs/fg/api-ref/AsynchronousExecutionNotification.html b/docs/fg/api-ref/AsynchronousExecutionNotification.html new file mode 100644 index 00000000..1ac55d66 --- /dev/null +++ b/docs/fg/api-ref/AsynchronousExecutionNotification.html @@ -0,0 +1,26 @@ + + +

Asynchronous Execution Notification

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/CLASS.TXT.json b/docs/fg/api-ref/CLASS.TXT.json new file mode 100644 index 00000000..f40d1f90 --- /dev/null +++ b/docs/fg/api-ref/CLASS.TXT.json @@ -0,0 +1,857 @@ +[ + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Before You Start", + "uri":"functiongraph_06_1600.html", + "doc_type":"api", + "p_code":"", + "code":"1" + }, + { + "desc":"Welcome to FunctionGraph. FunctionGraph hosts and computes event-driven functions in a serverless context while ensuring high availability, high scalability, and zero mai", + "product_code":"functiongraph", + "title":"Overview", + "uri":"functiongraph_06_0100.html", + "doc_type":"api", + "p_code":"1", + "code":"2" + }, + { + "desc":"FunctionGraph supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.", + "product_code":"functiongraph", + "title":"API Calling", + "uri":"functiongraph_06_1601.html", + "doc_type":"api", + "p_code":"1", + "code":"3" + }, + { + "desc":"An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.", + "product_code":"functiongraph", + "title":"Endpoints", + "uri":"functiongraph_06_1602.html", + "doc_type":"api", + "p_code":"1", + "code":"4" + }, + { + "desc":"The number of functions that you can create is determined by your quota. For details, see .For more constraints, see API description.", + "product_code":"functiongraph", + "title":"Constraints", + "uri":"functiongraph_06_1603.html", + "doc_type":"api", + "p_code":"1", + "code":"5" + }, + { + "desc":"AccountAn account is created upon successful registration with the cloud system. The account has full access permissions for all of its cloud services and resources. It c", + "product_code":"functiongraph", + "title":"Concepts", + "uri":"functiongraph_06_1604.html", + "doc_type":"api", + "p_code":"1", + "code":"6" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Model Definition", + "uri":"functiongraph_06_0101.html", + "doc_type":"api", + "p_code":"1", + "code":"7" + }, + { + "desc":"The function model of FunctionGraph is as follows:Table 1 describes the parameters in the function model.The format of a function URN is as follows:A function URN is divi", + "product_code":"functiongraph", + "title":"Function Model", + "uri":"functiongraph_06_0102.html", + "doc_type":"api", + "p_code":"7", + "code":"8" + }, + { + "desc":"Table 1 describes the parameters in the trigger type model.Table 2 describes the parameters in the trigger instance model.The data of a Simple Message Notification (SMN) ", + "product_code":"functiongraph", + "title":"Trigger Management Models", + "uri":"functiongraph_06_0103.html", + "doc_type":"api", + "p_code":"7", + "code":"9" + }, + { + "desc":"FunctionGraph provides developers and partners with open APIs for development, deployment, hosting, and O&M, helping users quickly implement service innovations at low co", + "product_code":"functiongraph", + "title":"API Overview", + "uri":"functiongraph_06_1500.html", + "doc_type":"api", + "p_code":"", + "code":"10" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Calling APIs", + "uri":"functiongraph_06_0200.html", + "doc_type":"api", + "p_code":"", + "code":"11" + }, + { + "desc":"This section describes the structure of a REST API request, and uses the Identity and Access Management (IAM) API for obtaining a user token as an example to demonstrate ", + "product_code":"functiongraph", + "title":"Making an API Request", + "uri":"functiongraph_06_0210.html", + "doc_type":"api", + "p_code":"11", + "code":"12" + }, + { + "desc":"Requests for calling an API can be authenticated using either of the following methods:Token-based authentication: Requests are authenticated using a token.AK/SK-based au", + "product_code":"functiongraph", + "title":"Authentication", + "uri":"functiongraph_06_0230.html", + "doc_type":"api", + "p_code":"11", + "code":"13" + }, + { + "desc":"After sending a request, you will receive a response, including a status code, response header, and response body.A status code is a group of digits, ranging from 1xx to ", + "product_code":"functiongraph", + "title":"Response", + "uri":"functiongraph_06_0220.html", + "doc_type":"api", + "p_code":"11", + "code":"14" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Examples", + "uri":"functiongraph_06_0201.html", + "doc_type":"api", + "p_code":"", + "code":"15" + }, + { + "desc":"This example guides you through the procedure for creating a Python 2.7 function and associating a timer trigger with it to periodically download files from an OBS bucket", + "product_code":"functiongraph", + "title":"Example 1: Using a Timer Trigger to Periodically Download Files from an OBS Bucket", + "uri":"functiongraph_06_0202.html", + "doc_type":"api", + "p_code":"15", + "code":"16" + }, + { + "desc":"This example guides you through the procedure for creating a Python 2.7 function and associating an APIG trigger with it to obtain a static web page.For details about how", + "product_code":"functiongraph", + "title":"Example 2: Using an APIG Trigger to Obtain a Static Web Page", + "uri":"functiongraph_06_0203.html", + "doc_type":"api", + "p_code":"15", + "code":"17" + }, + { + "desc":"This example guides you through the procedure for uploading local code to an OBS bucket and creating a Python 2.7 function using the link URL of the OBS bucket.For detail", + "product_code":"functiongraph", + "title":"Example 3: Creating a Function by Uploading Code to an OBS Bucket", + "uri":"functiongraph_06_0204.html", + "doc_type":"api", + "p_code":"15", + "code":"18" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"APIs", + "uri":"functiongraph_06_1704.html", + "doc_type":"api", + "p_code":"", + "code":"19" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Invocation", + "uri":"FunctionInvocation.html", + "doc_type":"api", + "p_code":"19", + "code":"20" + }, + { + "desc":"This API is used to execute a function synchronously. Clients must wait for explicit responses to their requests from the function. Responses are returned only after func", + "product_code":"functiongraph", + "title":"Executing a Function Synchronously", + "uri":"functiongraph_06_0125.html", + "doc_type":"api", + "p_code":"20", + "code":"21" + }, + { + "desc":"This API is used to execute a function asynchronously.POST /v2/{project_id}/fgs/functions/{function_urn}/invocations-asyncStatus code: 202Status code: 400Status code: 401", + "product_code":"functiongraph", + "title":"Executing a Function Asynchronously", + "uri":"functiongraph_06_0126.html", + "doc_type":"api", + "p_code":"20", + "code":"22" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Quotas", + "uri":"FunctionQuotas.html", + "doc_type":"api", + "p_code":"19", + "code":"23" + }, + { + "desc":"This API is used to query tenant quotas.GET /v2/{project_id}/fgs/quotasStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 500Query quotas.Status", + "product_code":"functiongraph", + "title":"Querying Tenant Quotas", + "uri":"functiongraph_06_0137.html", + "doc_type":"api", + "p_code":"23", + "code":"24" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Dependencies", + "uri":"Dependencies.html", + "doc_type":"api", + "p_code":"19", + "code":"25" + }, + { + "desc":"This API is used to query all dependencies.GET /v2/{project_id}/fgs/dependenciesStatus code: 200Status code: 401Status code: 403Status code: 404Status code: 500Dependenci", + "product_code":"functiongraph", + "title":"Querying Dependencies", + "uri":"functiongraph_06_0127.html", + "doc_type":"api", + "p_code":"25", + "code":"26" + }, + { + "desc":"This API is used to create a dependency version.POST /v2/{project_id}/fgs/dependencies/versionStatus code: 200Status code: 401Status code: 403Status code: 404Status code:", + "product_code":"functiongraph", + "title":"Creating a Dependency Version", + "uri":"functiongraph_06_0152.html", + "doc_type":"api", + "p_code":"25", + "code":"27" + }, + { + "desc":"This API is used to query dependency versions.GET /v2/{project_id}/fgs/dependencies/{depend_id}/versionStatus code: 200Status code: 401Status code: 403Status code: 404Sta", + "product_code":"functiongraph", + "title":"Querying Dependency Versions", + "uri":"functiongraph_06_0153.html", + "doc_type":"api", + "p_code":"25", + "code":"28" + }, + { + "desc":"This API is used to query the details about a dependency version.GET /v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}Status code: 200Status code: 401Status", + "product_code":"functiongraph", + "title":"Querying a Dependency Version", + "uri":"functiongraph_06_0154.html", + "doc_type":"api", + "p_code":"25", + "code":"29" + }, + { + "desc":"This API is used to delete a dependency version.DELETE /v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}Status code: 401Status code: 403Status code: 404Stat", + "product_code":"functiongraph", + "title":"Deleting a Dependency Version", + "uri":"functiongraph_06_0155.html", + "doc_type":"api", + "p_code":"25", + "code":"30" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Test Events", + "uri":"TestEvents.html", + "doc_type":"api", + "p_code":"19", + "code":"31" + }, + { + "desc":"This API is used to query the test events of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/eventsStatus code: 200Status code: 400Status code: 401Status cod", + "product_code":"functiongraph", + "title":"Querying Test Events of a Function", + "uri":"functiongraph_06_0132.html", + "doc_type":"api", + "p_code":"31", + "code":"32" + }, + { + "desc":"This API is used to create a test event.POST /v2/{project_id}/fgs/functions/{function_urn}/eventsStatus code: 200Status code: 400Status code: 401Status code: 403Status co", + "product_code":"functiongraph", + "title":"Creating a Test Event", + "uri":"functiongraph_06_0133.html", + "doc_type":"api", + "p_code":"31", + "code":"33" + }, + { + "desc":"This API is used to delete a test event.DELETE /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}Status code: 400Status code: 401Status code: 403Status code:", + "product_code":"functiongraph", + "title":"Deleting a Test Event", + "uri":"functiongraph_06_0129.html", + "doc_type":"api", + "p_code":"31", + "code":"34" + }, + { + "desc":"This API is used to query the details of a test event.GET /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}Status code: 200Status code: 400Status code: 401S", + "product_code":"functiongraph", + "title":"Obtaining the Details of a Test Event", + "uri":"functiongraph_06_0135.html", + "doc_type":"api", + "p_code":"31", + "code":"35" + }, + { + "desc":"This API is used to update a test event.PUT /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}Status code: 200Status code: 400Status code: 401Status code: 40", + "product_code":"functiongraph", + "title":"Updating a Test Event", + "uri":"functiongraph_06_0136.html", + "doc_type":"api", + "p_code":"31", + "code":"36" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Lifecycle Management", + "uri":"FunctionLifecycleManagement.html", + "doc_type":"api", + "p_code":"19", + "code":"37" + }, + { + "desc":"This API is used to query all functions.GET /v2/{project_id}/fgs/functionsStatus code: 200Status code: 401Status code: 403Status code: 404Status code: 500Query functions ", + "product_code":"functiongraph", + "title":"Querying Functions", + "uri":"functiongraph_06_0105.html", + "doc_type":"api", + "p_code":"37", + "code":"38" + }, + { + "desc":"This API is used to create a function.POST /v2/{project_id}/fgs/functionsStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 404Status code: 500S", + "product_code":"functiongraph", + "title":"Creating a Function", + "uri":"functiongraph_06_0108.html", + "doc_type":"api", + "p_code":"37", + "code":"39" + }, + { + "desc":"This API is used to delete a function or a non-latest version of a function.If the URN contains a function version or alias, the function version or the version correspon", + "product_code":"functiongraph", + "title":"Deleting a Function or Function Version", + "uri":"functiongraph_06_0109.html", + "doc_type":"api", + "p_code":"37", + "code":"40" + }, + { + "desc":"This API is used to query the code of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/codeStatus code: 200Status code: 400Status code: 401Status code: 403Sta", + "product_code":"functiongraph", + "title":"Querying the Code of a Function", + "uri":"functiongraph_06_0107.html", + "doc_type":"api", + "p_code":"37", + "code":"41" + }, + { + "desc":"This API is used to modify the code of a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/codeStatus code: 200Status code: 400Status code: 401Status code: 403St", + "product_code":"functiongraph", + "title":"Modifying the Code of a Function", + "uri":"functiongraph_06_0110.html", + "doc_type":"api", + "p_code":"37", + "code":"42" + }, + { + "desc":"This API is used to query the metadata of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/configStatus code: 200Status code: 400Status code: 401Status code: ", + "product_code":"functiongraph", + "title":"Querying the Metadata of a Function", + "uri":"functiongraph_06_0106.html", + "doc_type":"api", + "p_code":"37", + "code":"43" + }, + { + "desc":"This API is used to modify the metadata of a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/configStatus code: 200Status code: 400Status code: 401Status code:", + "product_code":"functiongraph", + "title":"Modifying the Metadata of a Function", + "uri":"functiongraph_06_0111.html", + "doc_type":"api", + "p_code":"37", + "code":"44" + }, + { + "desc":"This API is used to update the maximum number of instances of a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/config-max-instanceStatus code: 200Status code:", + "product_code":"functiongraph", + "title":"Updating Max. Instances of a Function", + "uri":"functiongraph_06_1018.html", + "doc_type":"api", + "p_code":"37", + "code":"45" + }, + { + "desc":"This API is used to query function tags.GET /v2/{project_id}/{resource_type}/{resource_id}/tagsStatus code: 200Status code: 400Status code: 401Status code: 403Status code", + "product_code":"functiongraph", + "title":"Querying Function Tags", + "uri":"functiongraph_23_1031_01.html", + "doc_type":"api", + "p_code":"37", + "code":"46" + }, + { + "desc":"This API is used to query ServiceBridge functions bound to a specified function.GET /v2/{project_id}/fgs/functions/{function_urn}/servicebridge/relationStatus code: 200St", + "product_code":"functiongraph", + "title":"Querying ServiceBridge Functions Bound to a Specified Function", + "uri":"functiongraph_23_1031_02.html", + "doc_type":"api", + "p_code":"37", + "code":"47" + }, + { + "desc":"This API is used to query resource tags.GET /v2/{project_id}/{resource_type}/tagsStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 500Query res", + "product_code":"functiongraph", + "title":"Querying Resource Tags", + "uri":"functiongraph_06_1022.html", + "doc_type":"api", + "p_code":"37", + "code":"48" + }, + { + "desc":"This API is used to query resources.POST /v2/{project_id}/{resource_type}/resource-instances/{action}Status code: 200Status code: 400Status code: 401Status code: 403Statu", + "product_code":"functiongraph", + "title":"Querying Resources", + "uri":"functiongraph_06_1021.html", + "doc_type":"api", + "p_code":"37", + "code":"49" + }, + { + "desc":"This API is used to delete resource tags.DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/deleteStatus code: 400Delete resource tags.NoneSee Error Codes.", + "product_code":"functiongraph", + "title":"Deleting Resource Tags", + "uri":"functiongraph_06_1024.html", + "doc_type":"api", + "p_code":"37", + "code":"50" + }, + { + "desc":"This API is used to create resource tags.POST /v2/{project_id}/{resource_type}/{resource_id}/tags/createStatus code: 400Create resource tags testKey1:testValue1 and testK", + "product_code":"functiongraph", + "title":"Creating Resource Tags", + "uri":"functiongraph_06_1023.html", + "doc_type":"api", + "p_code":"37", + "code":"51" + }, + { + "desc":"This API is used to update the pinning status of a function.PUT /v2/{project_id}/fgs/functions/{func_urn}/collect/{state}Status code: 500Update the pinning status of a fu", + "product_code":"functiongraph", + "title":"Updating the Pinning Status of a Function", + "uri":"functiongraph_23_1031_04.html", + "doc_type":"api", + "p_code":"37", + "code":"52" + }, + { + "desc":"This API is used to query the available ServiceBridge version.GET /v2/{project_id}/fgs/servicebridge/versionStatus code: 200Status code: 400Status code: 401Status code: 4", + "product_code":"functiongraph", + "title":"Querying the Available ServiceBridge Version", + "uri":"functiongraph_23_1031_03.html", + "doc_type":"api", + "p_code":"37", + "code":"53" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Versions and Aliases", + "uri":"VersionsandAliases.html", + "doc_type":"api", + "p_code":"19", + "code":"54" + }, + { + "desc":"This API is used to query the versions and aliases of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/aliasesStatus code: 200Status code: 401Status code: 403", + "product_code":"functiongraph", + "title":"Querying All Versions and Aliases of a Function", + "uri":"functiongraph_06_0118.html", + "doc_type":"api", + "p_code":"54", + "code":"55" + }, + { + "desc":"This API is used to create an alias for a function version.POST /v2/{project_id}/fgs/functions/{function_urn}/aliasesStatus code: 200Status code: 400Status code: 401Statu", + "product_code":"functiongraph", + "title":"Creating an Alias for a Function Version", + "uri":"functiongraph_06_0114.html", + "doc_type":"api", + "p_code":"54", + "code":"56" + }, + { + "desc":"This API is used to delete an alias of a function version.DELETE /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}Status code: 401Status code: 403Status ", + "product_code":"functiongraph", + "title":"Deleting an Alias of a Function Version", + "uri":"functiongraph_06_0116.html", + "doc_type":"api", + "p_code":"54", + "code":"57" + }, + { + "desc":"This API is used to query the alias of a function version.GET /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}Status code: 200Status code: 401Status cod", + "product_code":"functiongraph", + "title":"Querying the Alias of a Function Version", + "uri":"functiongraph_06_0117.html", + "doc_type":"api", + "p_code":"54", + "code":"58" + }, + { + "desc":"This API is used to modify the alias of a function version.PUT /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}Status code: 200Status code: 400Status co", + "product_code":"functiongraph", + "title":"Modifying the Alias of a Function Version", + "uri":"functiongraph_06_0115.html", + "doc_type":"api", + "p_code":"54", + "code":"59" + }, + { + "desc":"This API is used to query the versions of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/versionsStatus code: 200Status code: 400Status code: 401Status code", + "product_code":"functiongraph", + "title":"Querying the Versions of a Function", + "uri":"functiongraph_06_0113.html", + "doc_type":"api", + "p_code":"54", + "code":"60" + }, + { + "desc":"This API is used to publish a function version.POST /v2/{project_id}/fgs/functions/{function_urn}/versionsStatus code: 200Status code: 400Status code: 401Status code: 403", + "product_code":"functiongraph", + "title":"Publishing a Function Version", + "uri":"functiongraph_06_0144.html", + "doc_type":"api", + "p_code":"54", + "code":"61" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Metrics", + "uri":"FunctionMetrics.html", + "doc_type":"api", + "p_code":"19", + "code":"62" + }, + { + "desc":"This API is used to query tenant-level function statistics.The statistics include function format, quota and usage, and traffic report.You can query data in a specific pe", + "product_code":"functiongraph", + "title":"Querying Tenant-Level Function Statistics", + "uri":"functiongraph_06_0139.html", + "doc_type":"api", + "p_code":"62", + "code":"63" + }, + { + "desc":"This API is used to query metrics of a function in a specified period.GET /v2/{project_id}/fgs/functions/{func_urn}/statistics/{period}Status code: 200Query metrics of a ", + "product_code":"functiongraph", + "title":"Querying Metrics in a Specified Period", + "uri":"functiongraph_06_0138.html", + "doc_type":"api", + "p_code":"62", + "code":"64" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Logs", + "uri":"FunctionLogs.html", + "doc_type":"api", + "p_code":"19", + "code":"65" + }, + { + "desc":"This API is used to query the LTS log group and stream settings of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/lts-log-detailStatus code: 200Status code:", + "product_code":"functiongraph", + "title":"Querying the Log Group and Stream of a Function", + "uri":"functiongraph_06_0145.html", + "doc_type":"api", + "p_code":"65", + "code":"66" + }, + { + "desc":"This API is used to enable log reporting to LTS.POST /v2/{project_id}/fgs/functions/enable-lts-logsStatus code: 429Enable log reporting to LTS.Status code: 429Too many re", + "product_code":"functiongraph", + "title":"Enabling Log Reporting to LTS", + "uri":"functiongraph_06_0112_01.html", + "doc_type":"api", + "p_code":"65", + "code":"67" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Templates", + "uri":"Templates.html", + "doc_type":"api", + "p_code":"19", + "code":"68" + }, + { + "desc":"This API is used to query a specified function template.GET /v2/{project_id}/fgs/templates/{template_id}Status code: 200Status code: 400Status code: 401Status code: 403St", + "product_code":"functiongraph", + "title":"Querying a Specified Function Template", + "uri":"functiongraph_23_1031_06.html", + "doc_type":"api", + "p_code":"68", + "code":"69" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Reserved Instances", + "uri":"ReservedInstances.html", + "doc_type":"api", + "p_code":"19", + "code":"70" + }, + { + "desc":"This API is used to query reserved instances of a function.GET /v2/{project_id}/fgs/functions/reservedinstanceconfigsStatus code: 200Status code: 400Status code: 401Statu", + "product_code":"functiongraph", + "title":"Querying Reserved Instances of a Function", + "uri":"functiongraph_06_0112_2.html", + "doc_type":"api", + "p_code":"70", + "code":"71" + }, + { + "desc":"This API is used to change the number of reserved instances.PUT /v2/{project_id}/fgs/functions/{function_urn}/reservedinstancesStatus code: 200Status code: 400Status code", + "product_code":"functiongraph", + "title":"Changing the Number of Reserved Instances", + "uri":"functiongraph_06_0112_1.html", + "doc_type":"api", + "p_code":"70", + "code":"72" + }, + { + "desc":"This API is used to query the number of instances reserved for a function.GET /v2/{project_id}/fgs/functions/reservedinstancesStatus code: 200Status code: 400Status code:", + "product_code":"functiongraph", + "title":"Querying the Number of Reserved Instances", + "uri":"functiongraph_06_0112_3.html", + "doc_type":"api", + "p_code":"70", + "code":"73" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Import and Export", + "uri":"FunctionImportAndExport.html", + "doc_type":"api", + "p_code":"19", + "code":"74" + }, + { + "desc":"This API is used to export a function.GET /v2/{project_id}/fgs/functions/{function_urn}/exportStatus code: 404Status code: 500Export function code only.GET /v2/{project_i", + "product_code":"functiongraph", + "title":"Exporting a Function", + "uri":"functiongraph_06_0108_1.html", + "doc_type":"api", + "p_code":"74", + "code":"75" + }, + { + "desc":"This API is used to import a function.POST /v2/{project_id}/fgs/functions/importStatus code: 200Status code: 409Status code: 500Import a function from a Base64-encoded fi", + "product_code":"functiongraph", + "title":"Importing a Function", + "uri":"functiongraph_06_0108_0.html", + "doc_type":"api", + "p_code":"74", + "code":"76" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Function Triggers", + "uri":"FunctionTriggers.html", + "doc_type":"api", + "p_code":"19", + "code":"77" + }, + { + "desc":"This API is used to delete all triggers of a function.If a non-latest function version is specified, all triggers corresponding to the version will be deleted.If an alias", + "product_code":"functiongraph", + "title":"Deleting All Triggers of a Function", + "uri":"functiongraph_06_0121.html", + "doc_type":"api", + "p_code":"77", + "code":"78" + }, + { + "desc":"This API is used to query all triggers of a function.GET /v2/{project_id}/fgs/triggers/{function_urn}Status code: 200Status code: 400Status code: 401Status code: 403Statu", + "product_code":"functiongraph", + "title":"Querying All Triggers of a Function", + "uri":"functiongraph_06_0119.html", + "doc_type":"api", + "p_code":"77", + "code":"79" + }, + { + "desc":"This API is used to create a trigger.Trigger types include timer, APIG, CTS, DDS, DMS, DIS, LTS, OBS, SMN, and Kafka.Trigger types include timer, APIG, CTS, DDS, DMS, DIS", + "product_code":"functiongraph", + "title":"Creating a Trigger", + "uri":"functiongraph_06_0122.html", + "doc_type":"api", + "p_code":"77", + "code":"80" + }, + { + "desc":"This API is used to delete a trigger.DELETE /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}Status code: 400Status code: 401Status code: 403S", + "product_code":"functiongraph", + "title":"Deleting a Trigger", + "uri":"functiongraph_06_0123.html", + "doc_type":"api", + "p_code":"77", + "code":"81" + }, + { + "desc":"This API is used to query a specified trigger.GET /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}Status code: 200Status code: 400Status code", + "product_code":"functiongraph", + "title":"Querying a Trigger", + "uri":"functiongraph_06_0120.html", + "doc_type":"api", + "p_code":"77", + "code":"82" + }, + { + "desc":"This API is used to update a trigger.PUT /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}Status code: 200Status code: 404Enable a trigger.Sta", + "product_code":"functiongraph", + "title":"Updating a Trigger", + "uri":"functiongraph_06_0124.html", + "doc_type":"api", + "p_code":"77", + "code":"83" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Asynchronous Execution Notification", + "uri":"AsynchronousExecutionNotification.html", + "doc_type":"api", + "p_code":"19", + "code":"84" + }, + { + "desc":"This API is used to query the asynchronous invocation setting of a function version.GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configStatus code: 200S", + "product_code":"functiongraph", + "title":"Querying Asynchronous Execution Notification Settings of a Function Version", + "uri":"functiongraph_06_0140.html", + "doc_type":"api", + "p_code":"84", + "code":"85" + }, + { + "desc":"This API is used to delete the asynchronous execution notification settings of a function.DELETE /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configStatus c", + "product_code":"functiongraph", + "title":"Deleting Asynchronous Execution Notification Settings", + "uri":"functiongraph_06_0141.html", + "doc_type":"api", + "p_code":"84", + "code":"86" + }, + { + "desc":"This API is used to configure asynchronous execution notification for a function.PUT /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configStatus code: 200Stat", + "product_code":"functiongraph", + "title":"Configuring Asynchronous Execution Notification", + "uri":"functiongraph_06_0142.html", + "doc_type":"api", + "p_code":"84", + "code":"87" + }, + { + "desc":"This API is used to query the asynchronous execution notification settings of a function's all versions.GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-con", + "product_code":"functiongraph", + "title":"Querying Asynchronous Execution Notification Settings of a Function's All Versions", + "uri":"functiongraph_06_0143.html", + "doc_type":"api", + "p_code":"84", + "code":"88" + }, + { + "desc":"This API is used to query the asynchronous invocation requests of a function.GET /v2/{project_id}/fgs/functions/{function_urn}/async-invocationsStatus code: 200Status cod", + "product_code":"functiongraph", + "title":"Querying Asynchronous Invocation Requests", + "uri":"functiongraph_06_0112_00_3.html", + "doc_type":"api", + "p_code":"84", + "code":"89" + }, + { + "desc":"This API is used to stop asynchronous invocation of a function with N concurrent instances. When calling this API, set recursive to false and force to true. The API will ", + "product_code":"functiongraph", + "title":"Stopping an Asynchronous Invocation Request", + "uri":"functiongraph_06_0146_00_1.html", + "doc_type":"api", + "p_code":"84", + "code":"90" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Appendix", + "uri":"functiongraph_06_1300.html", + "doc_type":"api", + "p_code":"", + "code":"91" + }, + { + "desc":"Table 1 describes the status codes.", + "product_code":"functiongraph", + "title":"Status Codes", + "uri":"functiongraph_06_1310.html", + "doc_type":"api", + "p_code":"91", + "code":"92" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"functiongraph", + "title":"Error Codes", + "uri":"ErrorCode.html", + "doc_type":"api", + "p_code":"91", + "code":"93" + }, + { + "desc":"When calling APIs, you need to enter a project ID in some URLs. To obtain a project ID, perform the following steps:Log in to the management console.Click the username an", + "product_code":"functiongraph", + "title":"Obtaining a Project ID", + "uri":"functiongraph_06_0260.html", + "doc_type":"api", + "p_code":"91", + "code":"94" + }, + { + "desc":"This section describes the function metrics reported to Cloud Eye.Their namespace and dimension are also included. You can view monitoring graphs and alarm messages on th", + "product_code":"functiongraph", + "title":"FunctionGraph Metrics", + "uri":"functiongraph_06_1340.html", + "doc_type":"api", + "p_code":"91", + "code":"95" + } +] \ No newline at end of file diff --git a/docs/fg/api-ref/Dependencies.html b/docs/fg/api-ref/Dependencies.html new file mode 100644 index 00000000..5f81fb83 --- /dev/null +++ b/docs/fg/api-ref/Dependencies.html @@ -0,0 +1,24 @@ + + +

Dependencies

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/ErrorCode.html b/docs/fg/api-ref/ErrorCode.html new file mode 100644 index 00000000..9e9c5526 --- /dev/null +++ b/docs/fg/api-ref/ErrorCode.html @@ -0,0 +1,1482 @@ + + +

Error Codes

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 FunctionGraph error codes

Status Code

+

Error Code

+

Error Message

+

Description

+

400

+

FSS.0400

+

Invalid parameter.

+

Invalid request parameters.

+

401

+

FSS.0401

+

Unauthorized access.

+

Access denied.

+

403

+

FSS.0403

+

Forbidden

+

Unauthorized operation.

+

404

+

FSS.0404

+

The specified resource was not found.

+

The resource cannot be found.

+

406

+

FSS.0406

+

Not acceptable.

+

Incorrect request format. For example, the request body may not be in the required JSON format.

+

408

+

FSS.0408

+

Request timeout.

+

Request timed out.

+

409

+

FSS.0409

+

The specified resource already exists.

+

The resource already exists.

+

410

+

FSS.0410

+

The specified resource does not exist.

+

The specified resource does not exist.

+

413

+

FSS.0413

+

The request body is too large.

+

The request body exceeds the maximum allowed limit.

+

424

+

FSS.0424

+

Invalid dependency.

+

Invalid dependency.

+

426

+

FSS.0426

+

An upgrade is required.

+

Unsupported operation. Perform an upgrade.

+

428

+

FSS.0428

+

The preconditions have not been met.

+

The prerequisite has not been met. For example, you must delete related resources before deleting a resource.

+

429

+

FSS.0429

+

Too many requests.

+

Too many concurrent requests. Please try again later.

+

500

+

FSS.0500

+

Internal server error.

+

The service is temporarily abnormal due to an internal invocation error. Please try again later.

+

502

+

FSS.0502

+

Bad gateway.

+

Gateway error.

+

503

+

FSS.0503

+

Service unavailable.

+

Service unavailable.

+

504

+

FSS.0504

+

Gateway timeout.

+

Gateway timed out.

+

400

+

FSS.1001

+

Invalid query parameter.

+

Invalid query parameter.

+

400

+

FSS.1002

+

Invalid function name.

+

Invalid function name.

+

400

+

FSS.1003

+

Invalid function handler.

+

Invalid handler.

+

400

+

FSS.1004

+

Invalid Package (function app).

+

Invalid function package.

+

400

+

FSS.1005

+

Invalid runtime.

+

Invalid runtime.

+

400

+

FSS.1006

+

Invalid function code entry mode.

+

Invalid code type.

+

400

+

FSS.1007

+

Invalid function memory.

+

Invalid memory.

+

400

+

FSS.1008

+

Invalid function timeout.

+

Invalid timeout.

+

400

+

FSS.1009

+

Invalid function UserData.

+

Invalid environment variables.

+

400

+

FSS.1010

+

Invalid URL.

+

Invalid URL.

+

400

+

FSS.1011

+

Invalid function code.

+

Invalid function code.

+

400

+

FSS.1012

+

The function code must be configured.

+

The function code cannot be left blank.

+

400

+

FSS.1013

+

Invalid file type.

+

Invalid file type.

+

400

+

FSS.1014

+

Invalid function alias.

+

Invalid alias.

+

400

+

FSS.1015

+

Invalid function version.

+

Invalid version.

+

400

+

FSS.1016

+

The function cannot be published because no changes have been made since last publication.

+

The function code cannot be published because it has not been changed since last publication.

+

400

+

FSS.1017

+

The number of items in the UserData field exceeds the maximum allowed limit (20).

+

The number of environment variables exceeds 20.

+

400

+

FSS.1018

+

The total size of the UserData field exceeds the maximum allowed limit (2 KB).

+

The total size of environment variables exceeds 2 KB.

+

400

+

FSS.1019

+

The description exceeds the maximum allowed limit.

+

The maximum length is 512 characters.

+

400

+

FSS.1021

+

invalid service link agency.

+

Failed to create the service-linked agency.

+

400

+

FSS.1022

+

Only one YAML file is allowed.

+

Only one YAML file is allowed.

+

400

+

FSS.1023

+

The imported file is too large.

+

The imported file exceeds the maximum allowed limit.

+

400

+

FSS.1024

+

Invalid dependency.

+

Invalid dependency.

+

400

+

FSS.1025

+

Invalid YAML file.

+

Invalid YAML file.

+

400

+

FSS.1026

+

Invalid Concurrency.

+

Invalid concurrency policy.

+

400

+

FSS.1027

+

Invalid packageName (app name).

+

Invalid package or app name.

+

400

+

FSS.1028

+

The app cannot be deleted because it contains functions.

+

The app cannot be deleted because it contains functions.

+

400

+

FSS.1029

+

The default app cannot be deleted.

+

The default app cannot be deleted.

+

400

+

FSS.1031

+

The dependency already exists.

+

The dependency already exists.

+

400

+

FSS.1032

+

Invalid dependency type.

+

Invalid dependency type. Currently, only local ZIP packages or packages from OBS can be uploaded.

+

412

+

FSS.1033

+

The dependency is currently in use.

+

Failed to delete the dependency because it is in use.

+

400

+

FSS.1034

+

Invalid image URL.

+

Invalid image URL.

+

400

+

FSS.1035

+

The image does not exist.

+

The image does not exist.

+

400

+

FSS.1036

+

The VPC does not exist.

+

The VPC does not exist.

+

400

+

FSS.1037

+

No subnet matches the specified ID.

+

No matched subnets found.

+

400

+

FSS.1038

+

The file system configuration already exists in the function.

+

The file system configuration already exists in the function.

+

400

+

FSS.1039

+

The mounting path is invalid.

+

Invalid mounting path.

+

403

+

FSS.1040

+

The selected Xrole does not have permissions to mount the resources.

+

The selected agency does not have permissions to mount the resources.

+

403

+

FSS.1041

+

The number of functions exceeds the maximum allowed limit.

+

The number of functions exceeds 400.

+

403

+

FSS.1042

+

The total code size of functions exceeds the maximum allowed limit.

+

The total size of functions exceeds 20 GB.

+

403

+

FSS.1043

+

The number of aliases exceeds the maximum allowed limit.

+

The number of aliases exceeds the maximum allowed limit.

+

403

+

FSS.1044

+

The number of apps exceeds the maximum allowed limit (400).

+

The number of apps exceeds 400.

+

403

+

FSS.1045

+

The number of dependencies exceeds the maximum allowed limit.

+

The number of dependencies exceeds the maximum allowed limit.

+

403

+

FSS.1046

+

The dependency is inaccessible.

+

The dependency is unavailable.

+

403

+

FSS.1047

+

The number of bound VPCs exceeds the maximum limit allowed for a tenant.

+

The number of bound VPCs exceeds the maximum limit allowed for a tenant.

+

403

+

FSS.1048

+

The number of bound VPCs exceeds the maximum limit allowed for a project.

+

The number of bound VPCs exceeds the maximum limit allowed for a project.

+

403

+

FSS.1049

+

The number of file systems mounted to the function exceeds the maximum allowed limit (5).

+

The number of file systems mounted to the function exceeds 5.

+

404

+

FSS.1050

+

The mounted resource cannot be found.

+

The mounted resource cannot be found.

+

404

+

FSS.1051

+

The function does not exist.

+

The function cannot be found.

+

404

+

FSS.1052

+

The version does not exist.

+

The version cannot be found.

+

404

+

FSS.1053

+

The alias does not exist.

+

The alias cannot be found.

+

404

+

FSS.1054

+

The function app does not exist in OBS.

+

The specified code package cannot be found in OBS.

+

404

+

FSS.1055

+

The app does not exist.

+

The specified function app cannot be found in OBS.

+

404

+

FSS.1056

+

The dependency does not exist.

+

The dependency does not exist.

+

404

+

FSS.1057

+

The function name does not exist in the YAML file.

+

The function name does not exist in the YAML file.

+

400

+

FSS.1058

+

The app name and function name cannot be the same in the YAML file.

+

The combination of the app name and function name cannot be the same in the YAML file.

+

404

+

FSS.1059

+

The function template does not exist.

+

The function template does not exist.

+

404

+

FSS.1060

+

The event template cannot be found.

+

The event template does not exist.

+

409

+

FSS.1061

+

The function already exists.

+

The function already exists.

+

409

+

FSS.1062

+

The version already exists.

+

The version already exists.

+

409

+

FSS.1063

+

The alias already exists.

+

The alias already exists.

+

409

+

FSS.1064

+

The app already exists.

+

The app already exists.

+

409

+

FSS.1065

+

The dependency already exists.

+

The dependency already exists.

+

409

+

FSS.1066

+

The version is already in use by another alias.

+

The version is already in use by another alias.

+

409

+

FSS.1067

+

The function template already exists.

+

The function template already exists.

+

403

+

FSS.1068

+

The number of events configured for the function exceeds the maximum allowed limit.

+

The number of events configured for the function exceeds the maximum allowed limit.

+

403

+

FSS.1069

+

The size of EventData exceeds 4 KB.

+

The event size exceeds 4 KB.

+

404

+

FSS.1070

+

The event cannot be found.

+

The event cannot be found.

+

413

+

FSS.1071

+

The size of the code package to be uploaded exceeds the maximum allowed limit (50 MB).

+

The size of the code package to be uploaded exceeds 50 MB.

+

413

+

FSS.1072

+

The size of the inline code exceeds the maximum allowed limit (10 KB).

+

The code exceeds 10 KB.

+

403

+

FSS.1073

+

The function event already exists.

+

The function event already exists.

+

400

+

FSS.1074

+

The event field is invalid.

+

Invalid event field.

+

400

+

FSS.1075

+

The user ID and user group ID must be an integer from –1 to 65,534, excluding 0, 1000, and 1002.

+

The user ID and user group ID must be an integer from –1 to 65,534, excluding 0, 1000, and 1002.

+

412

+

FSS.1090

+

The subnet is not in the ACTIVE state.

+

The subnet is not in the ACTIVE state.

+

400

+

FSS.1091

+

The additional version is invalid.

+

Invalid additional version.

+

400

+

FSS.1092

+

The weight of the additional version is invalid.

+

The weight of the additional version is invalid.

+

400

+

FSS.1093

+

The major version and the additional version cannot be the same.

+

The major version and the additional version cannot be the same.

+

403

+

FSS.1094

+

The version cannot be deleted because it has been used as the additional version of an alias.

+

The version cannot be deleted because it has been used as the additional version of an alias.

+

412

+

FSS.1095

+

The mounted resource is not ready.

+

The mounted resource is not ready.

+

403

+

FSS.1096

+

The file sharing protocol of the mounted resource is not NFS.

+

The file sharing protocol of the mounted resource is not NFS.

+

400

+

FSS.1101

+

Invalid trigger type.

+

Invalid trigger type.

+

400

+

FSS.1102

+

Invalid SMN trigger parameters.

+

Invalid SMN trigger parameters.

+

400

+

FSS.1106

+

Invalid OBS trigger parameters.

+

Invalid OBS trigger parameters.

+

400

+

FSS.1107

+

Invalid APIG trigger parameters.

+

Invalid APIG trigger parameters.

+

403

+

FSS.1108

+

The bucket configuration of the current trigger conflicts with that of an existing OBS trigger.

+

The bucket configuration of the current trigger conflicts with that of an existing OBS trigger.

+

400

+

FSS.1109

+

Invalid timer trigger parameters.

+

Invalid timer trigger parameters.

+

404

+

FSS.1111

+

The Kafka resource cannot be found.

+

The Kafka resource cannot be found.

+

400

+

FSS.1112

+

The Kafka trigger parameters are invalid.

+

Invalid Kafka trigger parameters.

+

400

+

FSS.1113

+

The username and password must be specified because Kafka SASL_SSL is enabled.

+

The username and password must be specified because Kafka SASL_SSL is enabled.

+

400

+

FSS.1114

+

The subnet of the function must be the same as that of the Kafka instance.

+

The subnet of the function is different from that of the Kafka instance.

+

503

+

FSS.1115

+

The network is unreachable.

+

The network is unreachable.

+

400

+

FSS.1116

+

Kafka instance configuration error. Please check the username and password.

+

Kafka instance configuration error. Check the username and password.

+

400

+

FSS.1117

+

Failed to query messages from the Kafka instance.

+

Failed to query messages from the Kafka instance.

+

401

+

FSS.1118

+

Access denied.

+

Access denied. The user is not in the whitelist.

+

403

+

FSS.1121

+

Forbidden

+

Access denied. Check whether the corresponding agency has been configured.

+

403

+

FSS.1122

+

Forbidden

+

Access denied. Check whether the corresponding agency has been configured.

+

403

+

FSS.1123

+

The number of pull triggers exceeds the maximum allowed limit.

+

The number of pull-mode triggers has reached 10.

+

403

+

FSS.1124

+

The number of APIs exceeds the maximum allowed limit.

+

The number of APIs exceeds the maximum allowed limit.

+

403

+

FSS.1125

+

Forbidden

+

Access denied.

+

403

+

FSS.1126

+

You do not have permissions to call the API.

+

You do not have permissions to call the API.

+

403

+

FSS.1127

+

The EPS user does not have permissions to call the API.

+

The EPS user does not have permissions to call the API.

+

403

+

FSS.1128

+

list enterprise failed.

+

Failed to list the enterprise projects for which you have permission.

+

404

+

FSS.1131

+

The trigger does not exist.

+

The trigger cannot be found.

+

404

+

FSS.1132

+

The SMN trigger does not exist. View the SMN console.

+

The SMN trigger cannot be found.

+

404

+

FSS.1136

+

The OBS trigger does not exist.

+

The OBS trigger cannot be found.

+

404

+

FSS.1137

+

Invalid trigger type.

+

The trigger type cannot be found.

+

404

+

FSS.1138

+

The APIG trigger does not exist.

+

The APIG trigger cannot be found.

+

404

+

FSS.1140

+

The timer trigger does not exist.

+

The timer trigger cannot be found.

+

409

+

FSS.1141

+

The SMN trigger already exists.

+

The SMN trigger already exists.

+

409

+

FSS.1145

+

The OBS trigger already exists.

+

The OBS trigger already exists.

+

409

+

FSS.1146

+

The APIG trigger already exists.

+

The APIG trigger already exists.

+

409

+

FSS.1147

+

The request path already exists.

+

The request path already exists.

+

409

+

FSS.1148

+

The timer trigger already exists.

+

The timer trigger already exists.

+

409

+

FSS.1150

+

The Kafka trigger already exists.

+

The Kafka trigger already exists.

+

406

+

FSS.1151

+

The OBS bucket is in a different region.

+

The region where the OBS bucket is located does not match the current region.

+

426

+

FSS.1152

+

The selected bucket cannot be used to create a trigger.

+

The selected OBS bucket cannot be used to create a trigger.

+

412

+

FSS.1153

+

The triggering conditions have not been met.

+

The triggering conditions have not been met.

+

403

+

FSS.1154

+

Aliases of a function bound with triggers cannot be deleted.

+

The aliases cannot be deleted because they are bound with triggers.

+

500

+

FSS.1162

+

The operation cannot take effect immediately due to service exception.

+

The operation cannot take effect immediately because the service is abnormal.

+

503

+

FSS.1169

+

The network is unreachable.

+

The network is unreachable.

+

404

+

FSS.1171

+

The SMN topic does not exist. Create one on the SMN console.

+

The SMN topic does not exist.

+

400

+

FSS.1172

+

The database or collection does not exist.

+

The DB instance cannot be found.

+

400

+

FSS.1221

+

lts log has been enabled.

+

LTS has already been enabled.

+

404

+

FSS.1174

+

The Kafka trigger does not exist.

+

The Kafka trigger cannot be found.

+

413

+

FSS.1201

+

The request body is too large.

+

The request body exceeds the maximum allowed limit.

+

500

+

FSS.1202

+

The response body or callback body is invalid because they do not contain any status code.

+

Invalid response body.

+

500

+

FSS.1302

+

Failed to save the data.

+

Failed to save the trigger data.

+

400

+

FSS.1303

+

Access denied due to insufficient permissions.

+

Failed to verify permission. Access denied.

+

400

+

FSS.1306

+

The number of triggers exceeds the maximum allowed limit.

+

Trigger threshold reached.

+

400

+

FSS.1307

+

The trigger name already exists.

+

The trigger name already exists.

+

400

+

FSS.1308

+

The operation resource does not exist.

+

The resource does not exist.

+

400

+

FSS.1309

+

Invalid function URN.

+

Invalid function URN.

+

400

+

FSS.1310

+

Unauthorized user.

+

Failed to obtain the user token.

+

400

+

FSS.1312

+

The notification name must be specified.

+

No key notification name specified.

+

400

+

FSS.1313

+

The number of operation resources has reached the maximum allowed limit.

+

The number of operation resources exceeds 100.

+

400

+

FSS.1314

+

The operation resource must be specified.

+

No operation resource specified.

+

400

+

FSS.1316

+

The resource operation has already been selected.

+

Duplicate operation resource.

+

400

+

FSS.1317

+

The trigger name is too long.

+

The trigger name is too long.

+

400

+

FSS.1318

+

Invalid trigger operation.

+

Invalid trigger operation.

+

502

+

FSS.1319

+

Invalid trigger name.

+

Invalid trigger name.

+

503

+

FSS.1401

+

Failed to obtain the image information.

+

Failed to obtain the image information.

+

503

+

FSS.1402

+

Failed to pull the image to create a container.

+

Failed to pull the image to create a container.

+

503

+

FSS.1403

+

Failed to pull the image to delete a container.

+

Failed to pull the image to delete a container.

+

400

+

FSS.1404

+

Invalid function initializer.

+

Invalid function initializer.

+

400

+

FSS.1405

+

Invalid initialization timeout.

+

Invalid initialization timeout.

+
+
+
+
+ +
+ diff --git a/docs/fg/api-ref/FunctionImportAndExport.html b/docs/fg/api-ref/FunctionImportAndExport.html new file mode 100644 index 00000000..ee362c73 --- /dev/null +++ b/docs/fg/api-ref/FunctionImportAndExport.html @@ -0,0 +1,18 @@ + + +

Function Import and Export

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/FunctionInvocation.html b/docs/fg/api-ref/FunctionInvocation.html new file mode 100644 index 00000000..d8aa67a1 --- /dev/null +++ b/docs/fg/api-ref/FunctionInvocation.html @@ -0,0 +1,18 @@ + + +

Function Invocation

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/FunctionLifecycleManagement.html b/docs/fg/api-ref/FunctionLifecycleManagement.html new file mode 100644 index 00000000..d30fb628 --- /dev/null +++ b/docs/fg/api-ref/FunctionLifecycleManagement.html @@ -0,0 +1,46 @@ + + +

Function Lifecycle Management

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/FunctionLogs.html b/docs/fg/api-ref/FunctionLogs.html new file mode 100644 index 00000000..b2932b0f --- /dev/null +++ b/docs/fg/api-ref/FunctionLogs.html @@ -0,0 +1,18 @@ + + +

Function Logs

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/FunctionMetrics.html b/docs/fg/api-ref/FunctionMetrics.html new file mode 100644 index 00000000..c792eab9 --- /dev/null +++ b/docs/fg/api-ref/FunctionMetrics.html @@ -0,0 +1,18 @@ + + +

Function Metrics

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/FunctionQuotas.html b/docs/fg/api-ref/FunctionQuotas.html new file mode 100644 index 00000000..855252c5 --- /dev/null +++ b/docs/fg/api-ref/FunctionQuotas.html @@ -0,0 +1,16 @@ + + +

Function Quotas

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/FunctionTriggers.html b/docs/fg/api-ref/FunctionTriggers.html new file mode 100644 index 00000000..1af742d9 --- /dev/null +++ b/docs/fg/api-ref/FunctionTriggers.html @@ -0,0 +1,26 @@ + + +

Function Triggers

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/PARAMETERS.txt b/docs/fg/api-ref/PARAMETERS.txt new file mode 100644 index 00000000..6da8d5f0 --- /dev/null +++ b/docs/fg/api-ref/PARAMETERS.txt @@ -0,0 +1,3 @@ +version="" +language="en-us" +type="" \ No newline at end of file diff --git a/docs/fg/api-ref/ReservedInstances.html b/docs/fg/api-ref/ReservedInstances.html new file mode 100644 index 00000000..ab8a2757 --- /dev/null +++ b/docs/fg/api-ref/ReservedInstances.html @@ -0,0 +1,20 @@ + + +

Reserved Instances

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/Templates.html b/docs/fg/api-ref/Templates.html new file mode 100644 index 00000000..8f4f2caf --- /dev/null +++ b/docs/fg/api-ref/Templates.html @@ -0,0 +1,16 @@ + + +

Function Templates

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/TestEvents.html b/docs/fg/api-ref/TestEvents.html new file mode 100644 index 00000000..a127dd9d --- /dev/null +++ b/docs/fg/api-ref/TestEvents.html @@ -0,0 +1,24 @@ + + +

Test Events

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/VersionsandAliases.html b/docs/fg/api-ref/VersionsandAliases.html new file mode 100644 index 00000000..1bfe37da --- /dev/null +++ b/docs/fg/api-ref/VersionsandAliases.html @@ -0,0 +1,28 @@ + + +

Versions and Aliases

+

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/en-us_image_0000001433216038.gif b/docs/fg/api-ref/en-us_image_0000001433216038.gif new file mode 100644 index 00000000..3e6a5bce Binary files /dev/null and b/docs/fg/api-ref/en-us_image_0000001433216038.gif differ diff --git a/docs/fg/api-ref/en-us_image_0000001483132793.gif b/docs/fg/api-ref/en-us_image_0000001483132793.gif new file mode 100644 index 00000000..8d50ba8c Binary files /dev/null and b/docs/fg/api-ref/en-us_image_0000001483132793.gif differ diff --git a/docs/fg/api-ref/en-us_image_0000001483376169.png b/docs/fg/api-ref/en-us_image_0000001483376169.png new file mode 100644 index 00000000..94976dcb Binary files /dev/null and b/docs/fg/api-ref/en-us_image_0000001483376169.png differ diff --git a/docs/fg/api-ref/functiongraph_06_0100.html b/docs/fg/api-ref/functiongraph_06_0100.html new file mode 100644 index 00000000..ad4638d0 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0100.html @@ -0,0 +1,12 @@ + + +

Overview

+

Welcome to FunctionGraph. FunctionGraph hosts and computes event-driven functions in a serverless context while ensuring high availability, high scalability, and zero maintenance. All you need to do is write your code and set conditions. You pay only for what you use and you are not charged when your code is not running.

+

This document describes how to use application programming interfaces (APIs) to perform operations on FunctionGraph resources, such as creating, deleting, query, and executing functions. For details about all supported operations, see API Overview.

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0101.html b/docs/fg/api-ref/functiongraph_06_0101.html new file mode 100644 index 00000000..5660aabe --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0101.html @@ -0,0 +1,17 @@ + + +

Function Model Definition

+
+
+ + + +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0102.html b/docs/fg/api-ref/functiongraph_06_0102.html new file mode 100644 index 00000000..43ea092e --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0102.html @@ -0,0 +1,550 @@ + + +

Function Model

+

Function Model

The function model of FunctionGraph is as follows:

+
{ 
+  "functions": [ 
+   { 
+    "func_urn": "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test", 
+    "func_name": "test", 
+    "domain_id": "cff01_hk", 
+    "namespace": "7aad83af3e8d42e99ac194e8419e2c9b", 
+    "project_name": "xxxxxxxxxx", 
+    "package": "default", 
+    "runtime": "Node.js6.10", 
+    "timeout": 3, 
+    "handler": "test.handler", 
+    "memory_size": 128, 
+    "cpu": 300, 
+    "code_type": "inline", 
+    "code_url": "", 
+    "code_filename": "index.js", 
+    "code_size": 272, 
+    "user_data": "", 
+    "digest": "decbce6939297b0b5ec6d1a23bf9c725870f5e69fc338a89a6a4029264688dc26338f56d08b6535de47f15ad538e22ca66613b9a46f807d50b687bb53fded1c6", 
+    "version": "latest", 
+    "image_name": "latest-5qe8e", 
+    "xrole": "cff",
+    "app_xrole": null, 
+    "description": "111", 
+    "version_description": "", 
+    "last_modified": "2018-03-28T11:30:32+08:00",
+"func_code": {
+  "file": "",
+  "link": ""
+ },
+ "func_vpc":null,
+ "mount_config":null,
+ "depend_list": null,
+ "strategy_config": {
+     "concurrency": -1
+ },
+ "extend_config": "",
+ "dependencies": null,
+"initializer_handler": "index.initializer",
+"initializer_timeout": 3  
+   } 
+  ], 
+  "next_marker": 45 
+ }
+
+

Description

Table 1 describes the parameters in the function model.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 Parameters in the function model

Parameter

+

Description

+

func_urn

+

Function URN.

+

func_name

+

Function name.

+

domain_id

+

Tenant name.

+

namespace

+

Project ID.

+

project_name

+

Project name.

+

package

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

Environment for executing the function. FunctionGraph supports Node.js 6.10, Node.js 8.10, Node.js 10.16, Node.js 12.13, Python 2.7, Python 3.6, Java 8, Go 1.8, C# (.NET Core 2.0), C# (.NET Core 2.1), C# (.NET Core 3.1), and PHP 7.3.

+

timeout

+

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

+

handler

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the entry point function is handler.

+

memory_size

+

Memory (MB) consumed by the function.

+

Options: 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, and 4096.

+

cpu

+

Number of CPU millicores used by the function (1 core = 1000 millicores).

+

The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory. The value is calculated as follows: Memory/128 x 100 + 200 (basic CPU millicores).

+

code_type

+

Function code type. Options:

+
  • inline: inline code
  • zip: ZIP file
  • jar: JAR file (mainly for Java functions)
  • obs: function code stored in an Object Storage Service (OBS) bucket
+

code_url

+
  • When code_type is set to obs, this parameter indicates the address of a function code package in OBS.
  • When code_type is set to inline, zip, or jar, this parameter is left blank.
+

code_filename

+

Function file name.

+
  • When code_type is set to zip or jar, this parameter is required.
  • When code_type is set to obs or inline, this parameter is not required.
+

code_size

+

Code size in bytes.

+

user_data

+

Name/Value information defined for the function.

+

For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

digest

+

SHA512 hash value of function code, which is used to determine whether the function is changed.

+

version

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

Internal identifier of a function version.

+

xrole

+

Agency used by the function. You need to create an agency on the Identity and Access Management (IAM) console. This field is mandatory when a function needs to access other services.

+

app_xrole

+

Agency used by the function app. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

description

+

Description of the function.

+

version_description

+

Description of the function version.

+

last_modified

+

Time when the function was last updated.

+

func_code

+

Function code. See Table 2.

+

depend_list

+

Dependency list.

+

strategy_config

+

Function policy configuration. See Table 3.

+

extend_config

+

Function extension configuration.

+

dependencies

+

Dependency list. See Table 5.

+

initializer_handler

+

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

+

For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Maximum duration the function can be initialized. Value range: 1s–300s.

+

func_vpc

+

Virtual Private Cloud (VPC) configuration. See Table 4.

+

mount_config

+

File system configuration. See Table 6.

+
+
+ +
+ + + + + + + + + + +
Table 2 func_code parameters

Parameter

+

Description

+

file

+

Function code. Nothing will be returned.

+

link

+

Function code link. Nothing will be returned.

+
+
+ +
+ + + + + + + +
Table 3 strategy_config parameter

Parameter

+

Description

+

concurrency

+
  • 0: The function is disabled.
  • -1: The function is enabled.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 func_vpc parameters

Parameter

+

Type

+

Mandatory

+

Description

+

vpc_name

+

String

+

-

+

VPC name.

+

vpc_id

+

String

+

Yes when func_vpc is not empty.

+

VPC ID.

+

subnet_name

+

String

+

-

+

Subnet name.

+

subnet_id

+

String

+

Yes when func_vpc is not empty.

+

Subnet ID.

+

cidr

+

String

+

-

+

Subnet mask.

+

gateway

+

String

+

-

+

Gateway.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 dependency parameters

Parameter

+

Type

+

Mandatory

+

Description

+

owner

+

String

+

-

+

Domain ID of the dependency owner.

+

link

+

String

+

-

+

URL of the dependency package on OBS.

+

runtime

+

String

+

-

+

Language of the dependency package (only used for classification purposes).

+

etag

+

String

+

-

+

MD5 value of the dependency package.

+

size

+

Int

+

-

+

Size of the dependency package.

+

name

+

String

+

-

+

Name of the dependency package.

+

description

+

String

+

-

+

Description of the dependency package.

+

file_name

+

String

+

-

+

File name of the dependency package (ZIP).

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 6 mount_config parameters

Parameter

+

Type

+

Mandatory

+

Description

+

mount_user

+

mount_user

+

-

+

File system user configuration.

+

func_mounts

+

func_mounts

+

-

+

File system list.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 7 mount_user parameters

Parameter

+

Type

+

Mandatory

+

Description

+

user_id

+

Int

+

Yes when mount_user is not empty.

+

User ID, which is an integer from –1 to 65,534, excluding 0, 1000, and 1002.

+

user_group_id

+

Int

+

Yes when mount_user is not empty.

+

User group ID, which is an integer from –1 to 65,534, excluding 0, 1000, and 1002.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 8 func_mounts parameters

Parameter

+

Type

+

Mandatory

+

Description

+

mount_type

+

String

+

Yes when func_mounts is not empty.

+

Mount type. Options: ecs.

+

mount_resource

+

String

+

Yes when func_mounts is not empty.

+

ID of the mounted resource (corresponding cloud service).

+

mount_share_path

+

String

+

Yes when mount_type is set to ecs.

+

Remote mount path. Example: 192.168.0.12:/data.

+

local_mount_path

+

String

+

Yes when func_mounts is not empty.

+

Function access path.

+
+
+

The format of a function URN is as follows:

+
urn:fss:<region_id>:<project_id>:function:<package>:<function_name>[:<version>|:!<alias>]
+

A function URN is divided into eight fields by colons. The value of region_id is included in the system configuration. You can set this parameter to the same as that in the backend. The content in the brackets ([]) is a function version or alias. If you enter an alias, add an exclamation mark (!) in front of it for easy identification.

+
+

When a function URN is used as an API parameter, you can provide it in a simplified format as follows:

+ +
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0103.html b/docs/fg/api-ref/functiongraph_06_0103.html new file mode 100644 index 00000000..87ab1f0d --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0103.html @@ -0,0 +1,503 @@ + + +

Trigger Management Models

+

Trigger Type Model

{ 
+    "trigger_type_code":"string", 
+    "display_name":"string", 
+    "status":"string", 
+    "event_codes":"array of string", 
+    "description":"string" 
+}
+

Table 1 describes the parameters in the trigger type model.

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Parameters in the trigger type model

Parameter

+

Description

+

trigger_type_code

+

Trigger type code. Options: SMN, APIG, TIMER, DMS, kafka, DDS, CTS, DIS, LTS, and OBS.

+

display_name

+

Trigger type value.

+

status

+

Trigger type status. Options:

+
  • DISABLED: The trigger is disabled.
  • TEST: The trigger is under test and invisible to clients.
  • ACTIVE: The trigger is available.
+

description

+

Trigger description.

+
+
+
+

Trigger Instance Model

{ 
+    "trigger_id":"string",
+    "trigger_type_code":"string",
+    "event_type_code":"string",
+    "status":"string",
+    "event_data":"json struct",
+    "last_updated_time":"string",
+    "created_time":"string" 
+}
+

Table 2 describes the parameters in the trigger instance model.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2 Parameters in the trigger instance model

Parameter

+

Description

+

trigger_id

+

Trigger ID.

+

trigger_type_code

+

Trigger type code. Options: SMN, APIG, TIMER, DMS, kafka, DDS, CTS, DIS, LTS, and OBS.

+

event_type_code

+

Event type code. This parameter is mandatory. It can be any non-null character string. This parameter is not used currently.

+

status

+

Trigger status. Options: ACTIVE and DISABLED.

+

event_data

+

Trigger data defined in JSON format.

+

last_updated_time

+

Time when the trigger was last updated.

+

created_time

+

Time when the trigger was created.

+
+
+
+

Trigger Instance Data

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0105.html b/docs/fg/api-ref/functiongraph_06_0105.html new file mode 100644 index 00000000..ba63ab1a --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0105.html @@ -0,0 +1,663 @@ + + +

Querying Functions

+

Function

This API is used to query all functions.

+
+

URI

GET /v2/{project_id}/fgs/functions

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

marker

+

No

+

String

+

Final record queried last time.

+

maxitems

+

No

+

String

+

Maximum number of functions that can be queried each time.

+

Maximum value: 400.

+

If this parameter is not set or is 0 or greater than 400, the default value 400 is used.

+

If this parameter is less than 0, a message indicating parameter error is returned.

+

package_name

+

No

+

String

+

Name of the group.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

functions

+

Array of ListFunctionResult objects

+

Function list.

+

next_marker

+

Integer

+

Next read location.

+

count

+

Long

+

Total number of functions that match the query conditions.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListFunctionResult

Parameter

+

Type

+

Description

+

resource_id

+

String

+

Resource ID.

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image. Unit: MB. Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384. Range: 1024 to 16,384.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

String

+

Address of the function code package in OBS.

+

code_filename

+

String

+

Function file name.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version.

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

app_xrole

+

String

+

Agency used by the function app. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

description

+

String

+

Function description.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc_id

+

String

+

VPC ID.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

extend_config

+

String

+

Extended configuration.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

is_bridge_function

+

Boolean

+

Whether this is a bridge function.

+

bind_bridge_funcUrns

+

Array of strings

+

URNs bound to the bridge function.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query functions of the current tenant.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions?marker=0&maxitems=400
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "functions" : [ {
+    "func_urn" : "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test",
+    "resource_id" : "0d075978-5a54-4ee1-8e24-ff5bd070xxxx:test",
+    "func_name" : "test",
+    "domain_id" : "cff01_hk",
+    "namespace" : "7aad83af3e8d42e99ac194e8419e2c9b",
+    "project_name" : "xxxxxxxx",
+    "package" : "default",
+    "runtime" : "Node.js6.10",
+    "timeout" : 3,
+    "handler" : "test.handler",
+    "memory_size" : 128,
+    "cpu" : 300,
+    "code_type" : "inline",
+    "code_filename" : "index.js",
+    "code_size" : 272,
+    "digest" : "decbce6939297b0b5ec6d1a23bf9c725870f5e69fc338a89a6a4029264688dc26338f56d08b6535de47f15ad538e22ca66613b9a46f807d50b687bb53fded1c6",
+    "version" : "latest",
+    "xrole" : "cff",
+    "image_name" : "latest-191025153727@zehht",
+    "last_modified" : "2019-10-25 15:37:27",
+    "strategy_config" : {
+      "concurrency" : 0
+    },
+    "initializer_handler" : "index.initializer",
+    "initializer_timeout" : 3,
+    "pre_stop_handler" : "index.pre_stop_handler",
+    "pre_stop_timeout" : 3
+  } ],
+  "next_marker" : 4
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0106.html b/docs/fg/api-ref/functiongraph_06_0106.html new file mode 100644 index 00000000..b76b2d76 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0106.html @@ -0,0 +1,1119 @@ + + +

Querying the Metadata of a Function

+

Function

This API is used to query the metadata of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/config

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

func_id

+

String

+

Function ID, which uniquely identifies a function.

+

resource_id

+

String

+

Resource ID.

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image. Unit: MB. Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384. Range: 1024 to 16,384.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function execution agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

description

+

String

+

Function description.

+

last_modified

+

String

+

Time when the function was last updated.

+

ephemeral_storage

+

Integer

+

Ephemeral storage. By default, the /tmp directory of each function is 512 MB. You can increase the size to 10,240 MB (10 GB) if necessary.

+

Enumeration values:

+
  • 512
  • 10240
+

func_vpc

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

mount_config

+

MountConfig object

+

Mounting configuration.

+

depend_version_list

+

Array of strings

+

Dependency version IDs.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

enable_cloud_debug

+

String

+

Whether to enable cloud debugging to adapt to the CloudDebug scenario. (discarded)

+

enable_dynamic_memory

+

Boolean

+

Whether to enable dynamic memory allocation.

+

is_stateful_function

+

Boolean

+

Whether stateful functions are supported. If they are supported, set this parameter to true. This parameter is supported in FunctionGraph v2.

+

is_bridge_function

+

Boolean

+

Whether this is a bridge function.

+

enable_auth_in_header

+

Boolean

+

Whether to add authentication information to request header for custom image-based functions.

+

custom_image

+

CustomImage object

+

Container image.

+

reserved_instance_idle_mode

+

Boolean

+

Whether to enable idle mode for reserved instances.

+

apig_route_enable

+

Boolean

+

Whether to configure gateway routing rules.

+

heartbeat_handler

+

String

+

Entry of the heartbeat function in the format of "xx.xx". It must contain a period (.).This parameter can be configured only in Java. The heartbeat function entry must be in the same file as your function handler. This parameter is mandatory when the heartbeat function is enabled.

+

enable_class_isolation

+

Boolean

+

Indicates whether to enable class isolation. This parameter can be configured only in Java. Enable to dump logs to Kafka and improve class loading efficiency. However, this may cause compatibility issues.

+

gpu_type

+

String

+

GPU type.

+

allow_ephemeral_storage

+

Boolean

+

Indicates whether ephemeral storage can be configured.

+

network_controller

+

NetworkControlConfig object

+

Network configuration.

+

is_return_stream

+

Boolean

+

Whether to return stream data. (discarded)

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 FuncVpc

Parameter

+

Type

+

Description

+

domain_id

+

String

+

Domain name ID.

+

namespace

+

String

+

Project ID.

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+

subnet_name

+

String

+

Subnet name.

+

subnet_id

+

String

+

Subnet ID.

+

cidr

+

String

+

Subnet mask.

+

gateway

+

String

+

Gateway.

+

security_groups

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + +
Table 5 MountConfig

Parameter

+

Type

+

Description

+

mount_user

+

MountUser object

+

User information.

+

func_mounts

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 MountUser

Parameter

+

Type

+

Description

+

user_id

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 7 FuncMount

Parameter

+

Type

+

Description

+

mount_type

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + +
Table 8 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 9 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 10 CustomImage

Parameter

+

Type

+

Description

+

enabled

+

Boolean

+

Whether to enable this feature.

+

image

+

String

+

Image address.

+

command

+

String

+

Command for starting a container image.

+

args

+

String

+

Command line parameter for starting a container image.

+

working_dir

+

String

+

Working directory of an image container.

+

uid

+

String

+

User ID of an image container.

+

gid

+

String

+

User group ID of an image container.

+
+
+ +
+ + + + + + + + + + + + + +
Table 11 NetworkControlConfig

Parameter

+

Type

+

Description

+

disable_public_network

+

Boolean

+

Disable public access.

+

trigger_access_vpcs

+

Array of VpcConfig objects

+

VPC access restriction.

+
+
+ +
+ + + + + + + + + + + + + +
Table 12 VpcConfig

Parameter

+

Type

+

Description

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 15 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 16 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 17 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the metadata of a function.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/config
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "func_id" : "0d075978-5a54-4ee1-8e24-ff5bd070xxxx",
+  "resource_id" : "0d075978-5a54-4ee1-8e24-ff5bd070xxxx:test",
+  "func_urn" : "urn:fss:xxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest",
+  "func_name" : "test",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "namespace" : "46b6f338fc3445b8846c71dfb1fbxxxx",
+  "project_name" : "xxxxxxxxx",
+  "package" : "default",
+  "runtime" : "Node.js6.10",
+  "timeout" : 3,
+  "handler" : "test.handler",
+  "memory_size" : 128,
+  "cpu" : 300,
+  "code_type" : "inline",
+  "code_filename" : "index.js",
+  "code_size" : 272,
+  "digest" : "faa825575c45437cddd4e369bea69893bcbe195d478178462ad90984fe72993f3f59d15f41c5373f807f3e05fb9af322c55dabeb16565c386e402413458e6068",
+  "version" : "latest",
+  "ephemeral_storage" : 512,
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : 0
+  }
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1051",
+  "error_msg" : "Not found the function"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0107.html b/docs/fg/api-ref/functiongraph_06_0107.html new file mode 100644 index 00000000..712d72bf --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0107.html @@ -0,0 +1,555 @@ + + +

Querying the Code of a Function

+

Function

This API is used to query the code of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/code

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_code

+

FuncCode object

+

Response body of the FuncCode struct.

+

depend_version_list

+

Array of strings

+

Dependency version IDs.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+
+
+ +
+ + + + + + + + + + + + + +
Table 4 FuncCode

Parameter

+

Type

+

Description

+

file

+

String

+

Function code, which must be encoded using Base64. If this parameter is left blank, the default code is used.

+

link

+

String

+

Function code URL.

+
+
+ +
+ + + + + + + + + + + + + +
Table 5 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the code of a function.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/code
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "func_urn" : "urn:fss:xxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest",
+  "func_name" : "test",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "runtime" : "Node.js6.10",
+  "code_type" : "inline",
+  "code_filename" : "index.zip",
+  "code_size" : 245,
+  "digest" : "39d51ae334ffb239037e194159f4cc9cec31086719aa73db7d0a608343121a290f7115693e008bd01cb12b99a803856e83aa96173b26c528c41cfed18267e08f",
+  "last_modified" : "2019-10-31 11:37:58",
+  "func_code" : {
+    "file" : "",
+    "link" : ""
+  },
+  "strategy_config" : {
+    "concurrency" : -1
+  }
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1052",
+  "error_msg" : "Not found the function version"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0108.html b/docs/fg/api-ref/functiongraph_06_0108.html new file mode 100644 index 00000000..a44894c5 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0108.html @@ -0,0 +1,1968 @@ + + +

Creating a Function

+

Function

This API is used to create a function.

+
+

URI

POST /v2/{project_id}/fgs/functions

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

func_name

+

Yes

+

String

+

Function name.Max. 60 of letters, digits, hyphens (-), and underscores (_). Start with a letter, and end with a letter or digit.

+

Minimum length: 1 character.

+

Maximum length: 60 characters.

+

package

+

Yes

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

Yes

+

String

+

Environment in which a FunctionGraph function is executed. Options:

+
  • Python 2.7
  • Python 3.6
  • Python 3.9
  • Go 1.8
  • Go 1.x
  • Java 8
  • Java 11
  • Node.js 6.10
  • Node.js 8.10
  • Node.js 10.16
  • Node.js 12.13
  • Node.js 14.18
  • C# (.NET Core 2.0)
  • C# (.NET Core 2.1)
  • C# (.NET Core 3.1)
  • Custom
  • PHP 7.3
  • HTTP
+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
+

timeout

+

Yes

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

Yes

+

String

+

Handler of the function.

+

It must be in the format of "xx.xx" and contain a period (.). For a function created with a custom image, the handler must be "-".

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

depend_version_list

+

No

+

Array of strings

+

Dependency version IDs.

+

func_vpc

+

No

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

memory_size

+

Yes

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

No

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image. Unit: MB. Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384. Range: 1024 to 16,384.

+

code_type

+

Yes

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

No

+

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.

+

code_filename

+

No

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

custom_image

+

No

+

CustomImage object

+

Container image. This parameter is mandatory only when CodeType is set to Custom-Image-Swr.

+

user_data

+

No

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

No

+

String

+

Name/value information to be encrypted. For example, if a function needs an encryption password, define password={1234}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

xrole

+

No

+

String

+

Configuration agency. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function configuration agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

No

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

description

+

No

+

String

+

Function description.

+

func_code

+

No

+

FuncCode object

+

Response body of the FuncCode struct.

+

mount_config

+

No

+

MountConfig object

+

Mounting configuration.

+

initializer_handler

+

No

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

No

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

No

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

No

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

No

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

type

+

No

+

String

+

Function version. Some regions support only v1. The default value is v1.

+

Default: v2

+

Enumeration values:

+
  • v1
  • v2
+

log_config

+

No

+

FuncLogConfig object

+

Function log configuration.

+

network_controller

+

No

+

NetworkControlConfig object

+

Network configuration.

+

is_stateful_function

+

No

+

Boolean

+

Whether stateful functions are supported. If they are supported, set this parameter to true. This parameter is supported in FunctionGraph v2.

+

enable_dynamic_memory

+

No

+

Boolean

+

Whether to enable dynamic memory allocation.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 FuncVpc

Parameter

+

Mandatory

+

Type

+

Description

+

domain_id

+

No

+

String

+

Domain name ID.

+

namespace

+

No

+

String

+

Project ID.

+

vpc_name

+

No

+

String

+

VPC name.

+

vpc_id

+

Yes

+

String

+

VPC ID.

+

subnet_name

+

No

+

String

+

Subnet name.

+

subnet_id

+

Yes

+

String

+

Subnet ID.

+

cidr

+

No

+

String

+

Subnet mask.

+

gateway

+

No

+

String

+

Gateway.

+

security_groups

+

No

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 CustomImage

Parameter

+

Mandatory

+

Type

+

Description

+

enabled

+

No

+

Boolean

+

Whether to enable this feature.

+

image

+

No

+

String

+

Image address.

+

command

+

No

+

String

+

Command for starting a container image.

+

args

+

No

+

String

+

Command line parameter for starting a container image.

+

working_dir

+

No

+

String

+

Working directory of an image container.

+

uid

+

No

+

String

+

User ID of an image container.

+

gid

+

No

+

String

+

User group ID of an image container.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 6 FuncCode

Parameter

+

Mandatory

+

Type

+

Description

+

file

+

No

+

String

+

Function code, which must be encoded using Base64. If this parameter is left blank, the default code is used.

+

link

+

No

+

String

+

Function code URL.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 7 MountConfig

Parameter

+

Mandatory

+

Type

+

Description

+

mount_user

+

Yes

+

MountUser object

+

User information.

+

func_mounts

+

Yes

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 8 MountUser

Parameter

+

Mandatory

+

Type

+

Description

+

user_id

+

Yes

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

Yes

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 9 FuncMount

Parameter

+

Mandatory

+

Type

+

Description

+

mount_type

+

Yes

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

Yes

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

No

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

Yes

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 10 FuncLogConfig

Parameter

+

Mandatory

+

Type

+

Description

+

group_name

+

No

+

String

+

Name of the log group bound to the function.

+

group_id

+

No

+

String

+

ID of the log group bound to the function.

+

stream_name

+

No

+

String

+

Name of the log stream bound to the function.

+

stream_id

+

No

+

String

+

ID of the log stream bound to the function.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 11 NetworkControlConfig

Parameter

+

Mandatory

+

Type

+

Description

+

disable_public_network

+

No

+

Boolean

+

Disable public access.

+

trigger_access_vpcs

+

No

+

Array of VpcConfig objects

+

VPC access restriction.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 12 VpcConfig

Parameter

+

Mandatory

+

Type

+

Description

+

vpc_name

+

No

+

String

+

VPC name.

+

vpc_id

+

No

+

String

+

VPC ID.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

func_id

+

String

+

Function ID, which uniquely identifies a function.

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image. Unit: MB. Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384. Range: 1024 to 16,384.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

domain_names

+

String

+

Private domain name configured for resolution.

+

user_data

+

String

+

Name/Value information defined for the function.

+

These are parameters used in a function.

+

For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version.

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

app_xrole

+

String

+

Agency used by the function app. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

description

+

String

+

Function description.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

mount_config

+

MountConfig object

+

Mounting configuration.

+

reserved_instance_count

+

Integer

+

The number of instances reserved for a function.

+

depend_version_list

+

Array of strings

+

Dependency version IDs.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

extend_config

+

String

+

Extended configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

enable_cloud_debug

+

String

+

Whether to enable cloud debugging to adapt to the CloudDebug scenario. (discarded)

+

enable_dynamic_memory

+

Boolean

+

Whether to enable dynamic memory allocation.

+

is_stateful_function

+

Boolean

+

Whether stateful functions are supported. This parameter is supported in FunctionGraph v2.

+

custom_image

+

CustomImage object

+

Container image.

+

is_bridge_function

+

Boolean

+

Whether this is a bridge function.

+

apig_route_enable

+

Boolean

+

Whether to configure gateway routing rules.

+

heartbeat_handler

+

String

+

Entry of the heartbeat function in the format of "xx.xx". It must contain a period (.).This parameter can be configured only for Java functions. The heartbeat function entry must be in the same file as your function handler. This parameter is mandatory when the heartbeat function is enabled.

+

enable_class_isolation

+

Boolean

+

Indicates whether to enable class isolation. This parameter can be configured only for Java functions. Enable to dump logs to Kafka and improve class loading efficiency. However, this may cause compatibility issues.

+

gpu_type

+

String

+

GPU type.

+

allow_ephemeral_storage

+

Boolean

+

Indicates whether ephemeral storage can be configured.

+

ephemeral_storage

+

Integer

+

Ephemeral storage. By default, the /tmp directory of each function is 512 MB. You can increase the size to 10,240 MB (10 GB) if necessary.

+

Enumeration values:

+
  • 512
  • 10240
+

network_controller

+

NetworkControlConfig object

+

Network configuration.

+

resource_id

+

String

+

Resource ID. Unique ID of a function.

+

is_return_stream

+

Boolean

+

Whether to return stream data. (discarded)

+

enable_auth_in_header

+

Boolean

+

Whether to add authentication information to request header for custom image-based functions. (This parameter cannot be modified when creating a function.)

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 14 FuncVpc

Parameter

+

Type

+

Description

+

domain_id

+

String

+

Domain name ID.

+

namespace

+

String

+

Project ID.

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+

subnet_name

+

String

+

Subnet name.

+

subnet_id

+

String

+

Subnet ID.

+

cidr

+

String

+

Subnet mask.

+

gateway

+

String

+

Gateway.

+

security_groups

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + +
Table 15 MountConfig

Parameter

+

Type

+

Description

+

mount_user

+

MountUser object

+

User information.

+

func_mounts

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + +
Table 16 MountUser

Parameter

+

Type

+

Description

+

user_id

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 17 FuncMount

Parameter

+

Type

+

Description

+

mount_type

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + +
Table 18 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 19 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 20 CustomImage

Parameter

+

Type

+

Description

+

enabled

+

Boolean

+

Whether to enable this feature.

+

image

+

String

+

Image address.

+

command

+

String

+

Command for starting a container image.

+

args

+

String

+

Command line parameter for starting a container image.

+

working_dir

+

String

+

Working directory of an image container.

+

uid

+

String

+

User ID of an image container.

+

gid

+

String

+

User group ID of an image container.

+
+
+ +
+ + + + + + + + + + + + + +
Table 21 NetworkControlConfig

Parameter

+

Type

+

Description

+

disable_public_network

+

Boolean

+

Disable public access.

+

trigger_access_vpcs

+

Array of VpcConfig objects

+

VPC access restriction.

+
+
+ +
+ + + + + + + + + + + + + +
Table 22 VpcConfig

Parameter

+

Type

+

Description

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 23 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 24 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 25 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 26 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 27 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 503

+ +
+ + + + + + + + + + + + + +
Table 28 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 200

+

ok

+
{
+  "func_urn" : "urn:fss:xxxxxxxxx:c3b2459a6d5e4b548e6777e57852692d:function:default:TestCreateFunctionInPythonSdk:latest",
+  "func_name" : "TestCreateFunctionInPythonSdk",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "namespace" : "46b6f338fc3445b8846c71dfb1fbxxxx",
+  "project_name" : "xxxxxxxxxx",
+  "package" : "default",
+  "runtime" : "Python3.6",
+  "timeout" : 3,
+  "handler" : "index.handler",
+  "memory_size" : 128,
+  "encrypted_user_data" : "{\"password\":\"\"}",
+  "mount_config" : {
+    "mount_user" : {
+      "user_id" : -1,
+      "user_group_id" : -1
+    },
+    "func_mounts" : [ {
+      "mount_resource" : "268xxx-d3xx-4cxx-98xx-d1dbxxx",
+      "local_mount_path" : "/mnt",
+      "mount_type" : "sfsTurbo"
+    } ]
+  },
+  "cpu" : 300,
+  "code_type" : "inline",
+  "code_filename" : "index.py",
+  "code_size" : 100,
+  "digest" : "1c8610d1870731a818a037f1d2adf3223e8ac351aeb293fb1f8eabd2e9820069a61ed8b5d38182e760adc33a307d0e957afc357f415cd8c9c3ff6f0426fd85cd",
+  "version" : "latest",
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : 0
+  }
+}
+

Status code: 400

+

Bad request.

+
{
+  "error_code" : "FSS.0401",
+  "error_msg" : "not permit"
+}
+

Status code: 401

+

Unauthorized.

+
{
+  "error_code" : "FSS.0401",
+  "error_msg" : "not permit"
+}
+

Status code: 403

+

Forbidden.

+
{
+  "error_code" : "FSS.0401",
+  "error_msg" : "not permit"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+

503

+

Service unavailable.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0108_0.html b/docs/fg/api-ref/functiongraph_06_0108_0.html new file mode 100644 index 00000000..aef99f15 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0108_0.html @@ -0,0 +1,619 @@ + + +

Importing a Function

+

Function

This API is used to import a function.

+
+

URI

POST /v2/{project_id}/fgs/functions/import

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

func_name

+

Yes

+

String

+

Function name.Max. 60 of letters, digits, hyphens (-), and underscores (_). Start with a letter, and end with a letter or digit.

+

Minimum length: 1 character.

+

Maximum length: 60 characters.

+

file_name

+

Yes

+

String

+

File name.

+

file_type

+

Yes

+

String

+

File type.

+

file_code

+

Yes

+

String

+

Function code. The code must be encoded using Base64.

+

package

+

No

+

String

+

App name. The default value is default.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image. Unit: MB. Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384. Range: 1024 to 16,384.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

app_xrole

+

String

+

Agency used by the function app. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

description

+

String

+

Function description.

+

version_description

+

String

+

Version description.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

depend_version_list

+

Array of strings

+

Dependency versions.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

extend_config

+

String

+

Extended configuration.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 FuncVpc

Parameter

+

Type

+

Description

+

domain_id

+

String

+

Domain name ID.

+

namespace

+

String

+

Project ID.

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+

subnet_name

+

String

+

Subnet name.

+

subnet_id

+

String

+

Subnet ID.

+

cidr

+

String

+

Subnet mask.

+

gateway

+

String

+

Gateway.

+

security_groups

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+

Status code: 409

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Import a function from a Base64-encoded file test.zip.

+
POST https://{Endpoint}/v2/{project_id}/fgs/functions/import
+
+{
+  "func_name" : "test",
+  "file_name" : "test.zip",
+  "file_type" : "zip",
+  "file_code" : "xxxxxxxxxxxxxxxxxxxxx"
+}
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "func_urn" : "urn:fss:{region}:46b6f338fc3445b8846c71dfb1fbd9e8:function:default:test_v1_2",
+  "func_name" : "test_v1_2",
+  "domain_id" : "14ee2e35****a7998b******aa24cabf",
+  "namespace" : "46b6f338fc3445b8846c71dfb1fbd9e8",
+  "project_name" : "{region}",
+  "package" : "default",
+  "runtime" : "Node.js6.10",
+  "timeout" : 3,
+  "handler" : "index.handler",
+  "memory_size" : 128,
+  "cpu" : 300,
+  "code_type" : "zip",
+  "code_filename" : "index.zip",
+  "code_size" : 6709,
+  "digest" : "faa825575c45437cddd4e369bea69893bcbe195d478178462ad90984fe72993f3f59d15f41c5373f807f3e05fb9af322c55dabeb16565c386e402413458e6068",
+  "version" : "latest",
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : -1
+  },
+  "enterprise_project_id" : "46b6f338fc3445b8846c71dfb1fbxxxx"
+}
+

Status code: 409

+

Conflict

+
{
+  "error_code" : "FSS.1061",
+  "error_msg" : "The function has existed"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

409

+

Conflict

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0108_1.html b/docs/fg/api-ref/functiongraph_06_0108_1.html new file mode 100644 index 00000000..36785011 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0108_1.html @@ -0,0 +1,219 @@ + + +

Exporting a Function

+

Function

This API is used to export a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/export

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

config

+

No

+

Boolean

+

Whether to export function configuration. The default value is false. If the type parameter does not exist, at least one of code=true or config=true must be specified.

+

Default: false

+

code

+

No

+

Boolean

+

Whether to export function code. The default value is false. If the type parameter does not exist, at least one of code=true or config=true must be specified.

+

Default: false

+

type

+

No

+

String

+

This parameter cannot be used with code or config. type=code indicates exporting the code, and type=config indicates exporting the configuration.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1051",
+  "error_msg" : "Not found the function"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0109.html b/docs/fg/api-ref/functiongraph_06_0109.html new file mode 100644 index 00000000..224fc3b5 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0109.html @@ -0,0 +1,236 @@ + + +

Deleting a Function or Function Version

+

Function

This API is used to delete a function or a non-latest version of a function.

+

If the URN contains a function version or alias, the function version or the version corresponding to the specified alias as well as associated triggers will be deleted.

+

If the URN does not contain a function version or alias, the entire function (including all of its versions, aliases, and triggers) will be deleted.

+
+

URI

DELETE /v2/{project_id}/fgs/functions/{function_urn}

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model descriptions.

+

The latest version of a function cannot be deleted. To delete a function and all its versions, provide a URN without any version or alias. Example:

+

urn:fss:xxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete a function or a function version.

+
DELETE https://{Endpoint}/v2/{project_id}/fgs/functions/{func_urn}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0110.html b/docs/fg/api-ref/functiongraph_06_0110.html new file mode 100644 index 00000000..61d2b7fe --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0110.html @@ -0,0 +1,665 @@ + + +

Modifying the Code of a Function

+

Function

This API is used to modify the code of a function.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/code

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

code_type

+

Yes

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

No

+

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.

+

code_filename

+

No

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

func_code

+

Yes

+

FuncCode object

+

Response body of the FuncCode struct.

+

depend_version_list

+

No

+

Array of strings

+

Dependency version IDs.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 FuncCode

Parameter

+

Mandatory

+

Type

+

Description

+

file

+

No

+

String

+

Function code, which must be encoded using Base64. If this parameter is left blank, the default code is used.

+

link

+

No

+

String

+

Function code URL.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_code

+

FuncCode object

+

Response body of the FuncCode struct.

+

depend_version_list

+

Array of strings

+

Dependency version IDs.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 FuncCode

Parameter

+

Type

+

Description

+

file

+

String

+

Function code, which must be encoded using Base64. If this parameter is left blank, the default code is used.

+

link

+

String

+

Function code URL.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 8 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 200

+

OK

+
{
+  "func_urn" : "urn:fss:xxxxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest",
+  "func_name" : "test",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "runtime" : "Node.js6.10",
+  "code_type" : "inline",
+  "code_filename" : "index.js",
+  "code_size" : 245,
+  "digest" : "39d51ae334ffb239037e194159f4cc9cec31086719aa73db7d0a608343121a290f7115693e008bd01cb12b99a803856e83aa96173b26c528c41cfed18267e08f",
+  "last_modified" : "2019-10-31 11:37:58",
+  "func_code" : {
+    "file" : "aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIoZXZlbnQsIGNvbnRleHQpOgogICAgb3V0cHV0ID0gJ0hlbGxvIE1zZyBmb3IgbW9kaWZ5OiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIGFrID0gY29udGV4dC5nZXRBY2Nlc3NLZXkoKQogICAgc2sgPSBjb250ZXh0LmdldFNlY3JldEtleSgpCiAgICB0b2tlbiA9IGNvbnRleHQuZ2V0VG9rZW4oKQogICAgcHJpbnQgJ2FrOicgKyBhawogICAgcHJpbnQgJ3NrOicgKyBzawogICAgcHJpbnQgJ3Rva2VuOicgKyB0b2tlbgogICAgcmV0dXJuIG91dHB1dAo+C0NLTqLwKImNCTgBMSn5SC+UbkysuKp1Bj7JQqxds+5p7La/ew4RBTp8IusZ/k2qmqvCDdoBY0ywYCl+RgctnLbTS6hLLj9sNyKoVXiXb1BLAQIeAwoAAAAIAAhYOU8ssPQsgwAAALYAAAAIAAAAAAAAAAAAAADzAgAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAACpAAAAAAA=",
+    "link" : ""
+  },
+  "strategy_config" : {
+    "concurrency" : -1
+  }
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1052",
+  "error_msg" : "Not found the function version"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0111.html b/docs/fg/api-ref/functiongraph_06_0111.html new file mode 100644 index 00000000..6f6c7074 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0111.html @@ -0,0 +1,1810 @@ + + +

Modifying the Metadata of a Function

+

Function

This API is used to modify the metadata of a function.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/config

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

func_name

+

Yes

+

String

+

Function name.

+

runtime

+

Yes

+

String

+

Environment in which a FunctionGraph function is executed. Options:

+
  • Python 2.7
  • Python 3.6
  • Python 3.9
  • Go 1.8
  • Go 1.x
  • Java 8
  • Java 11
  • Node.js 6.10
  • Node.js 8.10
  • Node.js 10.16
  • Node.js 12.13
  • Node.js 14.18
  • C# (.NET Core 2.0)
  • C# (.NET Core 2.1)
  • C# (.NET Core 3.1)
  • Custom
  • PHP 7.3
  • HTTP
+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
+

timeout

+

Yes

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

Yes

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Yes

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

No

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image.

+

Unit: MB.

+

Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384.

+

Range: 1024 to 16,384.

+

user_data

+

No

+

String

+

Name/Value information defined for the function.

+

These are parameters used in a function.

+

For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

No

+

String

+

User-defined name/value to be encrypted.

+

xrole

+

No

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function execution agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

No

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

description

+

No

+

String

+

Function description.

+

func_vpc

+

No

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

mount_config

+

No

+

MountConfig object

+

Mounting configuration.

+

strategy_config

+

No

+

StrategyConfig object

+

Function policy configuration.

+

custom_image

+

No

+

CustomImage object

+

Container image.

+

extend_config

+

No

+

String

+

Extended configuration.

+

initializer_handler

+

No

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

No

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

No

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

No

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

ephemeral_storage

+

No

+

Integer

+

Ephemeral storage. By default, the /tmp directory of each function is 512 MB. You can increase the size to 10,240 MB (10 GB) if necessary.

+

Enumeration values:

+
  • 512
  • 10240
+

enterprise_project_id

+

No

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

log_config

+

No

+

FuncLogConfig object

+

Function log configuration.

+

network_controller

+

No

+

NetworkControlConfig object

+

Network configuration.

+

is_stateful_function

+

No

+

Boolean

+

Whether stateful functions are supported. If they are supported, set this parameter to true. This parameter is supported in FunctionGraph v2.

+

enable_dynamic_memory

+

No

+

Boolean

+

Whether to enable dynamic memory allocation.

+

enable_auth_in_header

+

No

+

Boolean

+

Whether to allow authentication information in the request header.

+

domain_names

+

No

+

String

+

Private domain name.

+

restore_hook_handler

+

No

+

String

+

Restore Hook entry point for snapshot-based cold start in the format "xx.xx". The period (.) must be included. For example, com.xxx.demo.Test.restoreHook.

+

restore_hook_timeout

+

No

+

Integer

+

Restore Hook timeout of snapshot-based cold start. Range: 1s to 300s.

+

heartbeat_handler

+

No

+

String

+

Entry of the heartbeat function in the format of "xx.xx". It must contain a period (.).This parameter can be configured only in Java. The heartbeat function entry must be in the same file as your function handler. This parameter is mandatory when the heartbeat function is enabled.

+

enable_class_isolation

+

No

+

Boolean

+

Indicates whether to enable class isolation. This parameter can be configured only in Java. Enable to dump logs to Kafka and improve class loading efficiency. However, this may cause compatibility issues.

+

gpu_type

+

No

+

String

+

GPU type.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 FuncVpc

Parameter

+

Mandatory

+

Type

+

Description

+

domain_id

+

No

+

String

+

Domain name ID.

+

namespace

+

No

+

String

+

Project ID.

+

vpc_name

+

No

+

String

+

VPC name.

+

vpc_id

+

Yes

+

String

+

VPC ID.

+

subnet_name

+

No

+

String

+

Subnet name.

+

subnet_id

+

Yes

+

String

+

Subnet ID.

+

cidr

+

No

+

String

+

Subnet mask.

+

gateway

+

No

+

String

+

Gateway.

+

security_groups

+

No

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 5 MountConfig

Parameter

+

Mandatory

+

Type

+

Description

+

mount_user

+

Yes

+

MountUser object

+

User information.

+

func_mounts

+

Yes

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 6 MountUser

Parameter

+

Mandatory

+

Type

+

Description

+

user_id

+

Yes

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

Yes

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 7 FuncMount

Parameter

+

Mandatory

+

Type

+

Description

+

mount_type

+

Yes

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

Yes

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

No

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

Yes

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 8 StrategyConfig

Parameter

+

Mandatory

+

Type

+

Description

+

concurrency

+

Yes

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Yes

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 9 CustomImage

Parameter

+

Mandatory

+

Type

+

Description

+

enabled

+

No

+

Boolean

+

Whether to enable this feature.

+

image

+

No

+

String

+

Image address.

+

command

+

No

+

String

+

Command for starting a container image.

+

args

+

No

+

String

+

Command line parameter for starting a container image.

+

working_dir

+

No

+

String

+

Working directory of an image container.

+

uid

+

No

+

String

+

User ID of an image container.

+

gid

+

No

+

String

+

User group ID of an image container.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 10 FuncLogConfig

Parameter

+

Mandatory

+

Type

+

Description

+

group_name

+

No

+

String

+

Name of the log group bound to the function.

+

group_id

+

No

+

String

+

ID of the log group bound to the function.

+

stream_name

+

No

+

String

+

Name of the log stream bound to the function.

+

stream_id

+

No

+

String

+

ID of the log stream bound to the function.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 11 NetworkControlConfig

Parameter

+

Mandatory

+

Type

+

Description

+

disable_public_network

+

No

+

Boolean

+

Disable public access.

+

trigger_access_vpcs

+

No

+

Array of VpcConfig objects

+

VPC access restriction.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 12 VpcConfig

Parameter

+

Mandatory

+

Type

+

Description

+

vpc_name

+

No

+

String

+

VPC name.

+

vpc_id

+

No

+

String

+

VPC ID.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

func_id

+

String

+

Function ID, which uniquely identifies a function.

+

resource_id

+

String

+

Function resource ID.

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image.

+

Unit: MB.

+

Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384.

+

Range: 1024 to 16,384.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function.

+

These are parameters used in a function.

+

For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function execution agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

description

+

String

+

Function description.

+

last_modified

+

String

+

Time when the function was last updated.

+

ephemeral_storage

+

Integer

+

Ephemeral storage. By default, the /tmp directory of each function is 512 MB. You can increase the size to 10,240 MB (10 GB) if necessary.

+

Enumeration values:

+
  • 512
  • 10240
+

func_vpc

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

mount_config

+

MountConfig object

+

Mounting configuration.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

enable_cloud_debug

+

String

+

Whether to enable cloud debugging to adapt to the CloudDebug scenario. (discarded)

+

enable_dynamic_memory

+

Boolean

+

Whether to enable dynamic memory allocation.

+

enable_auth_in_header

+

Boolean

+

Whether to add authentication information to request header for custom image-based functions.

+

is_stateful_function

+

Boolean

+

Whether stateful functions are supported. This parameter is supported in FunctionGraph v2.

+

domain_names

+

String

+

Private domain name configured for resolution.

+

custom_image

+

CustomImage object

+

Container image.

+

is_return_stream

+

Boolean

+

Whether to return stream data. (discarded)

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 14 FuncVpc

Parameter

+

Type

+

Description

+

domain_id

+

String

+

Domain name ID.

+

namespace

+

String

+

Project ID.

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+

subnet_name

+

String

+

Subnet name.

+

subnet_id

+

String

+

Subnet ID.

+

cidr

+

String

+

Subnet mask.

+

gateway

+

String

+

Gateway.

+

security_groups

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + +
Table 15 MountConfig

Parameter

+

Type

+

Description

+

mount_user

+

MountUser object

+

User information.

+

func_mounts

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + +
Table 16 MountUser

Parameter

+

Type

+

Description

+

user_id

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 17 FuncMount

Parameter

+

Type

+

Description

+

mount_type

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + +
Table 18 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 19 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 20 CustomImage

Parameter

+

Type

+

Description

+

enabled

+

Boolean

+

Whether to enable this feature.

+

image

+

String

+

Image address.

+

command

+

String

+

Command for starting a container image.

+

args

+

String

+

Command line parameter for starting a container image.

+

working_dir

+

String

+

Working directory of an image container.

+

uid

+

String

+

User ID of an image container.

+

gid

+

String

+

User group ID of an image container.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 21 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 22 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 23 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 24 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 25 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 200

+

OK

+
{
+  "func_id" : "0d075978-5a54-4ee1-8e24-ff5bd070xxxx",
+  "resource_id" : "0d075978-5a54-4ee1-8e24-ff5bd070xxxx:test",
+  "func_urn" : "urn:fss:xxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test",
+  "func_name" : "test",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "namespace" : "46b6f338fc3445b8846c71dfb1fbxxxx",
+  "project_name" : "xxxxxx",
+  "package" : "default",
+  "runtime" : "Node.js6.10",
+  "timeout" : 3,
+  "handler" : "fssExampleCsharp2.1::fssExampleCsharp21.Program::MyFunc",
+  "memory_size" : 128,
+  "cpu" : 300,
+  "code_type" : "inline",
+  "code_filename" : "index.js",
+  "code_size" : 272,
+  "user_data" : "{\"host\":\"192.168.0.1\"}",
+  "mount_config" : {
+    "mount_user" : {
+      "user_id" : -1,
+      "user_group_id" : -1
+    },
+    "func_mounts" : [ {
+      "mount_resource" : "268xxx-d3xx-4cxx-98xx-d1dbxxx",
+      "local_mount_path" : "/mnt",
+      "mount_type" : "sfsTurbo"
+    } ]
+  },
+  "digest" : "faa825575c45437cddd4e369bea69893bcbe195d478178462ad90984fe72993f3f59d15f41c5373f807f3e05fb9af322c55dabeb16565c386e402413458e6068",
+  "version" : "latest",
+  "ephemeral_storage" : 512,
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : 0
+  }
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0112_00_3.html b/docs/fg/api-ref/functiongraph_06_0112_00_3.html new file mode 100644 index 00000000..eca46106 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0112_00_3.html @@ -0,0 +1,414 @@ + + +

Querying Asynchronous Invocation Requests

+

Function

This API is used to query the asynchronous invocation requests of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/async-invocations

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

request_id

+

No

+

String

+

ID of the asynchronous invocation request to be queried. If this parameter is not specified, all asynchronous invocation requests are queried by default.

+

Minimum: 0

+

Maximum: 64

+

marker

+

No

+

String

+

Start position of the current query. The default value is 0.

+

Default: 0

+

Minimum: 0

+

Maximum: 64

+

limit

+

No

+

String

+

Maximum number of data records returned in a request. Max.: 500. Default: 100.

+

Default: 100

+

Minimum: 0

+

Maximum: 64

+

status

+

No

+

String

+

Asynchronous invocation status to be queried. Five statuses are supported. If this parameter is not specified, the invocation records of all statuses are queried.

+
  • WAIT

    +
  • RUNNING

    +
  • SUCCESS

    +
  • FAIL

    +
  • DISCARD

    +
+

Minimum: 0

+

Maximum: 64

+

query_begin_time

+

No

+

String

+

Start time of the query. The format is "YYYY-MM-DD'T'HH:mm:ss" (UTC time). If this parameter is not specified, the time starts from the last hour by default.

+

query_end_time

+

No

+

String

+

End time of the query. The format is "YYYY-MM-DD'T'HH:mm:ss" (UTC time). If this parameter is not specified, the end time is the current time by default.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

invocations

+

Array of ListFunctionAsyncInvocationsResult objects

+

Asynchronous invocation records.

+

count

+

Integer

+

Total number of queried data records.

+

next_marker

+

Integer

+

Start position for querying records on the next page.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListFunctionAsyncInvocationsResult

Parameter

+

Type

+

Description

+

request_id

+

String

+

Asynchronous invocation request ID.

+

status

+

String

+

Asynchronous invocation status. Options:

+
  • WAIT

    +
  • RUNNING

    +
  • SUCCESS

    +
  • FAIL

    +
  • DISCARD

    +
+

Enumeration values:

+
  • WAIT

    +
  • RUNNING

    +
  • SUCCESS

    +
  • FAIL

    +
  • DISCARD

    +
+

error_message

+

String

+

Asynchronous invocation error information. If the execution is successful, no value is returned.

+

error_code

+

Integer

+

Asynchronous invocation error code. If the execution is successful, 0 is returned.

+

start_time

+

String

+

Start time of the asynchronous invocation. The format is "YYYY-MM-DD'T'HH:mm:ss" (UTC time).

+

end_time

+

String

+

End time of the asynchronous invocation. The format is "YYYY-MM-DD'T'HH:mm:ss" (UTC time).

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query asynchronous invocation requests of a function.

+
GET /v2/{project_id}/fgs/functions/{function_urn}/async-invocations
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "invocations" : [ {
+    "request_id" : "403fcbd6-ec41-401f-9fa7-386f3d3d****",
+    "status" : "SUCCESS",
+    "error_message" : "",
+    "start_time" : "2019-10-25T15:37:27",
+    "end_time" : "2019-10-25T15:37:27",
+    "error_code" : 0
+  } ]
+}
+

Status code: 403

+

FORBIDDEN

+
{
+  "error_code" : "FSS.0403",
+  "error_msg" : "invalid token"
+}
+

Status code: 404

+

Not Found

+
{
+  "error_code" : "FSS.0404",
+  "error_msg" : "can not find function"
+}
+

Status code: 500

+

Internal error.

+
{
+  "error_code" : "FSS.0500",
+  "error_msg" : "xxx"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

403

+

FORBIDDEN

+

404

+

Not Found

+

500

+

Internal error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0112_01.html b/docs/fg/api-ref/functiongraph_06_0112_01.html new file mode 100644 index 00000000..6234c19a --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0112_01.html @@ -0,0 +1,132 @@ + + +

Enabling Log Reporting to LTS

+

Function

This API is used to enable log reporting to LTS.

+
+

URI

POST /v2/{project_id}/fgs/functions/enable-lts-logs

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 429

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Enable log reporting to LTS.

+
POST /v2/{project_id}/fgs/functions/enable-lts-logs
+
+

Example Responses

Status code: 429

+

Too many requests.

+
{
+  "error_code" : "FSS.0429",
+  "error_msg" : "api is busy now"
+}
+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

429

+

Too many requests.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0112_1.html b/docs/fg/api-ref/functiongraph_06_0112_1.html new file mode 100644 index 00000000..8011a87d --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0112_1.html @@ -0,0 +1,535 @@ + + +

Changing the Number of Reserved Instances

+

Function

This API is used to change the number of reserved instances.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/reservedinstances

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

count

+

Yes

+

Integer

+

Number of reserved instances.

+

idle_mode

+

No

+

Boolean

+

Whether to enable the idle mode.

+

tactics_config

+

No

+

TacticsConfig object

+
  
+
+ +
+ + + + + + + + + + + +
Table 4 TacticsConfig

Parameter

+

Mandatory

+

Type

+

Description

+

cron_configs

+

No

+

Array of CronConfig objects

+

Scheduled configuration list.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 CronConfig

Parameter

+

Mandatory

+

Type

+

Description

+

name

+

No

+

String

+

Scheduled configuration name.

+

cron

+

No

+

String

+

Cron expression.

+

count

+

No

+

Integer

+

Number of started reserved instances.

+

start_time

+

No

+

Long

+

Start time (epoch format).

+

expired_time

+

No

+

Long

+

Expiry time (epoch format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

count

+

Integer

+

Number of reserved instances.

+

idle_mode

+

Boolean

+

Whether to enable idle mode.

+

tactics_config

+

TacticsConfig object

+
  
+
+ +
+ + + + + + + + + +
Table 7 TacticsConfig

Parameter

+

Type

+

Description

+

cron_configs

+

Array of CronConfig objects

+

Scheduled configuration list.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 8 CronConfig

Parameter

+

Type

+

Description

+

name

+

String

+

Scheduled configuration name.

+

cron

+

String

+

Cron expression.

+

count

+

Integer

+

Number of started reserved instances.

+

start_time

+

Long

+

Start time (epoch format).

+

expired_time

+

Long

+

Expiry time (epoch format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 9 MetricConfig

Parameter

+

Type

+

Description

+

name

+

String

+

Flow control configuration name.

+

type

+

String

+

Flow control type. Currently, only reserved instance utilization is supported.

+

Enumeration values:

+
  • Concurrency
+

threshold

+

Integer

+

Flow control threshold.

+

min

+

Integer

+

Minimum value.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Update the number of a function's reserved instances to 3.

+
PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/reservedinstances
+
+{
+  "count" : 3
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "count" : 2
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0112_2.html b/docs/fg/api-ref/functiongraph_06_0112_2.html new file mode 100644 index 00000000..f08d5963 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0112_2.html @@ -0,0 +1,558 @@ + + +

Querying Reserved Instances of a Function

+

Function

This API is used to query reserved instances of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/reservedinstanceconfigs

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

function_urn

+

No

+

String

+

Function URN. For details, see the function model descriptions.

+

marker

+

No

+

String

+

Start position of the current query. The default value is 0.

+

Default: 0

+

Minimum: 1

+

Maximum: 64

+

limit

+

No

+

String

+

Maximum number of data records returned in a request. Max.: 500. Default: 100.

+

Default: 100

+

Minimum: 1

+

Maximum: 64

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

reserved_instances

+

Array of ReservedInstanceConfigs objects

+

Reserved instances.

+

page_info

+

PageInfo object

+
  

count

+

Long

+

Number of functions.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ReservedInstanceConfigs

Parameter

+

Type

+

Description

+

function_urn

+

String

+

Function URN.

+

qualifier_type

+

String

+

Limiting type. Options: version and alias.

+

qualifier_name

+

String

+

Limit value.

+

min_count

+

Integer

+

Number of reserved instances.

+

idle_mode

+

Boolean

+

Whether to enable the idle mode.

+

tactics_config

+

TacticsConfig object

+
  
+
+ +
+ + + + + + + + + +
Table 6 TacticsConfig

Parameter

+

Type

+

Description

+

cron_configs

+

Array of CronConfig objects

+

Scheduled configuration list.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 7 CronConfig

Parameter

+

Type

+

Description

+

name

+

String

+

Scheduled configuration name.

+

cron

+

String

+

Cron expression.

+

count

+

Integer

+

Number of started reserved instances.

+

start_time

+

Long

+

Start time (epoch format).

+

expired_time

+

Long

+

Expiry time (epoch format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 8 MetricConfig

Parameter

+

Type

+

Description

+

name

+

String

+

Flow control configuration name.

+

type

+

String

+

Flow control type. Currently, only reserved instance utilization is supported.

+

Enumeration values:

+
  • Concurrency
+

threshold

+

Integer

+

Flow control threshold.

+

min

+

Integer

+

Minimum value.

+
+
+ +
+ + + + + + + + + + + + + + + + + +
Table 9 PageInfo

Parameter

+

Type

+

Description

+

next_marker

+

Long

+

Next read location.

+

previous_marker

+

Long

+

Previous read location.

+

current_count

+

Long

+

Number of items on the current page.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query reserved instances of a function.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/reservedinstanceconfigs
+
+

Example Responses

Status code: 200

+

OK

+
{
+    "reserved_instances": [
+        {
+            "function_urn": "urn:fss:{region}:46b6f338fc3445b8846c71dfb1fbxxxx:function:default:xxxxx:latest",
+            "qualifier_type": "version",
+            "qualifier_name": "latest",
+            "min_count": 10,
+            "idle_mode": false,
+            "tactics_config": {
+                "cron_configs": [
+                    {
+                        "name": "cronConfig",
+                        "cron": "0 1 * * * *",
+                        "count": 15,
+                        "start_time": 1658073600,
+                        "expired_time": 1658160000
+                    }
+                ]
+            }
+        }
+    ],
+    "page_info": {
+        "next_marker": 1,
+        "previous_marker": 0,
+        "current_count": 1
+    },
+    "count": 1
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0112_3.html b/docs/fg/api-ref/functiongraph_06_0112_3.html new file mode 100644 index 00000000..f74dc569 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0112_3.html @@ -0,0 +1,405 @@ + + +

Querying the Number of Reserved Instances

+

Function

This API is used to query the number of instances reserved for a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/reservedinstances

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

marker

+

No

+

String

+

Final record queried last time.

+

Default: 0

+

limit

+

No

+

String

+

Maximum number of functions to obtain in a request.

+

Maximum value: 400

+

The default value is 400, which is used when this parameter is not specified or is 0 or greater than 400.

+

If it is less than 0, an error is reported.

+

Default: 400

+

urn

+

No

+

String

+

URN of a function whose number of reserved instances is to be queried.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

reservedinstances

+

Array of FuncReservedInstance objects

+

Reserved instances.

+

page_info

+

PageInfo object

+

count

+

Long

+

Number of functions.

+
+
+ +
+ + + + + + + + + + + + + +
Table 5 FuncReservedInstance

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

count

+

Long

+

Number of reserved instances.

+
+
+ +
+ + + + + + + + + + + + + + + + + +
Table 6 PageInfo

Parameter

+

Type

+

Description

+

next_marker

+

Long

+

Next read location.

+

previous_marker

+

Long

+

Previous read location.

+

current_count

+

Long

+

Number of items on the current page.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query reserved instances.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/reservedinstances
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "reservedinstances" : [ {
+    "func_urn" : "urn:fss:xxxxx:46b6f338fc3445b8846c71dfb1fbxxxx:function:csharp:test2-0:latest",
+    "count" : 2
+  } ],
+  "page_info" : {
+    "next_marker" : 2,
+    "previous_marker" : 0,
+    "current_count" : 2
+  }
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0113.html b/docs/fg/api-ref/functiongraph_06_0113.html new file mode 100644 index 00000000..2603f22a --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0113.html @@ -0,0 +1,854 @@ + + +

Querying the Versions of a Function

+

Function

This API is used to query the versions of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/versions

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

marker

+

No

+

String

+

Final record queried last time.

+

maxitems

+

No

+

String

+

Maximum number of functions to obtain in a request.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

versions

+

Array of ListFunctionVersionResult objects

+

Version list.

+

next_marker

+

Long

+

Next record location.

+

count

+

Long

+

Total number of versions.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListFunctionVersionResult

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function execution agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc_id

+

String

+

VPC ID.

+

concurrency

+

Integer

+

0: A function is disabled. -1: A function is enabled.

+

concurrent_num

+

Integer

+

Number of concurrent instances.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

long_time

+

Boolean

+

Whether long-term running is supported.

+

function_async_config

+

FunctionAsyncConfig object

+

Return struct of the asynchronous execution notification settings.

+

type

+

String

+

Function version.

+

enable_dynamic_memory

+

Boolean

+

Whether to enable dynamic memory allocation.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

is_stateful_function

+

Boolean

+

Whether stateful functions are supported. This parameter is supported in FunctionGraph v2.

+

enable_auth_in_header

+

Boolean

+

Whether to allow authentication information in the request header.

+

custom_image

+

CustomImage object

+

Container image.

+

reserved_instance_idle_mode

+

Boolean

+

Whether to enable idle mode for reserved instances.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 7 FunctionAsyncConfig

Parameter

+

Type

+

Description

+

max_async_event_age_in_seconds

+

Integer

+

Maximum validity period of a message. Value range: 60–86,400. Unit: second.

+

max_async_retry_attempts

+

Integer

+

Maximum number of retry attempts to be made if asynchronous invocation fails. Default value: 3. Value range: 0–8.

+

destination_config

+

FuncAsyncDestinationConfig object

+

Asynchronous invocation target.

+

created_time

+

String

+

Time when asynchronous execution notification was configured.

+

last_modified

+

String

+

Time when the asynchronous execution notification settings were last modified.

+
+
+ +
+ + + + + + + + + + + + + +
Table 8 FuncAsyncDestinationConfig

Parameter

+

Type

+

Description

+

on_success

+

FuncDestinationConfig object

+

Target to be invoked when a function is successfully executed.

+

on_failure

+

FuncDestinationConfig object

+

Target to be invoked when a function fails to be executed due to a system error or an internal error.

+
+
+ +
+ + + + + + + + + + + + + +
Table 9 FuncDestinationConfig

Parameter

+

Type

+

Description

+

destination

+

String

+

Object type.

+
  • OBS
  • SMN
  • FunctionGraph
+

Enumeration values:

+
  • OBS
  • SMN
  • FunctionGraph
+

param

+

String

+

Parameters (in JSON format) corresponding to the target service.

+
  • OBS: Parameters related to the bucket name, object directory prefix, and object expiration time are included. The object expiration time ranges from 0 to 365 days. If the value is 0, the object will not expire.
  • SMN: The topic_urn parameter is included.
  • FunctionGraph: The func_urn parameter is included.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 10 CustomImage

Parameter

+

Type

+

Description

+

enabled

+

Boolean

+

Whether to enable this feature.

+

image

+

String

+

Image address.

+

command

+

String

+

Command for starting a container image.

+

args

+

String

+

Command line parameter for starting a container image.

+

working_dir

+

String

+

Working directory of an image container.

+

uid

+

String

+

User ID of an image container.

+

gid

+

String

+

User group ID of an image container.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 15 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query functions.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/versions
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "versions" : [ {
+    "func_urn" : "urn:fss:xxxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test",
+    "func_name" : "test",
+    "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+    "namespace" : "46b6f338fc3445b8846c71dfb1fbxxxx",
+    "project_name" : "xxxxx",
+    "package" : "default",
+    "runtime" : "Node.js6.10",
+    "timeout" : 3,
+    "handler" : "test.handler",
+    "memory_size" : 128,
+    "cpu" : 300,
+    "code_type" : "inline",
+    "code_filename" : "index.js",
+    "code_size" : 272,
+    "digest" : "faa825575c45437cddd4e369bea69893bcbe195d478178462ad90984fe72993f3f59d15f41c5373f807f3e05fb9af322c55dabeb16565c386e402413458e6068",
+    "version" : "latest",
+    "image_name" : "latest-191025153727@zehht",
+    "last_modified" : "2019-10-25 15:37:27",
+    "strategy_config" : {
+      "concurrency" : 0
+    }
+  } ],
+  "next_marker" : 5
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1051",
+  "error_msg" : "Not found the function"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0114.html b/docs/fg/api-ref/functiongraph_06_0114.html new file mode 100644 index 00000000..89e246c3 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0114.html @@ -0,0 +1,592 @@ + + +

Creating an Alias for a Function Version

+

Function

This API is used to create an alias for a function version.

+
+

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/aliases

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

name

+

Yes

+

String

+

Alias.Max. 64 of letters, digits, hyphens (-), and underscores (_). Start with a letter, and end with a letter or digit.

+

Minimum length: 1 character.

+

Maximum length: 64 characters.

+

version

+

Yes

+

String

+

Version corresponding to the alias.

+

description

+

No

+

String

+

Description of the alias.

+

additional_version_weights

+

No

+

Map<String,Integer>

+

Traffic shifting by percentage.

+

additional_version_strategy

+

No

+

Map<String,VersionStrategy>

+

Traffic shifting by rule.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 VersionStrategy

Parameter

+

Mandatory

+

Type

+

Description

+

rules

+

No

+

Array of VersionStrategyRules objects

+

Rules.

+

combine_type

+

No

+

String

+

Rule aggregation mode. and: All rules are met. or: Any rule is met.

+

Enumeration values:

+
  • and
  • or
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 VersionStrategyRules

Parameter

+

Mandatory

+

Type

+

Description

+

rule_type

+

No

+

String

+

Parameter type.

+

Enumeration values:

+
  • header
  • cookie
+

param

+

No

+

String

+

Rule parameter name, which can contain only letters, digits, underscores (_), and hyphens (-).

+

op

+

No

+

String

+

Rule matching operator. Currently, only = and in are supported.

+

Enumeration values:

+
  • in
  • =
+

value

+

No

+

String

+

Rule value. If op is set to in, the value is a multi-value character string separated by commas (,).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

name

+

String

+

Alias to be queried.

+

version

+

String

+

Version corresponding to the alias.

+

description

+

String

+

Description of the alias.

+

last_modified

+

String

+

Time when the alias was last modified.

+

alias_urn

+

String

+

URN of the alias.

+

additional_version_weights

+

Map<String,Integer>

+

Traffic shifting by percentage.

+

additional_version_strategy

+

Map<String,VersionStrategy>

+

Traffic shifting by rule.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 VersionStrategy

Parameter

+

Type

+

Description

+

rules

+

Array of VersionStrategyRules objects

+

Rules.

+

combine_type

+

String

+

Rule aggregation mode. and: All rules are met. or: Any rule is met.

+

Enumeration values:

+
  • and
  • or
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 8 VersionStrategyRules

Parameter

+

Type

+

Description

+

rule_type

+

String

+

Parameter type.

+

Enumeration values:

+
  • header
  • cookie
+

param

+

String

+

Rule parameter name, which can contain only letters, digits, underscores (_), and hyphens (-).

+

op

+

String

+

Rule matching operator. Currently, only = and in are supported.

+

Enumeration values:

+
  • in
  • =
+

value

+

String

+

Rule value. If op is set to in, the value is a multi-value character string separated by commas (,).

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 200

+

ok

+
{
+  "name" : "a1",
+  "version" : "latest",
+  "description" : "",
+  "last_modified" : "2019-10-31 11:37:58",
+  "alias_urn" : "urn:fss:{region}:46b6f338fc3445b8846c71dfb1fbxxxx:function:default:xxxxx:!a1"
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1051",
+  "error_msg" : "Not found the function"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0115.html b/docs/fg/api-ref/functiongraph_06_0115.html new file mode 100644 index 00000000..b0d7aa61 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0115.html @@ -0,0 +1,516 @@ + + +

Modifying the Alias of a Function Version

+

Function

This API is used to modify the alias of a function version.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

alias_name

+

Yes

+

String

+

Alias to be modified.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

version

+

Yes

+

String

+

Version corresponding to the alias.

+

description

+

No

+

String

+

Description of the alias.

+

additional_version_weights

+

No

+

Map<String,Integer>

+

Dark launch information.

+

additional_version_strategy

+

No

+

Map<String,VersionStrategy>

+

Traffic shifting by Rule.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 VersionStrategy

Parameter

+

Mandatory

+

Type

+

Description

+

rules

+

No

+

Array of VersionStrategyRules objects

+

Rules.

+

combine_type

+

No

+

String

+

Rule aggregation mode. and: All rules are met. or: Any rule is met.

+

Enumeration values:

+
  • and

    +
  • or

    +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 VersionStrategyRules

Parameter

+

Mandatory

+

Type

+

Description

+

rule_type

+

No

+

String

+

Parameter type.

+

Enumeration values:

+
  • header

    +
  • cookie

    +
+

param

+

No

+

String

+

Rule parameter name, which can contain only letters, digits, underscores (_), and hyphens (-).

+

op

+

No

+

String

+

Rule matching operator. Currently, only = and in are supported.

+

Enumeration values:

+
  • in

    +
  • =

    +
+

value

+

No

+

String

+

Rule value. If op is set to in, the value is a multi-value character string separated by commas (,).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

name

+

String

+

Alias to be queried.

+

version

+

String

+

Version corresponding to the alias.

+

description

+

String

+

Description of the alias.

+

last_modified

+

String

+

Time when the alias was last modified.

+

alias_urn

+

String

+

URN of the alias.

+

additional_version_weights

+

Map<String,Integer>

+

Dark launch information.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 200

+

ok

+
{
+  "name" : "dev",
+  "version" : "latest",
+  "description" : "",
+  "last_modified" : "2019-10-31 11:37:58",
+  "alias_urn" : "urn:fss:xxxxxxxx: 7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:!dev",
+  "additional_version_weights" : {
+    "v1" : 10
+  }
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1051",
+  "error_msg" : "Not found the function"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0116.html b/docs/fg/api-ref/functiongraph_06_0116.html new file mode 100644 index 00000000..49da95cb --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0116.html @@ -0,0 +1,241 @@ + + +

Deleting an Alias of a Function Version

+

Function

This API is used to delete an alias of a function version.

+
+

URI

DELETE /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

alias_name

+

Yes

+

String

+

Alias to be deleted.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete the alias of a function version.

+
DELETE https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0117.html b/docs/fg/api-ref/functiongraph_06_0117.html new file mode 100644 index 00000000..67bed424 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0117.html @@ -0,0 +1,398 @@ + + +

Querying the Alias of a Function Version

+

Function

This API is used to query the alias of a function version.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

alias_name

+

Yes

+

String

+

Alias to be queried.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

name

+

String

+

Alias to be queried.

+

version

+

String

+

Version corresponding to the alias.

+

description

+

String

+

Description of the alias.

+

last_modified

+

String

+

Time when the alias was last modified.

+

alias_urn

+

String

+

URN of the alias.

+

additional_version_weights

+

Map<String,Integer>

+

Traffic shifting by percentage.

+

additional_version_strategy

+

Map<String,VersionStrategy>

+

Traffic shifting by rule.

+
+
+ +
+ + + + + + + + + + + + + +
Table 4 VersionStrategy

Parameter

+

Type

+

Description

+

rules

+

Array of VersionStrategyRules objects

+

Rules.

+

combine_type

+

String

+

Rule aggregation mode. and: All rules are met. or: Any rule is met.

+

Enumeration values:

+
  • and

    +
  • or

    +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 5 VersionStrategyRules

Parameter

+

Type

+

Description

+

rule_type

+

String

+

Parameter type.

+

Enumeration values:

+
  • header

    +
  • cookie

    +
+

param

+

String

+

Rule parameter name, which can contain only letters, digits, underscores (_), and hyphens (-).

+

op

+

String

+

Rule matching operator. Currently, only = and in are supported.

+

Enumeration values:

+
  • in

    +
  • =

    +
+

value

+

String

+

Rule value. If op is set to in, the value is a multi-value character string separated by commas (,).

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the alias of a function version.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "name" : "dev",
+  "version" : "latest",
+  "description" : "my dev version",
+  "last_modified" : "2019-10-31 11:37:58",
+  "alias_urn" : "urn:fss:xxxxxxxxxx: 7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:!dev",
+  "additional_version_weights" : {
+    "v1" : 10
+  }
+}
+

Status code: 401

+

Unauthorized.

+
{
+  "error_code" : "FSS.1053",
+  "error_msg" : "Not found the function alias"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0118.html b/docs/fg/api-ref/functiongraph_06_0118.html new file mode 100644 index 00000000..b91522f5 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0118.html @@ -0,0 +1,349 @@ + + +

Querying All Versions and Aliases of a Function

+

Function

This API is used to query the versions and aliases of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/aliases

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

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.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 ListVersionAliasResult

Parameter

+

Type

+

Description

+

name

+

String

+

Alias to be queried.

+

version

+

String

+

Version corresponding to the alias.

+

description

+

String

+

Description of the alias.

+

last_modified

+

String

+

Time when the alias was last modified.

+

alias_urn

+

String

+

URN of the alias.

+

additional_version_weights

+

Map<String,Integer>

+

Dark launch information.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 503

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query aliases of a function.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/aliases
+
+

Example Responses

Status code: 200

+

OK

+
[ {
+  "name" : "a1",
+  "version" : "latest",
+  "description" : "",
+  "last_modified" : "2019-10-31 11:37:58",
+  "alias_urn" : "urn:fss:{region}:46b6f338fc3445b8846c71dfb1fbxxxx:function:default:xxxxx:!a1",
+  "additional_version_weights" : {
+    "v1" : 10
+  }
+} ]
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+

503

+

Service unavailable.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0119.html b/docs/fg/api-ref/functiongraph_06_0119.html new file mode 100644 index 00000000..1816c308 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0119.html @@ -0,0 +1,964 @@ + + +

Querying All Triggers of a Function

+

Function

This API is used to query all triggers of a function.

+
+

URI

GET /v2/{project_id}/fgs/triggers/{function_urn}

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

Default: application/json

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

[items]

+

Array of ListFunctionTriggerResult objects

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 ListFunctionTriggerResult

Parameter

+

Type

+

Description

+

trigger_id

+

String

+

Trigger ID.

+

trigger_type_code

+

String

+

Trigger type.

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_status

+

String

+

Trigger status.

+
  • ACTIVE: The trigger is enabled.

    +
  • DISABLED: The trigger is disabled.

    +
+

Enumeration values:

+
  • ACTIVE

    +
  • DISABLED

    +
+

event_data

+

TriggerEventDataResponseBody object

+

Trigger source event.

+

last_updated_time

+

String

+

Latest update time.

+

created_time

+

String

+

Time when the trigger was created.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 TriggerEventDataResponseBody

Parameter

+

Type

+

Description

+

name

+

String

+

Trigger name.

+

schedule_type

+

String

+

Timer trigger type (timer trigger parameter).

+
  • Rate: specifies the frequency (minutes, hours, or days) at which the function is invoked. If the unit is minute, the value cannot exceed 60. If the unit is hour, the value cannot exceed 24. If the unit is day, the value cannot exceed 30.

    +
  • Cron: specifies a Cron expression to periodically invoke a function.

    +
+

Enumeration values:

+
  • Rate

    +
  • Cron

    +
+

schedule

+

String

+

Triggering rule. (timer trigger parameter).

+
  • When the trigger type is Rate, the scheduled rule is used. When the trigger type is Cron, the Cron expression is used.

    +
+

user_event

+

String

+

Additional information (timer trigger parameter). When the timer trigger triggers the function, the execution event (the event parameter of the function) is {"version": "v1.0", "time": "2018-06-01T08:30:00+08:00", "trigger_type": "TIMER", "trigger_name": "Timer_001", "user_event": "Additional information you entered"}.

+

triggerid

+

String

+

APIG trigger ID (APIG trigger parameter).

+

type

+

Integer

+

The API type (APIG trigger parameter).

+
  • 1: public

    +
  • 2: private

    +
+

path

+

String

+

Path of the API (APIG trigger parameter).

+

protocol

+

String

+

Request protocol of the API (APIG trigger parameter).

+

Enumeration values:

+
  • HTTP

    +
  • HTTPS

    +
+

req_method

+

String

+

Request mode of the API (APIG trigger parameter).

+

Enumeration values:

+
  • GET

    +
  • POST

    +
  • PUT

    +
  • DELETE

    +
  • HEAD

    +
  • PATCH

    +
  • OPTIONS

    +
  • ANY

    +
+

group_id

+

String

+

ID of the group to which the API belongs (APIG trigger parameter).

+

group_name

+

String

+

Name of the group to which the API belongs (APIG trigger parameter).

+

match_mode

+

String

+

Matching mode of the API (APIG trigger parameter).

+
  • SWA: prefix match

    +
  • NORMAL: normal match (absolute match)

    +
+

Enumeration values:

+
  • SWA

    +
  • NORMAL

    +
+

env_name

+

String

+

Environment in which the API is published (APIG trigger parameter).

+

env_id

+

String

+

ID of the environment in which the API has been published (APIG trigger parameter).

+

api_id

+

String

+

API ID (APIG trigger parameter).

+

api_name

+

String

+

API name (APIG trigger parameter).

+

auth

+

String

+

Security authentication (APIG trigger parameter).

+
  • IAM: IAM authentication. Only IAM users are allowed to access the system. The security level is medium.

    +
  • APP: Appkey&Appsecret authentication is used. The security level is high. This authentication mode is recommended.

    +
  • NONE: No authentication mode is used. All users can access the system. This mode is not recommended.

    +
+

Enumeration values:

+
  • IAM

    +
  • APP

    +
  • NONE

    +
+

invoke_url

+

String

+

API calling address (APIG trigger parameter).

+

func_info

+

ApigTriggerFuncInfo object

+

FunctionGraph backend details (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

sl_domain

+

String

+

Subdomain name allocated by the APIG system by default (APIG trigger parameter).

+

Minimum: 1

+

Maximum: 255

+

backend_type

+

String

+

Backend type of the API (APIG trigger parameter).

+

Enumeration values:

+
  • FUNCTION

    +
+

instance_id

+

String

+

Instance ID. This parameter is mandatory for DDS, Kafka, and RabbitMQ triggers.

+
  • APIG trigger: APIG gateway ID

    +
  • DDS trigger: DB instance ID.

    +
  • Kafka trigger: Kafka instance ID

    +
  • RabbitMQ trigger: RabbitMQ instance ID

    +
+

roma_app_id

+

String

+

ID of the integration application to which the API belongs (APIG trigger parameter).

+

operations

+

Array of strings

+

Custom operations (CTS trigger parameter). CTS collects operation records of subscribed cloud resources. If you create a function with a CTS trigger, collected operation records of specified cloud services will be passed as a parameter to invoke the function.

+

collection_name

+

String

+

Collection name (DDS trigger parameter).

+

db_name

+

String

+

Database name (DDS trigger parameter).

+

db_password

+

String

+

DDS database password (DDS trigger parameter).

+

db_user

+

String

+

DDS database username (DDS trigger parameter).

+

instance_addrs

+

Array of strings

+

DDS database instance address (DDS trigger parameter).

+

mode

+

String

+

DDS database instance type (DDS trigger parameter).

+
  • Sharding: cluster instance

    +
  • ReplicaSet: replica set instance

    +
  • Single: single node instance.

    +
+

batch_size

+

Integer

+

Batch size: Maximum number of data records that can be processed by the function at a time. This parameter is mandatory for DIS, DDS, Kafka, and RabbitMQ triggers.

+
  • DDS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • DIS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • Kafka trigger: Set the batch size to a value ranging from 1 to 1000.

    +
  • RabbitMQ trigger: Set the batch size to a value ranging from 1 to 1000.

    +
+

queue_id

+

String

+

Queue ID (DMS trigger parameter).

+

consumer_group_id

+

String

+

Consumer group ID (DMS trigger parameter).

+

polling_interval

+

Integer

+

Pull period.

+

stream_name

+

String

+

Stream name (DIS trigger parameter).

+

sharditerator_type

+

String

+

Start position (DIS trigger parameter).

+
  • TRIM_HORIZON: Data is read from the earliest valid record stored in the partition.

    +
  • LATEST: Data is read from the latest record in the partition. This option ensures that the most recent data in the partition is read.

    +
+

Enumeration values:

+
  • TRIM_HORIZON

    +
  • LATEST

    +
+

polling_unit

+

String

+

Unit of the pull period (DIS trigger parameter).

+
  • s: second

    +
  • ms: millisecond

    +
+

Enumeration values:

+
  • s

    +
  • ms

    +
+

max_fetch_bytes

+

Integer

+

Maximum number of bytes to be extracted (DIS trigger parameter).

+

Minimum: 0

+

Maximum: 4194304

+

is_serial

+

String

+

Serial Data Processing: If this option is selected, FunctionGraph pulls data from the stream only after previous data is processed. If this option is not selected, FunctionGraph pulls data from the stream as long as the pull period ends.

+

Enumeration values:

+
  • true

    +
  • false

    +
+

log_group_id

+

String

+

Log group ID (LTS trigger parameter).

+

log_topic_id

+

String

+

Log stream ID (LTS trigger parameter).

+

bucket

+

String

+

Bucket name (OBS trigger parameter). The name of the OBS bucket used as the event source cannot be the same as that of an existing bucket of the current user or another user. After being created, the bucket name cannot be modified.

+

Minimum: 1

+

Maximum: 64

+

prefix

+

String

+

Prefix (OBS trigger parameter). Enter a prefix to limit notifications to objects whose names start with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

suffix

+

String

+

Suffix (OBS trigger parameter). Enter a suffix to limit notifications to objects whose names end with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

events

+

Array of strings

+

Trigger event (OBS trigger parameter).

+
  • ObjectCreated: all object creation operations, including PUT, POST, COPY, and part assembling

    +
  • Put: Uploads an object using Put.

    +
  • Post: Uploads an object using POST

    +
  • Copy: Copies an object using COPY.

    +
  • CompleteMultipartUpload: Merges parts of a multipart upload.

    +
  • ObjectRemoved: Deletes an object.

    +
  • Delete: Deletes an object by specifying its version ID.

    +
  • DeleteMarkerCreated: Deletes an object without specifying its version ID.

    +
+

topic_urn

+

String

+

Topic URN (SMN trigger parameter)

+

Minimum: 1

+

Maximum: 255

+

topic_ids

+

Array of strings

+

The Kafka topic ID list (Kafka trigger parameter).

+

kafka_user

+

String

+

Kafka account name (Kafka trigger parameter).

+

kafka_password

+

String

+

Kafka password (Kafka trigger parameter).

+

kafka_connect_address

+

String

+

Kafka instance connection address (Kafka trigger parameter).

+

kafka_ssl_enable

+

Boolean

+

Whether to enable SASL authentication(Kafka trigger parameter).

+

access_password

+

String

+

RabbitMQ account password (RabbitMQ trigger parameter).

+

access_user

+

String

+

RabbitMQ username (RabbitMQ trigger parameter).

+

connect_address

+

String

+

Instance IP address (RabbitMQ trigger parameter).

+

exchange_name

+

String

+

Switch name (RabbitMQ trigger parameter).

+

vhost

+

String

+

Virtual host (RabbitMQ trigger parameter).

+

ssl_enable

+

Boolean

+

Whether to enable SSL (RabbitMQ trigger parameter).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 6 ApigTriggerFuncInfo

Parameter

+

Type

+

Description

+

function_urn

+

String

+

Function URN. For details, see the function model descriptions.

+

invocation_type

+

String

+

Execution mode of a function.

+
  • sync: synchronous execution

    +
  • async: asynchronous execution

    +
+

Enumeration values:

+
  • sync

    +
  • async

    +
+

timeout

+

Integer

+

Timeout allowed for APIG to request the FunctionGraph service. The unit is in millisecond. This parameter is mandatory for APIG triggers.

+

Minimum: 1

+

Maximum: 60000

+

version

+

String

+

Function version information.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query all triggers of a function.

+
GET https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}
+
+

Example Responses

Status code: 200

+

OK

+
[ {
+  "trigger_id" : "1b3b264db3b849118d007884b9bc8a60",
+  "trigger_type_code" : "APIG",
+  "trigger_status" : "ACTIVE",
+  "event_data" : {
+    "api_id" : "4a59f6a7263c4d1dab3f69c34f98d949",
+    "api_name" : "API_test_triggers",
+    "auth" : "IAM",
+    "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
+    "env_name" : "RELEASE",
+    "func_info" : {
+      "function_urn" : "urn:fss:xxxxx:46b6f338fc3445b8846c71dfb1fbxxxx:function:default:test_triggers",
+      "invocation_type" : "sync",
+      "timeout" : 5000,
+      "version" : "latest"
+    },
+    "group_id" : "9205f83fe721481eb490870d380cf31d",
+    "group_name" : "APIGroup_2mbe",
+    "invoke_url" : "https://ed94ae9494ba4f70ac24224747202140.{apig_endpoint}/test_triggers",
+    "match_mode" : "SWA",
+    "name" : "API_test_triggers",
+    "path" : "/test_triggers",
+    "protocol" : "HTTPS",
+    "req_method" : "ANY",
+    "triggerid" : "1b3b264db3b849118d007884b9bc8a60",
+    "type" : 1
+  },
+  "last_updated_time" : "2022-11-09 16:37:24",
+  "created_time" : "2022-11-09 16:37:24"
+} ]
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0120.html b/docs/fg/api-ref/functiongraph_06_0120.html new file mode 100644 index 00000000..1c60b349 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0120.html @@ -0,0 +1,965 @@ + + +

Querying a Trigger

+

Function

This API is used to query a specified trigger.

+
+

URI

GET /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

trigger_type_code

+

Yes

+

String

+

Trigger type code.

+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_id

+

Yes

+

String

+

Trigger ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

Default: application/json

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

trigger_id

+

String

+

Trigger ID.

+

trigger_type_code

+

String

+

Trigger type.

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_status

+

String

+

Trigger status.

+
  • ACTIVE: The trigger is enabled.

    +
  • DISABLED: The trigger is disabled.

    +
+

Enumeration values:

+
  • ACTIVE

    +
  • DISABLED

    +
+

event_data

+

TriggerEventDataResponseBody object

+

Trigger source event.

+

last_updated_time

+

String

+

Latest update time.

+

created_time

+

String

+

Time when the trigger was created.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 TriggerEventDataResponseBody

Parameter

+

Type

+

Description

+

name

+

String

+

Trigger name.

+

schedule_type

+

String

+

Timer trigger type (timer trigger parameter).

+
  • Rate: specifies the frequency (minutes, hours, or days) at which the function is invoked. If the unit is minute, the value cannot exceed 60. If the unit is hour, the value cannot exceed 24. If the unit is day, the value cannot exceed 30.

    +
  • Cron: specifies a Cron expression to periodically invoke a function.

    +
+

Enumeration values:

+
  • Rate

    +
  • Cron

    +
+

schedule

+

String

+

Triggering rule. (timer trigger parameter).

+
  • When the trigger type is Rate, the scheduled rule is used. When the trigger type is Cron, the Cron expression is used.

    +
+

user_event

+

String

+

Additional information (timer trigger parameter). When the timer trigger triggers the function, the execution event (the event parameter of the function) is {"version": "v1.0", "time": "2018-06-01T08:30:00+08:00", "trigger_type": "TIMER", "trigger_name": "Timer_001", "user_event": "Additional information you entered"}.

+

triggerid

+

String

+

APIG trigger ID (APIG trigger parameter).

+

type

+

Integer

+

The API type (APIG trigger parameter).

+
  • 1: public

    +
  • 2: private

    +
+

path

+

String

+

Path of the API (APIG trigger parameter).

+

protocol

+

String

+

Request protocol of the API (APIG trigger parameter).

+

Enumeration values:

+
  • HTTP

    +
  • HTTPS

    +
+

req_method

+

String

+

Request mode of the API (APIG trigger parameter).

+

Enumeration values:

+
  • GET

    +
  • POST

    +
  • PUT

    +
  • DELETE

    +
  • HEAD

    +
  • PATCH

    +
  • OPTIONS

    +
  • ANY

    +
+

group_id

+

String

+

ID of the group to which the API belongs (APIG trigger parameter).

+

group_name

+

String

+

Name of the group to which the API belongs (APIG trigger parameter).

+

match_mode

+

String

+

Matching mode of the API (APIG trigger parameter).

+
  • SWA: prefix match

    +
  • NORMAL: normal match (absolute match)

    +
+

Enumeration values:

+
  • SWA

    +
  • NORMAL

    +
+

env_name

+

String

+

Environment in which the API is published (APIG trigger parameter).

+

env_id

+

String

+

ID of the environment in which the API has been published (APIG trigger parameter).

+

api_id

+

String

+

API ID (APIG trigger parameter).

+

api_name

+

String

+

API name (APIG trigger parameter).

+

auth

+

String

+

Security authentication (APIG trigger parameter).

+
  • IAM: IAM authentication. Only IAM users are allowed to access the system. The security level is medium.

    +
  • APP: Appkey&Appsecret authentication is used. The security level is high. This authentication mode is recommended.

    +
  • NONE: No authentication mode is used. All users can access the system. This mode is not recommended.

    +
+

Enumeration values:

+
  • IAM

    +
  • APP

    +
  • NONE

    +
+

invoke_url

+

String

+

API calling address (APIG trigger parameter).

+

func_info

+

ApigTriggerFuncInfo object

+

FunctionGraph backend details (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

sl_domain

+

String

+

Subdomain name allocated by the APIG system by default (APIG trigger parameter).

+

Minimum: 1

+

Maximum: 255

+

backend_type

+

String

+

Backend type of the API (APIG trigger parameter).

+

Enumeration values:

+
  • FUNCTION

    +
+

instance_id

+

String

+

Instance ID. This parameter is mandatory for DDS, Kafka, and RabbitMQ triggers.

+
  • APIG trigger: APIG gateway ID

    +
  • DDS trigger: DB instance ID.

    +
  • Kafka trigger: Kafka instance ID

    +
  • RabbitMQ trigger: RabbitMQ instance ID

    +
+

roma_app_id

+

String

+

ID of the integration application to which the API belongs (APIG trigger parameter).

+

operations

+

Array of strings

+

Custom operations (CTS trigger parameter). CTS collects operation records of subscribed cloud resources. If you create a function with a CTS trigger, collected operation records of specified cloud services will be passed as a parameter to invoke the function.

+

collection_name

+

String

+

Collection name (DDS trigger parameter).

+

db_name

+

String

+

Database name (DDS trigger parameter).

+

db_password

+

String

+

DDS database password (DDS trigger parameter).

+

db_user

+

String

+

DDS database username (DDS trigger parameter).

+

instance_addrs

+

Array of strings

+

DDS database instance address (DDS trigger parameter).

+

mode

+

String

+

DDS database instance type (DDS trigger parameter).

+
  • Sharding: cluster instance

    +
  • ReplicaSet: replica set instance

    +
  • Single: single node instance.

    +
+

batch_size

+

Integer

+

Batch size: Maximum number of data records that can be processed by the function at a time. This parameter is mandatory for DIS, DDS, Kafka, and RabbitMQ triggers.

+
  • DDS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • DIS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • Kafka trigger: Set the batch size to a value ranging from 1 to 1000.

    +
  • RabbitMQ trigger: Set the batch size to a value ranging from 1 to 1000.

    +
+

queue_id

+

String

+

Queue ID (DMS trigger parameter).

+

consumer_group_id

+

String

+

Consumer group ID (DMS trigger parameter).

+

polling_interval

+

Integer

+

Pull period.

+

stream_name

+

String

+

Stream name (DIS trigger parameter).

+

sharditerator_type

+

String

+

Start position (DIS trigger parameter).

+
  • TRIM_HORIZON: Data is read from the earliest valid record stored in the partition.

    +
  • LATEST: Data is read from the latest record in the partition. This option ensures that the most recent data in the partition is read.

    +
+

Enumeration values:

+
  • TRIM_HORIZON

    +
  • LATEST

    +
+

polling_unit

+

String

+

Unit of the pull period (DIS trigger parameter).

+
  • s: second

    +
  • ms: millisecond

    +
+

Enumeration values:

+
  • s

    +
  • ms

    +
+

max_fetch_bytes

+

Integer

+

Maximum number of bytes to be extracted (DIS trigger parameter).

+

Minimum: 0

+

Maximum: 4194304

+

is_serial

+

String

+

Serial Data Processing: If this option is selected, FunctionGraph pulls data from the stream only after previous data is processed. If this option is not selected, FunctionGraph pulls data from the stream as long as the pull period ends.

+

Enumeration values:

+
  • true

    +
  • false

    +
+

log_group_id

+

String

+

Log group ID (LTS trigger parameter).

+

log_topic_id

+

String

+

Log stream ID (LTS trigger parameter).

+

bucket

+

String

+

Bucket name (OBS trigger parameter). The name of the OBS bucket used as the event source cannot be the same as that of an existing bucket of the current user or another user. After being created, the bucket name cannot be modified.

+

Minimum: 1

+

Maximum: 64

+

prefix

+

String

+

Prefix (OBS trigger parameter). Enter a prefix to limit notifications to objects whose names start with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

suffix

+

String

+

Suffix (OBS trigger parameter). Enter a suffix to limit notifications to objects whose names end with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

events

+

Array of strings

+

Trigger event (OBS trigger parameter).

+
  • ObjectCreated: all object creation operations, including PUT, POST, COPY, and part assembling

    +
  • Put: Uploads an object using Put.

    +
  • Post: Uploads an object using POST

    +
  • Copy: Copies an object using COPY.

    +
  • CompleteMultipartUpload: Merges parts of a multipart upload.

    +
  • ObjectRemoved: Deletes an object.

    +
  • Delete: Deletes an object by specifying its version ID.

    +
  • DeleteMarkerCreated: Deletes an object without specifying its version ID.

    +
+

topic_urn

+

String

+

Topic URN (SMN trigger parameter)

+

Minimum: 1

+

Maximum: 255

+

topic_ids

+

Array of strings

+

The Kafka topic ID list (Kafka trigger parameter).

+

kafka_user

+

String

+

Kafka account name (Kafka trigger parameter).

+

kafka_password

+

String

+

Kafka password (Kafka trigger parameter).

+

kafka_connect_address

+

String

+

Kafka instance connection address (Kafka trigger parameter).

+

kafka_ssl_enable

+

Boolean

+

Whether to enable SASL authentication(Kafka trigger parameter).

+

access_password

+

String

+

RabbitMQ account password (RabbitMQ trigger parameter).

+

access_user

+

String

+

RabbitMQ username (RabbitMQ trigger parameter).

+

connect_address

+

String

+

Instance IP address (RabbitMQ trigger parameter).

+

exchange_name

+

String

+

Switch name (RabbitMQ trigger parameter).

+

vhost

+

String

+

Virtual host (RabbitMQ trigger parameter).

+

ssl_enable

+

Boolean

+

Whether to enable SSL (RabbitMQ trigger parameter).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 5 ApigTriggerFuncInfo

Parameter

+

Type

+

Description

+

function_urn

+

String

+

Function URN. For details, see the function model descriptions.

+

invocation_type

+

String

+

Execution mode of a function.

+
  • sync: synchronous execution

    +
  • async: asynchronous execution

    +
+

Enumeration values:

+
  • sync

    +
  • async

    +
+

timeout

+

Integer

+

Timeout allowed for APIG to request the FunctionGraph service. The unit is in millisecond. This parameter is mandatory for APIG triggers.

+

Minimum: 1

+

Maximum: 60000

+

version

+

String

+

Function version information.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query a trigger.

+
GET https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "trigger_id" : "9a14fae1-78cf-4185-ac7a-429eb6dc41fb",
+  "trigger_type_code" : "TIMER",
+  "trigger_status" : "ACTIVE",
+  "event_data" : {
+    "name" : "Timer-cpg3",
+    "schedule" : "3m",
+    "schedule_type" : "Rate"
+  },
+  "last_updated_time" : "2022-11-09 16:37:24",
+  "created_time" : "2019-10-29171553"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0121.html b/docs/fg/api-ref/functiongraph_06_0121.html new file mode 100644 index 00000000..a2e26a35 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0121.html @@ -0,0 +1,268 @@ + + +

Deleting All Triggers of a Function

+

Function

This API is used to delete all triggers of a function.

+

If a non-latest function version is specified, all triggers corresponding to the version will be deleted.

+

If an alias is specified, all triggers corresponding to the alias will be deleted.

+

If neither function versions nor aliases are specified or the latest version is specified, all triggers of the function (including all versions and aliases) will be deleted.

+
+

URI

DELETE /v2/{project_id}/fgs/triggers/{function_urn}

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

Default: application/json

+
+
+
+

Response Parameters

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete all triggers of a function.

+
DELETE https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0122.html b/docs/fg/api-ref/functiongraph_06_0122.html new file mode 100644 index 00000000..428ed9cb --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0122.html @@ -0,0 +1,1730 @@ + + +

Creating a Trigger

+

Function

This API is used to create a trigger.

+ +
+

URI

POST /v2/{project_id}/fgs/triggers/{function_urn}

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

Default: application/json

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

trigger_type_code

+

Yes

+

String

+

Trigger type.

+
  • TIMER

    +
  • APIG

    +
  • CTS: Enable CTS first.

    +
  • DDS: Configure a VPC for the function first.

    +
  • DMS: Configure a DMS agency first.

    +
  • DIS: Configure a DIS agency first.

    +
  • LTS: Configure an LTS agency first.

    +
  • OBS

    +
  • KAFKA

    +
+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_status

+

No

+

String

+

Trigger status. Options: ACTIVE and DISABLED.

+

Enumeration values:

+
  • ACTIVE

    +
  • DISABLED

    +
+

event_type_code

+

No

+

String

+

Message code.

+

event_data

+

Yes

+

TriggerEventDataRequestBody object

+

Trigger source event.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 TriggerEventDataRequestBody

Parameter

+

Mandatory

+

Type

+

Description

+

name

+

No

+

String

+

Timer trigger: trigger name

+
  • APIG trigger: API name

    +
  • CTS trigger: Notification name

    +
  • OBS trigger: Event Notification name. The default value is The trigger ID.

    +
+

schedule_type

+

No

+

String

+

Timer trigger type (timer trigger parameter). This parameter is mandatory for timer triggers.

+
  • Rate: specifies the frequency (minutes, hours, or days) at which the function is invoked. If the unit is minute, the value cannot exceed 60. If the unit is hour, the value cannot exceed 24. If the unit is day, the value cannot exceed 30.

    +
  • Cron: specifies a Cron expression to periodically invoke a function.

    +
+

Enumeration values:

+
  • Rate

    +
  • Cron

    +
+

schedule

+

No

+

String

+

Triggering rule. (timer trigger parameter). This parameter is mandatory for timer triggers.

+
  • When the trigger type is Rate, the scheduled rule is used. When the trigger type is Cron, the Cron expression is used.

    +
+

user_event

+

No

+

String

+

Additional information (timer trigger parameter). When the timer trigger triggers the function, the execution event (the event parameter of the function) is {"version": "v1.0", "time": "2018-06-01T08:30:00+08:00", "trigger_type": "TIMER", "trigger_name": "Timer_001", "user_event": "Additional information you entered"}.

+

type

+

No

+

Integer

+

API visibility(APIG trigger parameter). This parameter is mandatory for APIG triggers.

+
  • 1: public

    +
  • 2: private

    +
+

path

+

No

+

String

+

Path of the API (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

protocol

+

No

+

String

+

Request protocol of the API (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

Enumeration values:

+
  • HTTP

    +
  • HTTPS

    +
+

req_method

+

No

+

String

+

Request method of the API (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

Enumeration values:

+
  • GET

    +
  • POST

    +
  • PUT

    +
  • DELETE

    +
  • HEAD

    +
  • PATCH

    +
  • OPTIONS

    +
  • ANY

    +
+

group_id

+

No

+

String

+

ID of the group to which the API belongs (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

group_name

+

No

+

String

+

Name of the API group to which the API belongs.

+

match_mode

+

No

+

String

+

Matching mode of the API (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+
  • SWA: prefix match

    +
  • NORMAL: normal match (absolute match)

    +
+

Enumeration values:

+
  • SWA

    +
  • NORMAL

    +
+

env_name

+

No

+

String

+

Environment in which the API is published (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

env_id

+

No

+

String

+

ID of the environment in which the API has been published (APIG trigger parameter) This parameter is mandatory for APIG triggers.

+

auth

+

No

+

String

+

Security authentication (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+
  • IAM: IAM authentication. Only IAM users are allowed to access the system. The security level is medium.

    +
  • APP: Appkey&Appsecret authentication is used. The security level is high. This authentication mode is recommended.

    +
  • NONE: No authentication mode is used. All users can access the system. This mode is not recommended.

    +
+

Enumeration values:

+
  • IAM

    +
  • APP

    +
  • NONE

    +
+

func_info

+

No

+

ApigTriggerFuncInfo object

+

FunctionGraph backend details (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

sl_domain

+

No

+

String

+

Subdomain name allocated by the APIG system by default (APIG trigger parameter).

+

Minimum: 1

+

Maximum: 255

+

backend_type

+

No

+

String

+

Backend type of the API (APIG trigger parameter).

+

Enumeration values:

+
  • FUNCTION

    +
+

operations

+

No

+

Array of strings

+

Custom operations (CTS trigger parameter). This parameter is mandatory for CTS triggers. CTS collects operation records of subscribed cloud resources. If you create a function with a CTS trigger, collected operation records of specified cloud services will be passed as a parameter to invoke the function.

+

instance_id

+

No

+

String

+

Instance ID. This parameter is mandatory for DDS, Kafka, and RabbitMQ triggers.

+
  • APIG trigger: APIG gateway ID

    +
  • DDS trigger: DB instance ID.

    +
  • Kafka trigger: Kafka instance ID

    +
  • RabbitMQ trigger: RabbitMQ instance ID

    +
+

collection_name

+

No

+

String

+

Collection name (DDS trigger parameter). This parameter is mandatory for DDS triggers.

+

db_name

+

No

+

String

+

Database name (DDS trigger parameter). This parameter is mandatory for DDS triggers.

+

db_password

+

No

+

String

+

DDS database password (DDS trigger parameter). This parameter is mandatory for DDS triggers.

+

batch_size

+

No

+

Integer

+

Batch size: Maximum number of data records that can be processed by the function at a time. This parameter is mandatory for DIS, DDS, Kafka, and RabbitMQ triggers.

+
  • DDS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • DIS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • Kafka trigger: Set the batch size to a value ranging from 1 to 1,000.

    +
  • RabbitMQ trigger: Set the batch size to a value ranging from 1 to 1,000.

    +
+

queue_id

+

No

+

String

+

Queue ID (DMS trigger parameter). This parameter is mandatory for DMS triggers.

+

consumer_group_id

+

No

+

String

+

Consumer group ID (DMS trigger parameter). This parameter is mandatory for DMS triggers.

+

polling_interval

+

No

+

Integer

+

Pull period. This parameter is mandatory for DIS and DMS triggers.

+

stream_name

+

No

+

String

+

Stream name (DIS trigger parameter). This parameter is mandatory for DIS triggers.

+

sharditerator_type

+

No

+

String

+

Starting position (DIS trigger parameter). This parameter is mandatory for DIS triggers.

+
  • TRIM_HORIZON: Data is read from the earliest valid record stored in the partition.

    +
  • LATEST: Data is read from the latest record in the partition. This option ensures that the most recent data in the partition is read.

    +
+

Enumeration values:

+
  • TRIM_HORIZON

    +
  • LATEST

    +
+

polling_unit

+

No

+

String

+

Pull period unit (DIS trigger parameter). This parameter is mandatory for DIS triggers.

+
  • s: second

    +
  • ms: millisecond

    +
+

Enumeration values:

+
  • s

    +
  • ms

    +
+

max_fetch_bytes

+

No

+

Integer

+

Max. fetch bytes (DIS trigger parameter).

+

Minimum: 0

+

Maximum: 4194304

+

is_serial

+

No

+

String

+

Serial data processing (DIS trigger parameter). If enabled, FunctionGraph pulls data from the stream only after previous data is processed. If disabled, FunctionGraph pulls data from the stream as long as the pull period ends. This parameter is mandatory for DIS triggers.

+

Enumeration values:

+
  • true

    +
  • false

    +
+

log_group_id

+

No

+

String

+

Log group ID (LTS trigger parameter). This parameter is mandatory for LTS triggers.

+

log_topic_id

+

No

+

String

+

Log stream ID (LTS trigger parameter). This parameter is mandatory for LTS triggers.

+

bucket

+

No

+

String

+

Bucket name (OBS trigger parameter). The name of the OBS bucket used as the event source cannot be the same as that of an existing bucket of the current user or another user. After being created, the bucket name cannot be modified. This parameter is mandatory for OBS triggers.

+

Minimum: 1

+

Maximum: 64

+

prefix

+

No

+

String

+

Prefix (OBS trigger parameter). Enter a prefix to limit notifications to objects whose names start with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

suffix

+

No

+

String

+

Suffix (OBS trigger parameter). Enter a suffix to limit notifications to objects whose names end with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

events

+

No

+

Array of strings

+

Trigger event (OBS trigger parameter). This parameter is mandatory for OBS triggers.

+
  • ObjectCreated: all object creation operations, including PUT, POST, COPY, and part assembling

    +
  • Put: Uploads an object using Put.

    +
  • Post: Uploads an object using POST

    +
  • Copy: Copies an object using COPY.

    +
  • CompleteMultipartUpload: Merges parts of a multipart upload.

    +
  • ObjectRemoved: Deletes an object.

    +
  • Delete: Deletes an object by specifying its version ID. - DeleteMarkerCreated: Deletes an object without specifying its version ID.

    +
+

topic_urn

+

No

+

String

+

Topic URN (SMN trigger parameter) This parameter is mandatory for SMN triggers.

+

Minimum: 1

+

Maximum: 255

+

topic_ids

+

No

+

Array of strings

+

The Kafka topic ID list (Kafka trigger parameter). This parameter is mandatory for Kafka triggers.

+

kafka_user

+

No

+

String

+

Kafka account name (Kafka trigger parameter).

+

kafka_password

+

No

+

String

+

Kafka password (Kafka trigger parameter).

+

kafka_connect_address

+

No

+

String

+

Kafka instance connection address (Kafka trigger parameter).

+

kafka_ssl_enable

+

No

+

Boolean

+

Whether to enable SASL authentication(Kafka trigger parameter).

+

access_password

+

No

+

String

+

RabbitMQ account password (RabbitMQ trigger parameter). This parameter is mandatory for RabbitMQ triggers.

+

access_user

+

No

+

String

+

RabbitMQ username (RabbitMQ trigger parameter).

+

connect_address

+

No

+

String

+

Instance IP address (RabbitMQ trigger parameter).

+

exchange_name

+

No

+

String

+

Switch name (RabbitMQ trigger parameter). This parameter is mandatory for RabbitMQ triggers.

+

vhost

+

No

+

String

+

Virtual host (RabbitMQ trigger parameter).

+

ssl_enable

+

No

+

Boolean

+

Whether to enable SSL (RabbitMQ trigger parameter).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ApigTriggerFuncInfo

Parameter

+

Mandatory

+

Type

+

Description

+

function_urn

+

No

+

String

+

Function URN. For details, see the function model descriptions.

+

invocation_type

+

No

+

String

+

Execution mode of a function.

+
  • sync: synchronous execution

    +
  • async: asynchronous execution

    +
+

Enumeration values:

+
  • sync

    +
  • async

    +
+

timeout

+

Yes

+

Integer

+

Timeout allowed for APIG to request the FunctionGraph service. The unit is in millisecond. This parameter is mandatory for APIG triggers.

+

Minimum: 1

+

Maximum: 60000

+

version

+

No

+

String

+

Function version information.

+
+
+
+

Response Parameters

Status code: 201

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

trigger_id

+

String

+

Trigger ID.

+

trigger_type_code

+

String

+

Trigger type.

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_status

+

String

+

Trigger status.

+
  • ACTIVE: The trigger is enabled.

    +
  • DISABLED: The trigger is disabled.

    +
+

Enumeration values:

+
  • ACTIVE

    +
  • DISABLED

    +
+

event_data

+

TriggerEventDataResponseBody object

+

Trigger source event.

+

last_updated_time

+

String

+

Latest update time.

+

created_time

+

String

+

Time when the trigger was created.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 7 TriggerEventDataResponseBody

Parameter

+

Type

+

Description

+

name

+

String

+

Trigger name.

+

schedule_type

+

String

+

Timer trigger type (timer trigger parameter).

+
  • Rate: specifies the frequency (minutes, hours, or days) at which the function is invoked. If the unit is minute, the value cannot exceed 60. If the unit is hour, the value cannot exceed 24. If the unit is day, the value cannot exceed 30.

    +
  • Cron: specifies a Cron expression to periodically invoke a function.

    +
+

Enumeration values:

+
  • Rate

    +
  • Cron

    +
+

schedule

+

String

+

Triggering rule. (timer trigger parameter).

+
  • When the trigger type is Rate, the scheduled rule is used. When the trigger type is Cron, the Cron expression is used.

    +
+

user_event

+

String

+

Additional information (timer trigger parameter). When the timer trigger triggers the function, the execution event (the event parameter of the function) is {"version": "v1.0", "time": "2018-06-01T08:30:00+08:00", "trigger_type": "TIMER", "trigger_name": "Timer_001", "user_event": "Additional information you entered"}.

+

triggerid

+

String

+

APIG trigger ID (APIG trigger parameter).

+

type

+

Integer

+

The API type (APIG trigger parameter).

+
  • 1: public

    +
  • 2: private

    +
+

path

+

String

+

Path of the API (APIG trigger parameter).

+

protocol

+

String

+

Request protocol of the API (APIG trigger parameter).

+

Enumeration values:

+
  • HTTP

    +
  • HTTPS

    +
+

req_method

+

String

+

Request mode of the API (APIG trigger parameter).

+

Enumeration values:

+
  • GET

    +
  • POST

    +
  • PUT

    +
  • DELETE

    +
  • HEAD

    +
  • PATCH

    +
  • OPTIONS

    +
  • ANY

    +
+

group_id

+

String

+

ID of the group to which the API belongs (APIG trigger parameter).

+

group_name

+

String

+

Name of the group to which the API belongs (APIG trigger parameter).

+

match_mode

+

String

+

Matching mode of the API (APIG trigger parameter).

+
  • SWA: prefix match

    +
  • NORMAL: normal match (absolute match)

    +
+

Enumeration values:

+
  • SWA

    +
  • NORMAL

    +
+

env_name

+

String

+

Environment in which the API is published (APIG trigger parameter).

+

env_id

+

String

+

ID of the environment in which the API has been published (APIG trigger parameter).

+

api_id

+

String

+

API ID (APIG trigger parameter).

+

api_name

+

String

+

API name (APIG trigger parameter).

+

auth

+

String

+

Security authentication (APIG trigger parameter).

+
  • IAM: IAM authentication. Only IAM users are allowed to access the system. The security level is medium.

    +
  • APP: Appkey&Appsecret authentication is used. The security level is high. This authentication mode is recommended.

    +
  • NONE: No authentication mode is used. All users can access the system. This mode is not recommended.

    +
+

Enumeration values:

+
  • IAM

    +
  • APP

    +
  • NONE

    +
+

invoke_url

+

String

+

API calling address (APIG trigger parameter).

+

func_info

+

ApigTriggerFuncInfo object

+

FunctionGraph backend details (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

sl_domain

+

String

+

Subdomain name allocated by the APIG system by default (APIG trigger parameter).

+

Minimum: 1

+

Maximum: 255

+

backend_type

+

String

+

Backend type of the API (APIG trigger parameter).

+

Enumeration values:

+
  • FUNCTION

    +
+

instance_id

+

String

+

Instance ID. This parameter is mandatory for DDS, Kafka, and RabbitMQ triggers.

+
  • APIG trigger: APIG gateway ID

    +
  • DDS trigger: DB instance ID.

    +
  • Kafka trigger: Kafka instance ID

    +
  • RabbitMQ trigger: RabbitMQ instance ID

    +
+

roma_app_id

+

String

+

ID of the integration application to which the API belongs (APIG trigger parameter).

+

operations

+

Array of strings

+

Custom operations (CTS trigger parameter). CTS collects operation records of subscribed cloud resources. If you create a function with a CTS trigger, collected operation records of specified cloud services will be passed as a parameter to invoke the function.

+

collection_name

+

String

+

Collection name (DDS trigger parameter).

+

db_name

+

String

+

Database name (DDS trigger parameter).

+

db_password

+

String

+

DDS database password (DDS trigger parameter).

+

db_user

+

String

+

DDS database username (DDS trigger parameter).

+

instance_addrs

+

Array of strings

+

DDS database instance address (DDS trigger parameter).

+

mode

+

String

+

DDS database instance type (DDS trigger parameter).

+
  • Sharding: cluster instance

    +
  • ReplicaSet: replica set instance

    +
  • Single: single node instance.

    +
+

batch_size

+

Integer

+

Batch size: Maximum number of data records that can be processed by the function at a time. This parameter is mandatory for DIS, DDS, Kafka, and RabbitMQ triggers.

+
  • DDS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • DIS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • Kafka trigger: Set the batch size to a value ranging from 1 to 1000.

    +
  • RabbitMQ trigger: Set the batch size to a value ranging from 1 to 1000.

    +
+

queue_id

+

String

+

Queue ID (DMS trigger parameter).

+

consumer_group_id

+

String

+

Consumer group ID (DMS trigger parameter).

+

polling_interval

+

Integer

+

Pull period.

+

stream_name

+

String

+

Stream name (DIS trigger parameter).

+

sharditerator_type

+

String

+

Start position (DIS trigger parameter).

+
  • TRIM_HORIZON: Data is read from the earliest valid record stored in the partition.

    +
  • LATEST: Data is read from the latest record in the partition. This option ensures that the most recent data in the partition is read.

    +
+

Enumeration values:

+
  • TRIM_HORIZON

    +
  • LATEST

    +
+

polling_unit

+

String

+

Unit of the pull period (DIS trigger parameter).

+
  • s: second

    +
  • ms: millisecond

    +
+

Enumeration values:

+
  • s

    +
  • ms

    +
+

max_fetch_bytes

+

Integer

+

Maximum number of bytes to be extracted (DIS trigger parameter).

+

Minimum: 0

+

Maximum: 4194304

+

is_serial

+

String

+

Serial Data Processing: If this option is selected, FunctionGraph pulls data from the stream only after previous data is processed. If this option is not selected, FunctionGraph pulls data from the stream as long as the pull period ends.

+

Enumeration values:

+
  • true

    +
  • false

    +
+

log_group_id

+

String

+

Log group ID (LTS trigger parameter).

+

log_topic_id

+

String

+

Log stream ID (LTS trigger parameter).

+

bucket

+

String

+

Bucket name (OBS trigger parameter). The name of the OBS bucket used as the event source cannot be the same as that of an existing bucket of the current user or another user. After being created, the bucket name cannot be modified.

+

Minimum: 1

+

Maximum: 64

+

prefix

+

String

+

Prefix (OBS trigger parameter). Enter a prefix to limit notifications to objects whose names start with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

suffix

+

String

+

Suffix (OBS trigger parameter). Enter a suffix to limit notifications to objects whose names end with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

events

+

Array of strings

+

Trigger event (OBS trigger parameter).

+
  • ObjectCreated: all object creation operations, including PUT, POST, COPY, and part assembling

    +
  • Put: Uploads an object using Put.

    +
  • Post: Uploads an object using POST

    +
  • Copy: Copies an object using COPY.

    +
  • CompleteMultipartUpload: Merges parts of a multipart upload.

    +
  • ObjectRemoved: Deletes an object.

    +
  • Delete: Deletes an object by specifying its version ID.

    +
  • DeleteMarkerCreated: Deletes an object without specifying its version ID.

    +
+

topic_urn

+

String

+

Topic URN (SMN trigger parameter)

+

Minimum: 1

+

Maximum: 255

+

topic_ids

+

Array of strings

+

The Kafka topic ID list (Kafka trigger parameter).

+

kafka_user

+

String

+

Kafka account name (Kafka trigger parameter).

+

kafka_password

+

String

+

Kafka password (Kafka trigger parameter).

+

kafka_connect_address

+

String

+

Kafka instance connection address (Kafka trigger parameter).

+

kafka_ssl_enable

+

Boolean

+

Whether to enable SASL authentication(Kafka trigger parameter).

+

access_password

+

String

+

RabbitMQ account password (RabbitMQ trigger parameter).

+

access_user

+

String

+

RabbitMQ username (RabbitMQ trigger parameter).

+

connect_address

+

String

+

Instance IP address (RabbitMQ trigger parameter).

+

exchange_name

+

String

+

Switch name (RabbitMQ trigger parameter).

+

vhost

+

String

+

Virtual host (RabbitMQ trigger parameter).

+

ssl_enable

+

Boolean

+

Whether to enable SSL (RabbitMQ trigger parameter).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 8 ApigTriggerFuncInfo

Parameter

+

Type

+

Description

+

function_urn

+

String

+

Function URN. For details, see the function model descriptions.

+

invocation_type

+

String

+

Execution mode of a function.

+
  • sync: synchronous execution

    +
  • async: asynchronous execution

    +
+

Enumeration values:

+
  • sync

    +
  • async

    +
+

timeout

+

Integer

+

Timeout allowed for APIG to request the FunctionGraph service. The unit is in millisecond. This parameter is mandatory for APIG triggers.

+

Minimum: 1

+

Maximum: 60000

+

version

+

String

+

Function version information.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 201

+

Created

+
{
+  "trigger_id" : "9a14fae1-78cf-4185-ac7a-429eb6dc41fb",
+  "trigger_type_code" : "TIMER",
+  "trigger_status" : "ACTIVE",
+  "event_data" : {
+    "name" : "Timer-cpg3",
+    "schedule" : "3m",
+    "schedule_type" : "Rate"
+  },
+  "last_updated_time" : "2022-11-09 16:37:24",
+  "created_time" : "2022-11-09 16:37:24"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

201

+

Created

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0123.html b/docs/fg/api-ref/functiongraph_06_0123.html new file mode 100644 index 00000000..a966610c --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0123.html @@ -0,0 +1,302 @@ + + +

Deleting a Trigger

+

Function

This API is used to delete a trigger.

+
+

URI

DELETE /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

trigger_type_code

+

Yes

+

String

+

Trigger type code.

+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_id

+

Yes

+

String

+

Trigger ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

Default: application/json

+
+
+
+

Response Parameters

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete a trigger.

+
DELETE https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0124.html b/docs/fg/api-ref/functiongraph_06_0124.html new file mode 100644 index 00000000..8e88d707 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0124.html @@ -0,0 +1,937 @@ + + +

Updating a Trigger

+

Function

This API is used to update a trigger.

+
+

URI

PUT /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

trigger_type_code

+

Yes

+

String

+

Trigger type code.

+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_id

+

Yes

+

String

+

Trigger ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

Default: application/json

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

trigger_status

+

No

+

String

+

Trigger status.

+

Enumeration values:

+
  • ACTIVE

    +
  • DISABLED

    +
+

event_data

+

No

+

Array of UpdateriggerEventData objects

+

Trigger update event.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 UpdateriggerEventData

Parameter

+

Mandatory

+

Type

+

Description

+

is_serial

+

No

+

Boolean

+

Serial data processing.

+

max_fetch_bytes

+

No

+

Integer

+

Max. bytes.

+

polling_interval

+

No

+

Integer

+

Pull period.

+

polling_unit

+

No

+

String

+

Pull period unit.

+

Enumeration values:

+
  • ms

    +
  • s

    +
+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

trigger_id

+

String

+

Trigger ID.

+

trigger_type_code

+

String

+

Trigger type.

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
+

Enumeration values:

+
  • TIMER

    +
  • APIG

    +
  • CTS

    +
  • DDS

    +
  • DMS

    +
  • DIS

    +
  • LTS

    +
  • OBS

    +
  • SMN

    +
  • KAFKA

    +
  • RABBITMQ

    +
  • DEDICATEDGATEWAY

    +
  • OPENSOURCEKAFKA

    +
  • APIC

    +
  • GAUSSMONGO

    +
  • EVENTGRID

    +
  • IOTDA

    +
+

trigger_status

+

String

+

Trigger status.

+
  • ACTIVE: The trigger is enabled.

    +
  • DISABLED: The trigger is disabled.

    +
+

Enumeration values:

+
  • ACTIVE

    +
  • DISABLED

    +
+

event_data

+

TriggerEventDataResponseBody object

+

Trigger source event.

+

last_updated_time

+

String

+

Latest update time.

+

created_time

+

String

+

Time when the trigger was created.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 TriggerEventDataResponseBody

Parameter

+

Type

+

Description

+

name

+

String

+

Trigger name.

+

schedule_type

+

String

+

Timer trigger type (timer trigger parameter).

+
  • Rate: specifies the frequency (minutes, hours, or days) at which the function is invoked. If the unit is minute, the value cannot exceed 60. If the unit is hour, the value cannot exceed 24. If the unit is day, the value cannot exceed 30.

    +
  • Cron: specifies a Cron expression to periodically invoke a function.

    +
+

Enumeration values:

+
  • Rate

    +
  • Cron

    +
+

schedule

+

String

+

Triggering rule. (timer trigger parameter).

+
  • When the trigger type is Rate, the scheduled rule is used. When the trigger type is Cron, the Cron expression is used.

    +
+

user_event

+

String

+

Additional information (timer trigger parameter). When the timer trigger triggers the function, the execution event (the event parameter of the function) is {"version": "v1.0", "time": "2018-06-01T08:30:00+08:00", "trigger_type": "TIMER", "trigger_name": "Timer_001", "user_event": "Additional information you entered"}.

+

triggerid

+

String

+

APIG trigger ID (APIG trigger parameter).

+

type

+

Integer

+

The API type (APIG trigger parameter).

+
  • 1: public

    +
  • 2: private

    +
+

path

+

String

+

Path of the API (APIG trigger parameter).

+

protocol

+

String

+

Request protocol of the API (APIG trigger parameter).

+

Enumeration values:

+
  • HTTP

    +
  • HTTPS

    +
+

req_method

+

String

+

Request mode of the API (APIG trigger parameter).

+

Enumeration values:

+
  • GET

    +
  • POST

    +
  • PUT

    +
  • DELETE

    +
  • HEAD

    +
  • PATCH

    +
  • OPTIONS

    +
  • ANY

    +
+

group_id

+

String

+

ID of the group to which the API belongs (APIG trigger parameter).

+

group_name

+

String

+

Name of the group to which the API belongs (APIG trigger parameter).

+

match_mode

+

String

+

Matching mode of the API (APIG trigger parameter).

+
  • SWA: prefix match

    +
  • NORMAL: normal match (absolute match)

    +
+

Enumeration values:

+
  • SWA

    +
  • NORMAL

    +
+

env_name

+

String

+

Environment in which the API is published (APIG trigger parameter).

+

env_id

+

String

+

ID of the environment in which the API has been published (APIG trigger parameter).

+

api_id

+

String

+

API ID (APIG trigger parameter).

+

api_name

+

String

+

API name (APIG trigger parameter).

+

auth

+

String

+

Security authentication (APIG trigger parameter).

+
  • IAM: IAM authentication. Only IAM users are allowed to access the system. The security level is medium.

    +
  • APP: Appkey&Appsecret authentication is used. The security level is high. This authentication mode is recommended.

    +
  • NONE: No authentication mode is used. All users can access the system. This mode is not recommended.

    +
+

Enumeration values:

+
  • IAM

    +
  • APP

    +
  • NONE

    +
+

invoke_url

+

String

+

API calling address (APIG trigger parameter).

+

func_info

+

ApigTriggerFuncInfo object

+

FunctionGraph backend details (APIG trigger parameter). This parameter is mandatory for APIG triggers.

+

sl_domain

+

String

+

Subdomain name allocated by the APIG system by default (APIG trigger parameter).

+

Minimum: 1

+

Maximum: 255

+

backend_type

+

String

+

Backend type of the API (APIG trigger parameter).

+

Enumeration values:

+
  • FUNCTION

    +
+

instance_id

+

String

+

Instance ID. This parameter is mandatory for DDS, Kafka, and RabbitMQ triggers.

+
  • APIG trigger: APIG gateway ID

    +
  • DDS trigger: DB instance ID.

    +
  • Kafka trigger: Kafka instance ID

    +
  • RabbitMQ trigger: RabbitMQ instance ID

    +
+

roma_app_id

+

String

+

ID of the integration application to which the API belongs (APIG trigger parameter).

+

operations

+

Array of strings

+

Custom operations (CTS trigger parameter). CTS collects operation records of subscribed cloud resources. If you create a function with a CTS trigger, collected operation records of specified cloud services will be passed as a parameter to invoke the function.

+

collection_name

+

String

+

Collection name (DDS trigger parameter).

+

db_name

+

String

+

Database name (DDS trigger parameter).

+

db_password

+

String

+

DDS database password (DDS trigger parameter).

+

db_user

+

String

+

DDS database username (DDS trigger parameter).

+

instance_addrs

+

Array of strings

+

DDS database instance address (DDS trigger parameter).

+

mode

+

String

+

DDS database instance type (DDS trigger parameter).

+
  • Sharding: cluster instance

    +
  • ReplicaSet: replica set instance

    +
  • Single: single node instance.

    +
+

batch_size

+

Integer

+

Batch size: Maximum number of data records that can be processed by the function at a time. This parameter is mandatory for DIS, DDS, Kafka, and RabbitMQ triggers.

+
  • DDS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • DIS trigger: Set the batch size to a value ranging from 1 to 10,000.

    +
  • Kafka trigger: Set the batch size to a value ranging from 1 to 1000.

    +
  • RabbitMQ trigger: Set the batch size to a value ranging from 1 to 1000.

    +
+

queue_id

+

String

+

Queue ID (DMS trigger parameter).

+

consumer_group_id

+

String

+

Consumer group ID (DMS trigger parameter).

+

polling_interval

+

Integer

+

Pull period.

+

stream_name

+

String

+

Stream name (DIS trigger parameter).

+

sharditerator_type

+

String

+

Start position (DIS trigger parameter).

+
  • TRIM_HORIZON: Data is read from the earliest valid record stored in the partition.

    +
  • LATEST: Data is read from the latest record in the partition. This option ensures that the most recent data in the partition is read.

    +
+

Enumeration values:

+
  • TRIM_HORIZON

    +
  • LATEST

    +
+

polling_unit

+

String

+

Unit of the pull period (DIS trigger parameter).

+
  • s: second

    +
  • ms: millisecond

    +
+

Enumeration values:

+
  • s

    +
  • ms

    +
+

max_fetch_bytes

+

Integer

+

Maximum number of bytes to be extracted (DIS trigger parameter).

+

Minimum: 0

+

Maximum: 4194304

+

is_serial

+

String

+

Serial Data Processing: If this option is selected, FunctionGraph pulls data from the stream only after previous data is processed. If this option is not selected, FunctionGraph pulls data from the stream as long as the pull period ends.

+

Enumeration values:

+
  • true

    +
  • false

    +
+

log_group_id

+

String

+

Log group ID (LTS trigger parameter).

+

log_topic_id

+

String

+

Log stream ID (LTS trigger parameter).

+

bucket

+

String

+

Bucket name (OBS trigger parameter). The name of the OBS bucket used as the event source cannot be the same as that of an existing bucket of the current user or another user. After being created, the bucket name cannot be modified.

+

Minimum: 1

+

Maximum: 64

+

prefix

+

String

+

Prefix (OBS trigger parameter). Enter a prefix to limit notifications to objects whose names start with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

suffix

+

String

+

Suffix (OBS trigger parameter). Enter a suffix to limit notifications to objects whose names end with the matching characters.

+

Minimum: 0

+

Maximum: 1024

+

events

+

Array of strings

+

Trigger event (OBS trigger parameter).

+
  • ObjectCreated: all object creation operations, including PUT, POST, COPY, and part assembling

    +
  • Put: Uploads an object using Put.

    +
  • Post: Uploads an object using POST

    +
  • Copy: Copies an object using COPY.

    +
  • CompleteMultipartUpload: Merges parts of a multipart upload.

    +
  • ObjectRemoved: Deletes an object.

    +
  • Delete: Deletes an object by specifying its version ID.

    +
  • DeleteMarkerCreated: Deletes an object without specifying its version ID.

    +
+

topic_urn

+

String

+

Topic URN (SMN trigger parameter)

+

Minimum: 1

+

Maximum: 255

+

topic_ids

+

Array of strings

+

The Kafka topic ID list (Kafka trigger parameter).

+

kafka_user

+

String

+

Kafka account name (Kafka trigger parameter).

+

kafka_password

+

String

+

Kafka password (Kafka trigger parameter).

+

kafka_connect_address

+

String

+

Kafka instance connection address (Kafka trigger parameter).

+

kafka_ssl_enable

+

Boolean

+

Whether to enable SASL authentication(Kafka trigger parameter).

+

access_password

+

String

+

RabbitMQ account password (RabbitMQ trigger parameter).

+

access_user

+

String

+

RabbitMQ username (RabbitMQ trigger parameter).

+

connect_address

+

String

+

Instance IP address (RabbitMQ trigger parameter).

+

exchange_name

+

String

+

Switch name (RabbitMQ trigger parameter).

+

vhost

+

String

+

Virtual host (RabbitMQ trigger parameter).

+

ssl_enable

+

Boolean

+

Whether to enable SSL (RabbitMQ trigger parameter).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 7 ApigTriggerFuncInfo

Parameter

+

Type

+

Description

+

function_urn

+

String

+

Function URN. For details, see the function model descriptions.

+

invocation_type

+

String

+

Execution mode of a function.

+
  • sync: synchronous execution

    +
  • async: asynchronous execution

    +
+

Enumeration values:

+
  • sync

    +
  • async

    +
+

timeout

+

Integer

+

Timeout allowed for APIG to request the FunctionGraph service. The unit is in millisecond. This parameter is mandatory for APIG triggers.

+

Minimum: 1

+

Maximum: 60000

+

version

+

String

+

Function version information.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Enable a trigger.

+
PUT https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}
+
+{
+  "trigger_status" : "ACTIVE"
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "trigger_id" : "9a14fae1-78cf-4185-ac7a-429eb6dc41fb",
+  "trigger_type_code" : "TIMER",
+  "trigger_status" : "ACTIVE",
+  "event_data" : {
+    "name" : "Timer-cpg3",
+    "schedule" : "3m",
+    "schedule_type" : "Rate"
+  },
+  "last_updated_time" : "2022-11-09 16:37:24",
+  "created_time" : "2019-10-29171553"
+}
+

Status code: 404

+

Not Found

+
{
+  "error_code" : "FSS.0404",
+  "error_msg" : "not found"
+}
+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

404

+

Not Found

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0125.html b/docs/fg/api-ref/functiongraph_06_0125.html new file mode 100644 index 00000000..cf69232f --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0125.html @@ -0,0 +1,453 @@ + + +

Executing a Function Synchronously

+

Function

This API is used to execute a function synchronously. Clients must wait for explicit responses to their requests from the function. Responses are returned only after function invocation is complete.

+
+

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/invocations

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+

X-Cff-Log-Type

+

No

+

String

+

Options: tail (4 KB logs will be returned) and null (no logs will be returned).

+

X-CFF-Request-Version

+

No

+

String

+

Response body format. Options: v0 and v1.

+
  • v0: text format.
  • v1: JSON format. Select this format when using an SDK.
+
+
+ +
+ + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

-

+

Yes

+

Object

+

Request body for executing a function.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 Response header parameters

Parameter

+

Type

+

Description

+

X-Cff-Invoke-Summary

+

String

+

Execution summary of the synchronous invocation.

+

X-Cff-Request-Id

+

String

+

Request ID of the synchronous invocation.

+

X-Cff-Function-Log

+

String

+

User log of the synchronous invocation. Set X-Cff-Log-Type:tail in the request header. Intercept and encode the last 2,000 bytes of the log using Base64.

+

X-CFF-Billing-Duration

+

String

+

Billing information of the synchronous invocation.

+

X-Cff-Response-Version

+

String

+

Response format:

+

v0: text format

+

v1: JSON format

+

X-Func-Err-Code

+

String

+

Error code of the synchronous invocation. The value is 0 if the execution is successful.

+

X-Is-Func-Err

+

String

+

Indicates whether the error occurs in a user function.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

request_id

+

String

+

Request ID.

+

result

+

String

+

Function execution result.

+

log

+

String

+

Function execution log.

+

status

+

Integer

+

Function execution status.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 503

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Execute a function synchronously with the request parameter as a key pair ("k":"v").

+
POST /v2/{project_id}/fgs/functions/{function_urn}/invocations
+
+{
+  "k" : "v"
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "result" : "{\"statusCode\": 200, \"isBase64Encoded\": false, \"body\": \"{\\\"key\\\": \\\"value\\\"}\", \"headers\": {\"Content-Type\": \"application/json\"}}",
+  "log" : "2022-09-20T11:43:57Z Start invoke request '1cbe80f3-3c65-475e-ad88-76ac518d386a', version: v1\nHello, World!\n\n2022-09-20T11:43:58Z Finish invoke request '1cbe80f3-3c65-475e-ad88-76ac518d386a', duration: 65.828ms, billing duration: 66ms, memory used: 21.473MB, billing memory: 128MB",
+  "status" : 200,
+  "request_id" : "1cbe80f3-3c65-475e-ad88-76ac518d386x"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+

503

+

Service unavailable.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0126.html b/docs/fg/api-ref/functiongraph_06_0126.html new file mode 100644 index 00000000..665e95c9 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0126.html @@ -0,0 +1,349 @@ + + +

Executing a Function Asynchronously

+

Function

This API is used to execute a function asynchronously.

+
+

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/invocations-async

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

{User defined key}

+

Yes

+

Object

+

Request body for executing a function asynchronously.

+
+
+
+

Response Parameters

Status code: 202

+ +
+ + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

request_id

+

String

+

Request ID.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 503

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Execute a function asynchronously with the request parameter as a key pair ("k":"v").

+
POST /v2/{project_id}/fgs/functions/{function_urn}/invocations-async
+
+{
+  "body" : {
+    "k" : "v"
+  }
+}
+
+

Example Responses

Status code: 202

+

Accepted

+
{
+  "request_id" : "1167bf8c-87b0-43ab-8f5f-26b16c64f252"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

202

+

Accepted

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+

503

+

Service unavailable.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0127.html b/docs/fg/api-ref/functiongraph_06_0127.html new file mode 100644 index 00000000..778d41d0 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0127.html @@ -0,0 +1,477 @@ + + +

Querying Dependencies

+

Function

This API is used to query all dependencies.

+
+

URI

GET /v2/{project_id}/fgs/dependencies

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

marker

+

No

+

String

+

Final record queried last time. Default value: 0.

+

maxitems

+

No

+

String

+

Maximum number of items to return in a request.

+

ispublic

+

No

+

String

+

Whether a dependency is public.

+

dependency_type

+

No

+

String

+

Dependency type. Options: public, private, and all. Default value: all.

+

runtime

+

No

+

String

+

Environment in which a FunctionGraph function is executed. Options:

+
  • Python 2.7

    +
  • Python 3.6

    +
  • Python 3.9

    +
  • Go 1.8

    +
  • Go 1.x

    +
  • Java 8

    +
  • Java 11

    +
  • Node.js 6.10

    +
  • Node.js 8.10

    +
  • Node.js 10.16

    +
  • Node.js 12.13

    +
  • Node.js 14.18

    +
  • C# (.NET Core 2.0)

    +
  • C# (.NET Core 2.1)

    +
  • C# (.NET Core 3.1)

    +
  • Custom

    +
  • PHP 7.3

    +
  • HTTP

    +
+

name

+

No

+

String

+

Dependence name.

+

limit

+

No

+

String

+

Maximum number of dependencies that can be obtained in a query. Default value: 400.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

dependencies

+

Array of ListDependenciesResult objects

+

Dependency list.

+

next_marker

+

Long

+

Next read location.

+

count

+

Long

+

Total number of dependencies.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListDependenciesResult

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency ID.

+

owner

+

String

+

Dependency owner. public indicates a public dependency.

+

link

+

String

+

URL of the dependency in the OBS console.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8

    +
  • Java11

    +
  • Node.js6.10

    +
  • Node.js8.10

    +
  • Node.js10.16

    +
  • Node.js12.13

    +
  • Node.js14.18

    +
  • Python2.7

    +
  • Python3.6

    +
  • Go1.8

    +
  • Go1.x

    +
  • C#(.NET Core 2.0)

    +
  • C#(.NET Core 2.1)

    +
  • C#(.NET Core 3.1)

    +
  • Custom

    +
  • PHP7.3

    +
  • Python3.9

    +
  • http

    +
  • Custom Image

    +
+

etag

+

String

+

Dependency ID.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependency name.

+

file_name

+

String

+

Dependency file name.

+

description

+

String

+

Dependency description.

+

version

+

Long

+

Dependence version.

+

last_modified

+

Long

+

Time when the dependency was last updated.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Dependencies of the current tenant.

+
GET https://{Endpoint}/v2/{project_id}/fgs/ListDependencies?marker=0&maxitems=400
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "dependencies" : [ {
+    "id" : "6578de50-9a18-48fa-b84e-b2d36636e433",
+    "owner" : "public",
+    "link" : "https://{obs_endpoint}/functionstage-examples/fg_test_pandas_1.1.3.zip",
+    "runtime" : "Python3.6",
+    "etag" : "35a893d9495b3e22259b2773996bc94d-6",
+    "size" : 31009808,
+    "name" : "panda1.1.3"
+  } ],
+  "next_marker" : 43,
+  "count" : 43
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0129.html b/docs/fg/api-ref/functiongraph_06_0129.html new file mode 100644 index 00000000..440c2549 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0129.html @@ -0,0 +1,273 @@ + + +

Deleting a Test Event

+

Function

This API is used to delete a test event.

+
+

URI

DELETE /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

event_id

+

Yes

+

String

+

Test event ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete a test event.

+
DELETE https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0132.html b/docs/fg/api-ref/functiongraph_06_0132.html new file mode 100644 index 00000000..a57cb602 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0132.html @@ -0,0 +1,341 @@ + + +

Querying Test Events of a Function

+

Function

This API is used to query the test events of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/events

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

count

+

Integer

+

Total number of test events.

+

events

+

Array of ListEventsResult objects

+

Test event list.

+

next_marker

+

Long

+

Next read location.

+
+
+ +
+ + + + + + + + + + + + + + + + + +
Table 4 ListEventsResult

Parameter

+

Type

+

Description

+

id

+

String

+

Test event ID.

+

last_modified

+

Number

+

Last update time.

+

name

+

String

+

Test event name.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the test event list.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "events" : [ {
+    "id" : "3b659dc0-12fc-40dc-aa05-a321d9424cb3",
+    "name" : "event-k9r3",
+    "last_modified" : 1597374286
+  } ],
+  "next_marker" : 1,
+  "count" : 1
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0133.html b/docs/fg/api-ref/functiongraph_06_0133.html new file mode 100644 index 00000000..c001e635 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0133.html @@ -0,0 +1,335 @@ + + +

Creating a Test Event

+

Function

This API is used to create a test event.

+
+

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/events

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

name

+

Yes

+

String

+

Test event name. Max. 25 of letters, digits, hyphens (-), and underscores (_). Start with a letter, and end with a letter or digit.

+

Minimum length: 1 character.

+

Maximum length: 25 characters.

+

content

+

Yes

+

String

+

Test event content, which is a Base64-encoded JSON character string.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

id

+

String

+

Test event ID.

+

name

+

String

+

Test event name.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Create a test event named event-xx with content {"k":"v"}.

+
POST https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events
+
+{
+  "name" : "event-xx",
+  "content" : "eyJrIjoidiJ9"
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "id" : "3b659dc0-12fc-40dc-aa05-a321d9424cb3",
+  "name" : "event-k9r3"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0135.html b/docs/fg/api-ref/functiongraph_06_0135.html new file mode 100644 index 00000000..c39e513e --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0135.html @@ -0,0 +1,321 @@ + + +

Obtaining the Details of a Test Event

+

Function

This API is used to query the details of a test event.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

event_id

+

Yes

+

String

+

Test event ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

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.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query a test event.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "id" : "3b659dc0-12fc-40dc-aa05-a321d9424cb3",
+  "name" : "event-k9r3",
+  "last_modified" : 1597374286,
+  "content" : "ewogICAgImJvZHkiOiAiIiwKICAgICJyZXF1ZXN0Q29udGV4d*****"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0136.html b/docs/fg/api-ref/functiongraph_06_0136.html new file mode 100644 index 00000000..6cda7c34 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0136.html @@ -0,0 +1,332 @@ + + +

Updating a Test Event

+

Function

This API is used to update a test event.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

event_id

+

Yes

+

String

+

Test event ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

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.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

id

+

String

+

Test event ID.

+

name

+

String

+

Test event name.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Update the content of a specified test event to {"k":"v"}.

+
PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}
+
+{
+  "content" : "eyJrIjoidiJ9"
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "id" : "3b659dc0-12fc-40dc-aa05-a321d9424cb3",
+  "name" : "event-k9r3"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0137.html b/docs/fg/api-ref/functiongraph_06_0137.html new file mode 100644 index 00000000..4b98a895 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0137.html @@ -0,0 +1,341 @@ + + +

Querying Tenant Quotas

+

Function

This API is used to query tenant quotas.

+
+

URI

GET /v2/{project_id}/fgs/quotas

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

quotas

+

ListQuotasResult object

+

Quota information.

+
+
+ +
+ + + + + + + + + +
Table 4 ListQuotasResult

Parameter

+

Type

+

Description

+

resources

+

Array of Resources objects

+

Quota list.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 5 Resources

Parameter

+

Type

+

Description

+

quota

+

Integer

+

Function quota.

+

used

+

Integer

+

Used quota.

+

type

+

String

+

Resource type.

+

Enumeration values:

+
  • fgs_func_scale_down_timeout

    +
  • fgs_func_occurs

    +
  • fgs_func_pat_idle_time

    +
  • fgs_func_num

    +
  • fgs_func_code_size

    +
  • fgs_workflow_num

    +
+

unit

+

String

+

Resource unit. For fgs_func_code_size, the unit is MB. In other scenarios, there is no unit.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query quotas.

+
GET /v2/{project_id}/fgs/quotas
+
+

Example Responses

Status code: 200

+

Query successful.

+
{
+  "quotas" : {
+    "resources" : [ {
+      "quota" : 60,
+      "used" : 3,
+      "type" : "fgs_func_scale_down_timeout"
+    }, {
+      "quota" : 100,
+      "used" : 22,
+      "type" : "fgs_func_occurs"
+    }, {
+      "quota" : 100,
+      "used" : 22,
+      "type" : "fgs_func_pat_idle_time"
+    }, {
+      "quota" : 100,
+      "used" : 22,
+      "type" : "fgs_func_num"
+    }, {
+      "quota" : 10240,
+      "used" : 22,
+      "type" : "fgs_func_code_size",
+      "unit" : "MB"
+    }, {
+      "quota" : 512,
+      "used" : 22,
+      "type" : "fgs_workflow_num"
+    } ]
+  }
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

Query successful.

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0138.html b/docs/fg/api-ref/functiongraph_06_0138.html new file mode 100644 index 00000000..bfe791b1 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0138.html @@ -0,0 +1,285 @@ + + +

Querying Metrics in a Specified Period

+

Function

This API is used to query metrics of a function in a specified period.

+
+

URI

GET /v2/{project_id}/fgs/functions/{func_urn}/statistics/{period}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

func_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+

period

+

Yes

+

String

+

Time range specified to query function execution metrics.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

count

+

Array of SlaReportsValue objects

+

Function invocations.

+

duration

+

Array of SlaReportsValue objects

+

Average latency, in milliseconds.

+

fail_count

+

Array of SlaReportsValue objects

+

Number of errors.

+

max_duration

+

Array of SlaReportsValue objects

+

Maximum latency, in milliseconds.

+

min_duration

+

Array of SlaReportsValue objects

+

Minimum latency, in milliseconds.

+

reject_count

+

Array of SlaReportsValue objects

+

Number of throttles.

+

function_error_count

+

Array of SlaReportsValue objects

+

Number of function errors.

+

system_error_count

+

Array of SlaReportsValue objects

+

Number of system errors.

+

reserved_instance_num

+

Array of SlaReportsValue objects

+

Reserved instance metrics.

+

concurrency_num

+

Array of SlaReportsValue objects

+

Elastic instance metrics.

+
+
+ +
+ + + + + + + + + + + + + +
Table 4 SlaReportsValue

Parameter

+

Type

+

Description

+

timestamp

+

Integer

+

Timestamp.

+

value

+

Double

+

Value. If the value is -1, the metric has no data in the current period. The possible cause is that the function is not executed.

+
+
+
+

Example Requests

Query metrics of a function in a specified period.

+
GET /v2/{project_id}/fgs/functions/{func_urn}/statistics/{period}
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "count" : [ {
+    "timestamp" : 1596679200000,
+    "value" : -1
+  }, {
+    "timestamp" : 1596682800000,
+    "value" : 2
+  }, {
+    "timestamp" : 1596686400000,
+    "value" : -1
+  } ],
+  "duration" : [ {
+    "timestamp" : 1596679200000,
+    "value" : -1
+  }, {
+    "timestamp" : 1596682800000,
+    "value" : 950
+  }, {
+    "timestamp" : 1596686400000,
+    "value" : -1
+  } ],
+  "fail_count" : [ {
+    "timestamp" : 1596679200000,
+    "value" : -1
+  }, {
+    "timestamp" : 1596682800000,
+    "value" : 0
+  }, {
+    "timestamp" : 1596686400000,
+    "value" : -1
+  } ],
+  "max_duration" : [ {
+    "timestamp" : 1596679200000,
+    "value" : -1
+  }, {
+    "timestamp" : 1596682800000,
+    "value" : 740
+  }, {
+    "timestamp" : 1596686400000,
+    "value" : -1
+  } ],
+  "min_duration" : [ {
+    "timestamp" : 1596679200000,
+    "value" : -1
+  }, {
+    "timestamp" : 1596682800000,
+    "value" : 210
+  }, {
+    "timestamp" : 1596686400000,
+    "value" : -1
+  } ],
+  "reject_count" : [ {
+    "timestamp" : 1596679200000,
+    "value" : -1
+  }, {
+    "timestamp" : 1596682800000,
+    "value" : 0
+  }, {
+    "timestamp" : 1596686400000,
+    "value" : -1
+  } ]
+}
+
+

Status Codes

+
+ + + + + + + +

Status Code

+

Description

+

200

+

ok

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0139.html b/docs/fg/api-ref/functiongraph_06_0139.html new file mode 100644 index 00000000..c23a5c37 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0139.html @@ -0,0 +1,439 @@ + + +

Querying Tenant-Level Function Statistics

+

Function

This API is used to query tenant-level function statistics.

+

The statistics include function format, quota and usage, and traffic report.

+

You can query data in a specific period using the filter and period parameters.

+
+

URI

GET /v2/{project_id}/fgs/functions/statistics

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

filter

+

Yes

+

String

+

Parameter filter.

+
  • monitor_data: Query detailed statistics.
  • monthly_report: Query monthly statistics.
+

Enumeration values:

+
  • monitor_data
  • monthly_report
+

period

+

No

+

String

+

The unit is minute. This parameter must be used together with the filter parameter metric.

+

option

+

No

+

String

+

Monthly statistical period. This parameter is valid only when filter is set to monthly_report.

+

If a value beyond the preceding range is specified, the default value 0 will be used.

+
  • 0: current month
  • 1: last month
  • 2: last three months
  • 3: last six months
+

limit

+

No

+

String

+

Maximum number of data records returned in a request. Max.: 500. Default: 100.

+

Default: 100

+

Minimum: 1

+

Maximum: 64

+

marker

+

No

+

String

+

Start position of the current query. The default value is 0.

+

Default: 0

+

Minimum: 1

+

Maximum: 64

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

count

+

Array of MonthUsed objects

+

Number of monthly invocations.

+

gbs

+

Array of MonthUsed objects

+

Monthly resource usage.

+

gpu_gbs

+

Array of MonthUsed objects

+

Monthly GPU usage.

+

statistics

+

ListFunctionStatisticsResponseBody object

+

Function Metrics

+
+
+ +
+ + + + + + + + + + + + + +
Table 5 MonthUsed

Parameter

+

Type

+

Description

+

date

+

String

+

Date.

+

value

+

Number

+

Usage.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 ListFunctionStatisticsResponseBody

Parameter

+

Type

+

Description

+

count

+

Array of SlaReportsValue objects

+

Function invocations.

+

duration

+

Array of SlaReportsValue objects

+

Average latency, in milliseconds.

+

fail_count

+

Array of SlaReportsValue objects

+

Number of errors.

+

max_duration

+

Array of SlaReportsValue objects

+

Maximum latency, in milliseconds.

+

min_duration

+

Array of SlaReportsValue objects

+

Minimum latency, in milliseconds.

+

reject_count

+

Array of SlaReportsValue objects

+

Number of throttles.

+

function_error_count

+

Array of SlaReportsValue objects

+

Number of function errors.

+

system_error_count

+

Array of SlaReportsValue objects

+

Number of system errors.

+

reserved_instance_num

+

Array of SlaReportsValue objects

+

Reserved instance metrics.

+

concurrency_num

+

Array of SlaReportsValue objects

+

Elastic instance metrics.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 SlaReportsValue

Parameter

+

Type

+

Description

+

timestamp

+

Integer

+

Timestamp.

+

value

+

Double

+

Value. If the value is -1, the metric has no data in the current period. The possible cause is that the function is not executed.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query tenant-level function statistics.

+
GET /v2/{project_id}/fgs/functions/statistics
+
+

Example Responses

Status code: 200

+

Query successful.

+
{
+  "statistics" : {
+    "count" : [ {
+      "timestamp" : 1596679200000,
+      "value" : -1
+    }, {
+      "timestamp" : 1596682800000,
+      "value" : 2
+    }, {
+      "timestamp" : 1596686400000,
+      "value" : -1
+    } ],
+    "duration" : [ {
+      "timestamp" : 1596679200000,
+      "value" : -1
+    }, {
+      "timestamp" : 1596682800000,
+      "value" : 950
+    }, {
+      "timestamp" : 1596686400000,
+      "value" : -1
+    } ],
+    "fail_count" : [ {
+      "timestamp" : 1596679200000,
+      "value" : -1
+    }, {
+      "timestamp" : 1596682800000,
+      "value" : 0
+    }, {
+      "timestamp" : 1596686400000,
+      "value" : -1
+    } ],
+    "max_duration" : [ {
+      "timestamp" : 1596679200000,
+      "value" : -1
+    }, {
+      "timestamp" : 1596682800000,
+      "value" : 740
+    }, {
+      "timestamp" : 1596686400000,
+      "value" : -1
+    } ],
+    "min_duration" : [ {
+      "timestamp" : 1596679200000,
+      "value" : -1
+    }, {
+      "timestamp" : 1596682800000,
+      "value" : 210
+    }, {
+      "timestamp" : 1596686400000,
+      "value" : -1
+    } ],
+    "reject_count" : [ {
+      "timestamp" : 1596679200000,
+      "value" : -1
+    }, {
+      "timestamp" : 1596682800000,
+      "value" : 0
+    }, {
+      "timestamp" : 1596686400000,
+      "value" : -1
+    } ]
+  }
+}
+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

200

+

Query successful.

+

400

+

Bad Request

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0140.html b/docs/fg/api-ref/functiongraph_06_0140.html new file mode 100644 index 00000000..c8defebd --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0140.html @@ -0,0 +1,274 @@ + + +

Querying Asynchronous Execution Notification Settings of a Function Version

+

Function

This API is used to query the asynchronous invocation setting of a function version.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

Minimum: 1

+

Maximum: 269

+

max_async_event_age_in_seconds

+

Integer

+

Maximum validity period of a message. Value range: 1–86,400. Unit: second.

+

max_async_retry_attempts

+

Integer

+

Maximum number of retry attempts to be made if asynchronous invocation fails. Default value: 3. Value range: 0–8.

+

destination_config

+

FuncAsyncDestinationConfig object

+

Asynchronous invocation target.

+

created_time

+

String

+

Time when asynchronous execution notification was configured.

+

last_modified

+

String

+

Time when the asynchronous execution notification settings were last modified.

+

enable_async_status_log

+

Boolean

+

Whether to enable asynchronous invocation status persistence.

+
+
+ +
+ + + + + + + + + + + + + +
Table 4 FuncAsyncDestinationConfig

Parameter

+

Type

+

Description

+

on_success

+

FuncDestinationConfig object

+

Target to be invoked when a function is successfully executed.

+

on_failure

+

FuncDestinationConfig object

+

Target to be invoked when a function fails to be executed due to a system error or an internal error.

+
+
+ +
+ + + + + + + + + + + + + +
Table 5 FuncDestinationConfig

Parameter

+

Type

+

Description

+

destination

+

String

+

Object type.

+
  • OBS
  • SMN
  • FunctionGraph
+

Enumeration values:

+
  • OBS
  • SMN
  • FunctionGraph
+

param

+

String

+

Parameters (in JSON format) corresponding to the target service.

+
  • OBS: Parameters related to the bucket name, object directory prefix, and object expiration time are included. The object expiration time ranges from 0 to 365 days. If the value is 0, the object will not expire.
  • SMN: The topic_urn parameter is included.
  • FunctionGraph: The func_urn parameter is included.
+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the asynchronous execution notification settings of a function version.

+
GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config
+
+

Example Responses

Status code: 200

+

Ok

+
{
+  "func_urn" : "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194xxxxxxxxxx:function:default:test:latest",
+  "max_async_event_age_in_seconds" : 60,
+  "max_async_retry_attempts" : 1,
+  "destination_config" : {
+    "on_success" : {
+      "destination" : "FunctionGraph",
+      "param" : "{\"func_urn\":\"urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:testPython:latest\"}"
+    },
+    "on_failure" : {
+      "destination" : "FunctionGraph",
+      "param" : "{\"func_urn\":\"urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:testPython:latest\"}"
+    }
+  },
+  "created_time" : "2021-03-04T14:50:02+08:00",
+  "last_modified" : "2021-03-04 14:50:02"
+}
+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

200

+

Ok

+

404

+

Not Found

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0141.html b/docs/fg/api-ref/functiongraph_06_0141.html new file mode 100644 index 00000000..89b729cd --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0141.html @@ -0,0 +1,136 @@ + + +

Deleting Asynchronous Execution Notification Settings

+

Function

This API is used to delete the asynchronous execution notification settings of a function.

+
+

URI

DELETE /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete the asynchronous execution notification settings of a function.

+
DELETE /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

404

+

Not Found

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0142.html b/docs/fg/api-ref/functiongraph_06_0142.html new file mode 100644 index 00000000..269bcdd4 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0142.html @@ -0,0 +1,434 @@ + + +

Configuring Asynchronous Execution Notification

+

Function

This API is used to configure asynchronous execution notification for a function.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

max_async_event_age_in_seconds

+

No

+

Integer

+

Maximum validity period of a message. Value range: 1s to 86,400s. Default value: 3600s.

+

Minimum: 1

+

Maximum: 86400

+

max_async_retry_attempts

+

No

+

Integer

+

Maximum number of retry attempts to be made if asynchronous invocation fails. Default value: 1. Value range: 0–3.

+

Minimum: 0

+

Maximum: 3

+

destination_config

+

No

+

FuncAsyncDestinationConfig object

+

Asynchronous invocation target.

+

enable_async_status_log

+

No

+

Boolean

+

Whether to enable asynchronous invocation status persistence.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 FuncAsyncDestinationConfig

Parameter

+

Mandatory

+

Type

+

Description

+

on_success

+

No

+

FuncDestinationConfig object

+

Target to be invoked when a function is successfully executed.

+

on_failure

+

No

+

FuncDestinationConfig object

+

Target to be invoked when a function fails to be executed due to a system error or an internal error.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 5 FuncDestinationConfig

Parameter

+

Mandatory

+

Type

+

Description

+

destination

+

No

+

String

+

Object type.

+
  • OBS
  • SMN
  • FunctionGraph
+

Enumeration values:

+
  • OBS
  • SMN
  • FunctionGraph
+

param

+

No

+

String

+

Parameters (in JSON format) corresponding to the target service.

+
  • OBS: Parameters related to the bucket name, object directory prefix, and object expiration time are included. The object expiration time ranges from 0 to 365 days. If the value is 0, the object will not expire.
  • SMN: The topic_urn parameter is included.
  • FunctionGraph: The func_urn parameter is included.
+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

Minimum: 1

+

Maximum: 269

+

max_async_event_age_in_seconds

+

Integer

+

Maximum validity period of a message. Value range: 60–86,400. Unit: second.

+

max_async_retry_attempts

+

Integer

+

Maximum number of retry attempts to be made if asynchronous invocation fails. Default value: 3. Value range: 0–8.

+

destination_config

+

FuncAsyncDestinationConfig object

+

Asynchronous invocation target.

+

created_time

+

String

+

Time when asynchronous execution notification was configured.

+

last_modified

+

String

+

Time when the asynchronous execution notification settings were last modified.

+

enable_async_status_log

+

Boolean

+

Whether to enable asynchronous invocation status persistence.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 FuncAsyncDestinationConfig

Parameter

+

Type

+

Description

+

on_success

+

FuncDestinationConfig object

+

Target to be invoked when a function is successfully executed.

+

on_failure

+

FuncDestinationConfig object

+

Target to be invoked when a function fails to be executed due to a system error or an internal error.

+
+
+ +
+ + + + + + + + + + + + + +
Table 8 FuncDestinationConfig

Parameter

+

Type

+

Description

+

destination

+

String

+

Object type.

+
  • OBS
  • SMN
  • FunctionGraph
+

Enumeration values:

+
  • OBS
  • SMN
  • FunctionGraph
+

param

+

String

+

Parameters (in JSON format) corresponding to the target service.

+
  • OBS: Parameters related to the bucket name, object directory prefix, and object expiration time are included. The object expiration time ranges from 0 to 365 days. If the value is 0, the object will not expire.
  • SMN: The topic_urn parameter is included.
  • FunctionGraph: The func_urn parameter is included.
+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Configure asynchronous execution notification for a function with max. validity period of 10s and max. retries of 3, and enable asynchronous invocation status persistence.

+
PUT /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-config
+
+{
+  "max_async_event_age_in_seconds" : 10,
+  "max_async_retry_attempts" : 3,
+  "enable_async_status_log" : true
+}
+
+

Example Responses

Status code: 200

+

Ok

+
{
+  "func_urn" : "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194xxxxxxxxxx:function:default:test:latest",
+  "max_async_event_age_in_seconds" : 60,
+  "max_async_retry_attempts" : 1,
+  "destination_config" : {
+    "on_success" : {
+      "destination" : "FunctionGraph",
+      "param" : "{\"func_urn\":\"urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:testPython:latest\"}"
+    },
+    "on_failure" : {
+      "destination" : "FunctionGraph",
+      "param" : "{\"func_urn\":\"urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:testPython:latest\"}"
+    }
+  },
+  "created_time" : "2021-03-04T14:50:02+08:00",
+  "last_modified" : "2021-03-04 14:50:02"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

Ok

+

400

+

Bad Request

+

404

+

Not Found

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0143.html b/docs/fg/api-ref/functiongraph_06_0143.html new file mode 100644 index 00000000..0681477d --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0143.html @@ -0,0 +1,351 @@ + + +

Querying Asynchronous Execution Notification Settings of a Function's All Versions

+

Function

This API is used to query the asynchronous execution notification settings of a function's all versions.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configs

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

marker

+

No

+

String

+

Final record queried last time.

+

Maximum: 64

+

limit

+

No

+

String

+

Number of items displayed on each page.

+
  • If this parameter is not specified or is set to 0, the default value 10 is used. The maximum value is 100. If you set this parameter to a value greater than 100, the value automatically changes to 100.
  • If it is less than 0, an error is reported.
+

Default: 10

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

async_invoke_configs

+

Array of ListFunctionAsyncInvokeConfigResult objects

+

Asynchronous execution notification settings.

+

count

+

Long

+

Total number of items.

+

Minimum: 0

+

page_info

+

PageInfo object

+
  
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListFunctionAsyncInvokeConfigResult

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

Minimum: 1

+

Maximum: 269

+

max_async_event_age_in_seconds

+

Integer

+

Maximum validity period of a message. Value range: 60–86,400. Unit: second.

+

max_async_retry_attempts

+

Integer

+

Maximum number of retry attempts to be made if asynchronous invocation fails. Default value: 3. Value range: 0–8.

+

destination_config

+

FuncAsyncDestinationConfig object

+

Asynchronous invocation target.

+

created_time

+

String

+

Time when asynchronous execution notification was configured.

+

last_modified

+

String

+

Time when the asynchronous execution notification settings were last modified.

+

enable_async_status_log

+

Boolean

+

Whether to enable asynchronous invocation status persistence.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 FuncAsyncDestinationConfig

Parameter

+

Type

+

Description

+

on_success

+

FuncDestinationConfig object

+

Target to be invoked when a function is successfully executed.

+

on_failure

+

FuncDestinationConfig object

+

Target to be invoked when a function fails to be executed due to a system error or an internal error.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 FuncDestinationConfig

Parameter

+

Type

+

Description

+

destination

+

String

+

Object type.

+
  • OBS
  • SMN
  • FunctionGraph
+

Enumeration values:

+
  • OBS
  • SMN
  • FunctionGraph
+

param

+

String

+

Parameters (in JSON format) corresponding to the target service.

+
  • OBS: Parameters related to the bucket name, object directory prefix, and object expiration time are included. The object expiration time ranges from 0 to 365 days. If the value is 0, the object will not expire.
  • SMN: The topic_urn parameter is included.
  • FunctionGraph: The func_urn parameter is included.
+
+
+ +
+ + + + + + + + + + + + + + + + + +
Table 8 PageInfo

Parameter

+

Type

+

Description

+

next_marker

+

Long

+

Next read location.

+

previous_marker

+

Long

+

Previous read location.

+

current_count

+

Long

+

Number of items on the current page.

+
+
+
+

Example Requests

Query the asynchronous execution notification settings of a function's all versions.

+
GET /v2/{project_id}/fgs/functions/{function_urn}/async-invoke-configs
+
+

Example Responses

Status code: 200

+

Ok

+
{
+  "async_invoke_configs" : [ {
+    "func_urn" : "urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:test_async:latest",
+    "max_async_event_age_in_seconds" : 60,
+    "max_async_retry_attempts" : 1,
+    "destination_config" : {
+      "on_success" : {
+        "destination" : "FunctionGraph",
+        "param" : "{\"func_urn\":\"urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:testPython:latest\"}"
+      },
+      "on_failure" : {
+        "destination" : "FunctionGraph",
+        "param" : "{\"func_urn\":\"urn:fss:{region}:5691ba790e2b46ceb38316xxxxxxxxxx:function:default:testPython:latest\"}"
+      }
+    },
+    "created_time" : "2021-03-04T14:50:02+08:00",
+    "last_modified" : "2021-03-04 14:50:02"
+  } ],
+  "count" : 2,
+  "page_info" : {
+    "next_marker" : 2,
+    "previous_marker" : 0,
+    "current_count" : 2
+  }
+}
+
+

Status Codes

+
+ + + + + + + +

Status Code

+

Description

+

200

+

Ok

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0144.html b/docs/fg/api-ref/functiongraph_06_0144.html new file mode 100644 index 00000000..1c554c03 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0144.html @@ -0,0 +1,1038 @@ + + +

Publishing a Function Version

+

Function

This API is used to publish a function version.

+
+

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/versions

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

digest

+

No

+

String

+

MD5 key.

+

version

+

No

+

String

+

Function version.

+

description

+

No

+

String

+

Version description.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function execution agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

description

+

String

+

Function description.

+

version_description

+

String

+

Version description.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

mount_config

+

MountConfig object

+

Mounting configuration.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

enable_dynamic_memory

+

Boolean

+

Whether to enable dynamic memory allocation.

+

function_async_config

+

FunctionAsyncConfig object

+

Return struct of the asynchronous execution notification settings.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 FuncVpc

Parameter

+

Type

+

Description

+

domain_id

+

String

+

Domain name ID.

+

namespace

+

String

+

Project ID.

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+

subnet_name

+

String

+

Subnet name.

+

subnet_id

+

String

+

Subnet ID.

+

cidr

+

String

+

Subnet mask.

+

gateway

+

String

+

Gateway.

+

security_groups

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 MountConfig

Parameter

+

Type

+

Description

+

mount_user

+

MountUser object

+

User information.

+

func_mounts

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 MountUser

Parameter

+

Type

+

Description

+

user_id

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 8 FuncMount

Parameter

+

Type

+

Description

+

mount_type

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + +
Table 9 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 10 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 11 FunctionAsyncConfig

Parameter

+

Type

+

Description

+

max_async_event_age_in_seconds

+

Integer

+

Maximum validity period of a message. Value range: 60–86,400. Unit: second.

+

max_async_retry_attempts

+

Integer

+

Maximum number of retry attempts to be made if asynchronous invocation fails. Default value: 3. Value range: 0–8.

+

destination_config

+

FuncAsyncDestinationConfig object

+

Asynchronous invocation target.

+

created_time

+

String

+

Time when asynchronous execution notification was configured.

+

last_modified

+

String

+

Time when the asynchronous execution notification settings were last modified.

+
+
+ +
+ + + + + + + + + + + + + +
Table 12 FuncAsyncDestinationConfig

Parameter

+

Type

+

Description

+

on_success

+

FuncDestinationConfig object

+

Target to be invoked when a function is successfully executed.

+

on_failure

+

FuncDestinationConfig object

+

Target to be invoked when a function fails to be executed due to a system error or an internal error.

+
+
+ +
+ + + + + + + + + + + + + +
Table 13 FuncDestinationConfig

Parameter

+

Type

+

Description

+

destination

+

String

+

Object type.

+
  • OBS
  • SMN
  • FunctionGraph
+

Enumeration values:

+
  • OBS
  • SMN
  • FunctionGraph
+

param

+

String

+

Parameters (in JSON format) corresponding to the target service.

+
  • OBS: Parameters related to the bucket name, object directory prefix, and object expiration time are included. The object expiration time ranges from 0 to 365 days. If the value is 0, the object will not expire.
  • SMN: The topic_urn parameter is included.
  • FunctionGraph: The func_urn parameter is included.
+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 15 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 16 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 17 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 18 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Publish a function version.

+
POST https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/versions
+
+{
+  "version" : "v1",
+  "description" : "v1"
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "func_urn" : "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test",
+  "func_name" : "test",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "namespace" : "46b6f338fc3445b8846c71dfb1fbxxxx",
+  "project_name" : "xxxxx",
+  "package" : "default",
+  "runtime" : "Node.js6.10",
+  "timeout" : 3,
+  "handler" : "test.handler",
+  "memory_size" : 128,
+  "cpu" : 300,
+  "code_type" : "inline",
+  "code_filename" : "inline.js",
+  "code_size" : 272,
+  "digest" : "faa825575c45437cddd4e369bea69893bcbe195d478178462ad90984fe72993f3f59d15f41c5373f807f3e05fb9af322c55dabeb16565c386e402413458e6068",
+  "version" : "latest",
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : 0
+  }
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1051",
+  "error_msg" : "Not found the function"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0145.html b/docs/fg/api-ref/functiongraph_06_0145.html new file mode 100644 index 00000000..d23f3cc2 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0145.html @@ -0,0 +1,189 @@ + + +

Querying the Log Group and Stream of a Function

+

Function

This API is used to query the LTS log group and stream settings of a function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/lts-log-detail

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

group_name

+

String

+

Log group name.

+

group_id

+

String

+

Log group ID.

+

stream_id

+

String

+

Log stream ID.

+

stream_name

+

String

+

Log stream name.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the LTS log group and stream settings of a function.

+
GET /v2/{project_id}/fgs/functions/{urn}/lts-log-detail
+
+

Example Responses

Status code: 200

+

Ok

+
{
+  "group_id" : "xxx",
+  "stream_id" : "xxx",
+  "stream_name" : "xxx"
+}
+

Status code: 403

+

FORBIDDEN

+
{
+  "error_code" : "FSS.0403",
+  "error_msg" : "invalid token"
+}
+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

200

+

Ok

+

403

+

FORBIDDEN

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0146_00_1.html b/docs/fg/api-ref/functiongraph_06_0146_00_1.html new file mode 100644 index 00000000..40279cb1 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0146_00_1.html @@ -0,0 +1,298 @@ + + +

Stopping an Asynchronous Invocation Request

+

Function

This API is used to stop asynchronous invocation of a function with N concurrent instances. When calling this API, set recursive to false and force to true. The API will also stop the function's other concurrent requests and return "4208 function invocation canceled".

+
+

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/cancel

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

request_id

+

Yes

+

String

+

ID of a stopped request.

+

type

+

No

+

String

+

Stop mode. Options: recursive and force. recursive: The subfunction that is being invoked will be stopped. force: Terminate the runtime directly.

+

Enumeration values:

+
  • force

    +
  • recursive

    +
+
+
+
+

Response Parameters

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Stop an asynchronous invocation request of a function.

+
POST /v2/{project_id}/fgs/functions/{function_urn}/cancel
+
+{
+  "request_id" : "xxxx"
+}
+
+

Example Responses

Status code: 200

+

OK

+
null
+

Status code: 400

+

Invalid RequestId

+
{
+  "error_code" : "FSS.0400",
+  "error_msg" : "Invalid RequestId"
+}
+

Status code: 403

+

FORBIDDEN

+
{
+  "error_code" : "FSS.0403",
+  "error_msg" : "invalid token"
+}
+

Status code: 404

+

Not Found

+
{
+  "error_code" : "FSS.0404",
+  "error_msg" : "can not find function"
+}
+

Status code: 500

+

Internal error.

+
{
+  "error_code" : "FSS.0500",
+  "error_msg" : "xxx"
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Invalid RequestId

+

403

+

FORBIDDEN

+

404

+

Not Found

+

500

+

Internal error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0152.html b/docs/fg/api-ref/functiongraph_06_0152.html new file mode 100644 index 00000000..42a8dab3 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0152.html @@ -0,0 +1,462 @@ + + +

Creating a Dependency Version

+

Function

This API is used to create a dependency version.

+
+

URI

POST /v2/{project_id}/fgs/dependencies/version

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

depend_file

+

No

+

String

+

This parameter is mandatory when depend_type is set to zip. It is in the file stream format and must be a ZIP file encoded using Base64. The size of the ZIP file cannot exceed 40 MB. For a larger file, upload it through OBS.

+

depend_link

+

No

+

String

+

URL of the dependency in the OBS console when depend_type is set to obs.

+

depend_type

+

Yes

+

String

+

Import mode. Options: obs and zip.

+

runtime

+

Yes

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8

    +
  • Java11

    +
  • Node.js6.10

    +
  • Node.js8.10

    +
  • Node.js10.16

    +
  • Node.js12.13

    +
  • Node.js14.18

    +
  • Python2.7

    +
  • Python3.6

    +
  • Go1.8

    +
  • Go1.x

    +
  • C#(.NET Core 2.0)

    +
  • C#(.NET Core 2.1)

    +
  • C#(.NET Core 3.1)

    +
  • Custom

    +
  • PHP7.3

    +
  • Python3.9

    +
  • http

    +
  • Custom Image

    +
+

name

+

Yes

+

String

+

Dependence name. It can contain a maximum of 96 characters, and must start with a letter and end with a letter or digit. Only letters, digits, underscores (_), periods (.), and hyphens (-) are allowed.

+

description

+

No

+

String

+

Description of the dependency, which can contain a maximum of 512 characters.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

id

+

String

+

Dependence version ID.

+

owner

+

String

+

Dependency owner.

+

link

+

String

+

URL of the dependency in OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8

    +
  • Java11

    +
  • Node.js6.10

    +
  • Node.js8.10

    +
  • Node.js10.16

    +
  • Node.js12.13

    +
  • Node.js14.18

    +
  • Python2.7

    +
  • Python3.6

    +
  • Go1.8

    +
  • Go1.x

    +
  • C#(.NET Core 2.0)

    +
  • C#(.NET Core 2.1)

    +
  • C#(.NET Core 3.1)

    +
  • Custom

    +
  • PHP7.3

    +
  • Python3.9

    +
  • http

    +
  • Custom Image

    +
+

etag

+

String

+

Unique identifier of the dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependency name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

Dependency file name.

+

version

+

Long

+

Dependency version.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

Long

+

Time when the dependency was last updated.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

+
+

Example Responses

Status code: 200

+

ok

+
{
+  "id" : "4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3",
+  "owner" : "*****",
+  "link" : "https://{bucket}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3.zip",
+  "runtime" : "Python3.6",
+  "etag" : "83863be4b6c3a86aef995dbc83aae68f",
+  "size" : 577118,
+  "name" : "python-kafka",
+  "description" : "Python library for Kafka operations.",
+  "file_name" : "python-kafka.zip",
+  "version" : 0,
+  "dep_id" : "edbd67fa-f107-40b3-af75-a85f0577ad61",
+  "last_modified" : 1660029887
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0153.html b/docs/fg/api-ref/functiongraph_06_0153.html new file mode 100644 index 00000000..6a527846 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0153.html @@ -0,0 +1,417 @@ + + +

Querying Dependency Versions

+

Function

This API is used to query dependency versions.

+
+

URI

GET /v2/{project_id}/fgs/dependencies/{depend_id}/version

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

depend_id

+

Yes

+

String

+

Dependency ID.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

marker

+

No

+

String

+

Final record queried last time. Default value: 0.

+

maxitems

+

No

+

String

+

Maximum number of items to return in a request.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

dependencies

+

Array of ListDependencyVersionsResult objects

+

Dependency list.

+

next_marker

+

Long

+

Next read position.

+

count

+

Long

+

Total number of dependencies.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListDependencyVersionsResult

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Dependency owner. public indicates that the dependency is public.

+

link

+

String

+

URL of the dependency in OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

Unique identifier of the dependency (MD5 verification value).

+

size

+

Long

+

Size of the dependency.

+

name

+

String

+

Dependency name.

+

file_name

+

String

+

Dependency file name.

+

description

+

String

+

Dependency description.

+

version

+

Long

+

Dependency version.

+

last_modified

+

Long

+

Time when the dependency was last updated.

+

dep_id

+

String

+

Dependency ID.

+

is_shared

+

Boolean

+

Whether to share the dependency version. (discarded)

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query dependencies of the current tenant.

+
GET https://{Endpoint}/v2/{project_id}/fgs/ListDependencies?marker=0&maxitems=400
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "dependencies" : [ {
+    "id" : "6578de50-9a18-48fa-b84e-b2d36636e433",
+    "owner" : "public",
+    "link" : "https://{obs_endpoint}/functionstage-examples/fg_test_pandas_1.1.3.zip",
+    "runtime" : "Python3.6",
+    "etag" : "35a893d9495b3e22259b2773996bc94d-6",
+    "size" : 31009808,
+    "name" : "panda1.1.3"
+  } ],
+  "next_marker" : 43,
+  "count" : 43
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0154.html b/docs/fg/api-ref/functiongraph_06_0154.html new file mode 100644 index 00000000..042be39b --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0154.html @@ -0,0 +1,359 @@ + + +

Querying a Dependency Version

+

Function

This API is used to query the details about a dependency version.

+
+

URI

GET /v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

depend_id

+

Yes

+

String

+

Dependency ID.

+

version

+

Yes

+

String

+

Dependence version.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Dependency owner.

+

link

+

String

+

URL of the dependency in OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

Unique identifier of the dependency (MD5 verification value).

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependency name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

Dependency file name.

+

version

+

Long

+

Dependency version.

+

last_modified

+

Long

+

Time when the dependency was last updated.

+

dep_id

+

String

+

Dependency ID.

+

download_link

+

String

+

Temporary download link of a dependency file.

+

is_shared

+

Boolean

+

Whether to share the dependency version. (discarded)

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query dependencies of the current tenant.

+
GET https://{Endpoint}/v2/{project_id}/fgs/ListDependencies?marker=0&maxitems=400
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "id" : "4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3",
+  "owner" : "*****",
+  "link" : "https://{bucket}.{obs_endpoint}/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3.zip",
+  "runtime" : "Python3.6",
+  "etag" : "83863be4b6c3a86aef995dbc83aae68f",
+  "size" : 577118,
+  "name" : "python-kafka",
+  "description" : "Python library for Kafka operations.",
+  "file_name" : "python-kafka.zip",
+  "version" : 0,
+  "last_modified" : 1660029887
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0155.html b/docs/fg/api-ref/functiongraph_06_0155.html new file mode 100644 index 00000000..ffbec7ec --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0155.html @@ -0,0 +1,241 @@ + + +

Deleting a Dependency Version

+

Function

This API is used to delete a dependency version.

+
+

URI

DELETE /v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

depend_id

+

Yes

+

String

+

Dependency ID.

+

version

+

Yes

+

String

+

Dependence version.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete a dependency version.

+
DELETE https://{Endpoint}/v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0200.html b/docs/fg/api-ref/functiongraph_06_0200.html new file mode 100644 index 00000000..ad42d4f7 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0200.html @@ -0,0 +1,15 @@ + + +

Calling APIs

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0201.html b/docs/fg/api-ref/functiongraph_06_0201.html new file mode 100644 index 00000000..a2d4da9b --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0201.html @@ -0,0 +1,15 @@ + + +

Examples

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0202.html b/docs/fg/api-ref/functiongraph_06_0202.html new file mode 100644 index 00000000..0f227629 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0202.html @@ -0,0 +1,144 @@ + + +

Example 1: Using a Timer Trigger to Periodically Download Files from an OBS Bucket

+

Scenario

This example guides you through the procedure for creating a Python 2.7 function and associating a timer trigger with it to periodically download files from an OBS bucket.

+

For details about how to call APIs, see Calling APIs.

+
+

Prerequisites

+
+

General Procedure

Create a FunctionGraph function and associate a timer trigger with it to periodically download files from an OBS bucket. The procedure is as follows:

+
  1. Creating a Function: Create a function for downloading files.
  2. Modifying the Metadata of a Function: Modify the OBS address, OBS bucket name, and file name in the function configuration.
  3. Executing a Function Synchronously: Verify whether the function can successfully download files from the OBS bucket.
  4. Creating a Trigger: Create a timer trigger to periodically download files.
+
+

Step 1: Create a Function for Downloading Files from OBS

URI: POST /v2/{project_id}/fgs/functions

+

For details, see Creating a Function.

+ +
+

Step 2: Modify the OBS Address, Bucket Name, and File Name in the Function Configurations

URI: PUT /v2/{project_id}/fgs/functions/{function_urn}/config

+

For details, see Modifying the Metadata of a Function.

+ +
+

Step 3: Test the Function

URI: POST /v2/{project_id}/fgs/functions/{function_urn}/invocations

+

For details, see Executing a Function Synchronously.

+ +
+

Step 4: Create a Timer Trigger to Periodically Download Files from OBS

URI: POST /v2/{project_id}/fgs/triggers/{function_urn}

+

For details, see Creating a Trigger.

+ +
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0203.html b/docs/fg/api-ref/functiongraph_06_0203.html new file mode 100644 index 00000000..2d559b4b --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0203.html @@ -0,0 +1,121 @@ + + +

Example 2: Using an APIG Trigger to Obtain a Static Web Page

+

Scenario

This example guides you through the procedure for creating a Python 2.7 function and associating an APIG trigger with it to obtain a static web page.

+

For details about how to call APIs, see Calling APIs.

+
+

Prerequisites

You have created an API group in APIG, and have recorded the ID and subdomain name of the API group.

+
+

General Procedure

Create a FunctionGraph function and associate an APIG trigger with it to obtain a static web page. The procedure is as follows:

+
  1. Creating a Function: Create a function to return a static web page.
  2. Creating a Trigger: Create an APIG trigger.
  3. Call the API of the APIG trigger to obtain a static page.
+
+

Step 1: Create a Function to Return a Static Web Page

URI: POST /v2/{project_id}/fgs/functions

+

For details, see Creating a Function.

+ +
+

Step 2: Create an APIG Trigger

URI: POST /v2/{project_id}/fgs/triggers/{function_urn}

+

For details, see Creating a Trigger.

+ +
+

Step 3: Call the API of the APIG Trigger to Obtain a Static Web Page

Enter the value of invoke_url in the address bar of a browser to obtain a static web page.

+
Figure 1 Calling the API
+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0204.html b/docs/fg/api-ref/functiongraph_06_0204.html new file mode 100644 index 00000000..47fd2769 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0204.html @@ -0,0 +1,75 @@ + + +

Example 3: Creating a Function by Uploading Code to an OBS Bucket

+

Scenario

This example guides you through the procedure for uploading local code to an OBS bucket and creating a Python 2.7 function using the link URL of the OBS bucket.

+

For details about how to call APIs, see Calling APIs.

+
+

Prerequisites

An OBS bucket has been created.

+
+

General Procedure

After writing function code in your local environment, upload the code file to an OBS bucket and use the link URL of the OBS bucket to create a function. The procedure is as follows:

+
  1. Write code in your local environment to create a function project.
  2. Compress the code file into a ZIP package, upload the package to the OBS bucket, and record the link URL of this bucket.
  3. Call the API in Creating a Function to create a function using the link URL of the OBS bucket.
+
+

Step 1: Create a Function Project

  1. Write code for printing text helloworld.

    Open a text editor, compile a HelloWorld function, and save the code file as helloworld.py. The code is as follows:

    +
    def printhello(): 
    +    print 'Hello world!' 
    +
  2. Define a FunctionGraph function.

    Open a text editor, define a function, and save the function file as index.py under the same directory as the helloworld.py file. The function code is as follows:

    +
    import json 
    +import helloworld 
    + 
    +def handler (event, context): 
    +    output =json.dumps(event) 
    +    helloworld.printhello() 
    +    return output
    +
+
+

Step 2: Upload the Project to an OBS Bucket

  1. In the function project, select the helloworld.py and index.py files and compress them into fss_examples_python2.7.zip.
  2. Upload the fss_examples_python2.7.zip package to the OBS bucket and record the link URL of the OBS bucket.
+
+

Step 3: Call the Function Creation API to Create a Function Using the Link URL of the OBS Bucket

URI: POST /v2/{project_id}/fgs/functions

+

For details, see Creating a Function.

+ +
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0210.html b/docs/fg/api-ref/functiongraph_06_0210.html new file mode 100644 index 00000000..6859abcd --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0210.html @@ -0,0 +1,95 @@ + + +

Making an API Request

+

This section describes the structure of a REST API request, and uses the Identity and Access Management (IAM) API for obtaining a user token as an example to demonstrate how to call an API. The obtained token can then be used to authenticate the calling of other APIs.

+

Request URI

A request URI is in the following format:

+

{URI-scheme} :// {Endpoint} / {resource-path} ? {query-string}

+

Although a request URI is included in the request header, most programming languages or frameworks require the request URI to be transmitted separately.

+ +
+ + + + + + + + + + + + + + + + +
Table 1 URI parameters

Parameter

+

Description

+

URI-scheme

+

Protocol used to transmit requests. All APIs use HTTPS.

+

Endpoint

+

Domain name or IP address of the server bearing the REST service. The endpoint varies between services in different regions. It can be obtained from Regions and Endpoints.

+

resource-path

+

Resource path, that is, an API access path. Obtain the path from the URI of an API. For example, the resource-path of the API used to obtain a user token is /v3/auth/tokens.

+

query-string

+

Query parameter, which is optional. Ensure that a question mark (?) is included before each query parameter that is in the format of "Parameter name=Parameter value". For example, ?limit=10 indicates that a maximum of 10 data records will be displayed.

+
+
+

To simplify the URI display in this document, each API is provided only with a resource-path and a request method. The URI-scheme of all APIs is HTTPS, and the endpoints of all APIs in the same region are identical.

+
+
+

Request Methods

The HTTP protocol defines the following request methods that can be used to send a request to the server:

+ +

For example, in the case of the API used to obtain a user token, the request method is POST. The request is as follows:

+
+

Request Header

You can also add additional header fields to a request, such as the fields required by a specified URI or HTTP method. For example, to request for the authentication information, add Content-Type, which specifies the request body type.

+

Common request header fields are as follows:

+ +

In addition to supporting token-based authentication, public cloud APIs also support authentication using access key ID/secret access key (AK/SK). During AK/SK-based authentication, an SDK is used to sign the request, and the Authorization (signature information) and X-Sdk-Date (time when the request is sent) header fields are automatically added to the request.

+

For more details, see .

+
+ +

The API used to obtain a user token does not require authentication. Therefore, only the Content-Type field needs to be added to requests for calling the API. An example of such requests is as follows:

+
+

Request Body

The body of a request is often sent in a structured format as specified in the Content-Type header field. The request body transfers content except the request header.

+

The request body varies between APIs. Some APIs do not require the request body, such as the APIs requested using the GET and DELETE methods.

+

In the case of the API used to obtain a user token, the request parameters and parameter description can be obtained from the API request. The following provides an example request with a body included. Replace username, domainname, ******** (login password), and xxxxxx (project ID) with the actual values. To learn how to obtain a project ID, see Regions and Endpoints.

+

The scope parameter specifies where a token takes effect. You can set scope to an account or a project under an account. In the following example, the token takes effect only for the resources in a specified project. For more information about this API, see section "Obtaining a User Token".

+
+
+
+Content-Type: application/json
+
+{
+    "auth": {
+        "identity": {
+            "methods": [
+                "password"
+            ],
+            "password": {
+                "user": {
+                    "name": "username",
+                    "password": "********",
+                    "domain": {
+                        "name": "domainname"
+                    }
+                }
+            }
+        },
+        "scope": {
+            "project": {
+                "name": "xxxxxxxxxxxxxxxxxx"
+            }
+        }
+    }
+}
+

+

If all data required for the API request is available, you can send the request to call the API through curl, Postman, or coding. In the response to the API used to obtain a user token, x-subject-token is the desired user token. This token can then be used to authenticate the calling of other APIs.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0220.html b/docs/fg/api-ref/functiongraph_06_0220.html new file mode 100644 index 00000000..264fb274 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0220.html @@ -0,0 +1,40 @@ + + +

Response

+

Status Code

After sending a request, you will receive a response, including a status code, response header, and response body.

+

A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For more information, see Status Codes.

+

For example, if status code 201 is returned for calling the API used to obtain a user token, the request is successful.

+
+

Response Header

Similar to a request, a response also has a header, for example, Content-Type.

+

Figure 1 shows the response header fields for the API used to obtain a user token. The x-subject-token header field is the desired user token. This token can then be used to authenticate the calling of other APIs.

+
Figure 1 Header fields of the response to the request for obtaining a user token
+
+

Response Body

The body of a response is often returned in structured format as specified in the Content-Type header field. The response body transfers content except the response header.

+

The following is part of the response body for the API used to obtain a user token.

+
{ 
+    "token": { 
+        "expires_at": "2019-02-13T06:52:13.855000Z", 
+        "methods": [ 
+            "password" 
+        ], 
+        "catalog": [ 
+            { 
+                "endpoints": [ 
+                    { 
+                        "region_id": "XXXXXXXX", 
+......
+
+

If an error occurs during API calling, an error code and a message will be displayed. The following shows an error response body.

+
{
+  "error_code": "FGS.0111",
+  "error_msg": "xxxxxxxxx"
+} 
+

In the response body, error_code is an error code, and error_msg provides information about the error.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0230.html b/docs/fg/api-ref/functiongraph_06_0230.html new file mode 100644 index 00000000..81799f02 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0230.html @@ -0,0 +1,17 @@ + + +

Authentication

+

Requests for calling an API can be authenticated using either of the following methods:

+ +

Token-based Authentication

The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the Identity and Access Management (IAM) API used to obtain a user token.

+
+

A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API.

+

In Making an API Request, the process of calling the API used to obtain a user token is described. After a token is obtained, the X-Auth-Token header field must be added to requests to specify the token when other APIs are called. For example, if the token is ABCDEFJ...., X-Auth-Token: ABCDEFJ.... can be added to a request as follows:

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_0260.html b/docs/fg/api-ref/functiongraph_06_0260.html new file mode 100644 index 00000000..ed9aafaf --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_0260.html @@ -0,0 +1,41 @@ + + +

Obtaining a Project ID

+

Obtaining a Project ID on the Console

When calling APIs, you need to enter a project ID in some URLs. To obtain a project ID, perform the following steps:

+
  1. Log in to the management console.
  2. Click the username and choose My Credentials from the drop-down list.

    On the My Credentials page, view the project ID.

    +
+
+

Obtaining a Project ID by Calling an API

A project ID can also be obtained by calling a specific API. For details, see Querying Project Information.

+

The API used to obtain a project ID is GET https://{Endpoint}/v3/projects, where {Endpoint} indicates the IAM endpoint. You can obtain the IAM endpoint from Regions and Endpoints. For details on API calling authentication, see Authentication.

+

The following is an example response. The value of id in the projects section is the project ID.

+
{
+    "projects": [
+        { 
+            "domain_id": "65382450e8f64ac0870cd180d14e684b",
+            "is_domain": false, 
+            "parent_id": "65382450e8f64ac0870cd180d14e684b",
+            "name": "xxx",
+            "description": "",
+            "links": {
+                "next": null,
+                "previous": null,
+                "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99"
+            },
+            "id": "a4a5d4098fb4474fa22cd05f897d6b99",
+            "enabled": true
+        }
+    ],
+    "links": {
+        "next": null,
+        "previous": null,
+        "self": "https://www.example.com/v3/projects"
+    }
+}
+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1018.html b/docs/fg/api-ref/functiongraph_06_1018.html new file mode 100644 index 00000000..263f884b --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1018.html @@ -0,0 +1,934 @@ + + +

Updating Max. Instances of a Function

+

Function

This API is used to update the maximum number of instances of a function.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{function_urn}/config-max-instance

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

max_instance_num

+

No

+

Integer

+

Maximum number of instances. -1 indicates that the number of instances is unlimited, and 0 indicates that the function is disabled.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function.

+

These are parameters used in a function.

+

For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version, which is automatically generated by the system. The version name is in the format of "vYYYYMMDD-HHMMSS" (v+year/month/day-hour/minute/second).

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services. After specifying a function execution agency, you can use the context method in the function handler to obtain a token, an AK, and an SK for accessing other cloud services. No agency is required if FunctionGraph does not access any cloud services.

+

app_xrole

+

String

+

Execution agency. You can optimize performance by configuring a separate agency for function execution, otherwise, the same agency is used for both execution and configuration.

+

description

+

String

+

Function description.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc

+

FuncVpc object

+

VPC configuration. An agency with VPC permissions must be configured for the function.

+

mount_config

+

MountConfig object

+

Mounting configuration.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

dependencies

+

Array of Dependency objects

+

Dependency packages.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

enable_cloud_debug

+

String

+

Whether to enable cloud debugging to adapt to the CloudDebug scenario. (discarded)

+

enable_dynamic_memory

+

Boolean

+

Whether to enable dynamic memory allocation.

+

is_stateful_function

+

Boolean

+

Whether stateful functions are supported. This parameter is supported in FunctionGraph v2.

+

domain_names

+

String

+

Private domain name configured for resolution.

+

is_return_stream

+

Boolean

+

Whether to return stream data. (discarded)

+

enable_auth_in_header

+

Boolean

+

Whether to add authentication information to request header for custom image-based functions.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 FuncVpc

Parameter

+

Type

+

Description

+

domain_id

+

String

+

Domain name ID.

+

namespace

+

String

+

Project ID.

+

vpc_name

+

String

+

VPC name.

+

vpc_id

+

String

+

VPC ID.

+

subnet_name

+

String

+

Subnet name.

+

subnet_id

+

String

+

Subnet ID.

+

cidr

+

String

+

Subnet mask.

+

gateway

+

String

+

Gateway.

+

security_groups

+

Array of strings

+

Security group.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 MountConfig

Parameter

+

Type

+

Description

+

mount_user

+

MountUser object

+

User information.

+

func_mounts

+

Array of FuncMount objects

+

Mounted resources.

+
+
+ +
+ + + + + + + + + + + + + +
Table 7 MountUser

Parameter

+

Type

+

Description

+

user_id

+

String

+

User ID, a non-0 integer from –1 to 65534.

+

user_group_id

+

String

+

User group ID, a non-0 integer from –1 to 65534.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 8 FuncMount

Parameter

+

Type

+

Description

+

mount_type

+

String

+

Mount type. The value can be sfs, sfsTurbo, or ecs. This parameter is mandatory when func_mounts is not empty.

+

mount_resource

+

String

+

ID of the mounted resource (cloud service ID). This parameter is mandatory when func_mounts is not empty.

+

mount_share_path

+

String

+

Remote mount path. For example, 192.168.0.12:/data. This parameter is mandatory if mount_type is set to ecs.

+

local_mount_path

+

String

+

Function access path. This parameter is mandatory when func_mounts is not empty.

+
+
+ +
+ + + + + + + + + + + + + +
Table 9 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 10 Dependency

Parameter

+

Type

+

Description

+

id

+

String

+

Dependency version ID.

+

owner

+

String

+

Domain ID of the dependency owner.

+

link

+

String

+

URL of the dependency on OBS.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

etag

+

String

+

MD5 value of a dependency.

+

size

+

Long

+

Dependency size.

+

name

+

String

+

Dependence name.

+

description

+

String

+

Dependency description.

+

file_name

+

String

+

File name of a dependency package (ZIP).

+

version

+

Long

+

Dependency version ID.

+

dep_id

+

String

+

Dependency ID.

+

last_modified

+

String

+

Time when the function was last updated.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 15 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Update the maximum number of instances of a function to 300.

+
PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/config-max-instance
+
+{
+  "max_instance_num" : 300
+}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "func_urn" : "urn:fss:xxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test",
+  "func_name" : "test",
+  "domain_id" : "14ee2e3501124efcbca7998baa24xxxx",
+  "namespace" : "46b6f338fc3445b8846c71dfb1fbxxxx",
+  "project_name" : "xxxxxx",
+  "package" : "default",
+  "runtime" : "Node.js6.10",
+  "timeout" : 3,
+  "handler" : "fssExampleCsharp2.1::fssExampleCsharp21.Program::MyFunc",
+  "memory_size" : 128,
+  "cpu" : 300,
+  "code_type" : "inline",
+  "code_filename" : "index.js",
+  "code_size" : 272,
+  "digest" : "faa825575c45437cddd4e369bea69893bcbe195d478178462ad90984fe72993f3f59d15f41c5373f807f3e05fb9af322c55dabeb16565c386e402413458e6068",
+  "version" : "latest",
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : 300,
+    "concurrent_num" : 1
+  }
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1021.html b/docs/fg/api-ref/functiongraph_06_1021.html new file mode 100644 index 00000000..8ea0a450 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1021.html @@ -0,0 +1,559 @@ + + +

Querying Resources

+

Function

This API is used to query resources.

+
+

URI

POST /v2/{project_id}/{resource_type}/resource-instances/{action}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

resource_type

+

Yes

+

String

+

Resource type. Enter functions here.

+

action

+

Yes

+

String

+

Filter or count.

+

Enumeration values:

+
  • filter

    +
  • count

    +
+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

without_any_tag

+

No

+

Boolean

+

Whether to use tag-based filtering.

+

limit

+

No

+

String

+

Number of records displayed on each page.

+

offset

+

No

+

String

+

Query offset.

+

action

+

No

+

String

+

Query an action.

+

Enumeration values:

+
  • count

    +
  • filter

    +
+

matches

+

No

+

Array of KvItem objects

+

Query a key-value pair.

+

sys_tags

+

No

+

Array of TagItem objects

+

Query system tags.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 KvItem

Parameter

+

Mandatory

+

Type

+

Description

+

key

+

No

+

String

+

Key.

+

value

+

No

+

String

+

Value.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 5 TagItem

Parameter

+

Mandatory

+

Type

+

Description

+

key

+

No

+

String

+

Key.

+

values

+

No

+

Array of strings

+

Value.

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

resources

+

Array of ListEnterpriseResourceResult objects

+

Enterprise projects.

+

total_count

+

Long

+

Number of resources.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table 7 ListEnterpriseResourceResult

Parameter

+

Type

+

Description

+

resource_id

+

String

+

Resource ID.

+

resource_detail

+

ListEnterpriseResourceDetail object

+

tags

+

Array of KvItem objects

+

Tag list.

+

sys_tags

+

Array of KvItem objects

+

System tags.

+

resource_name

+

String

+

Resource name.

+
+
+ +
+ + + + + + + + + +
Table 8 ListEnterpriseResourceDetail

Parameter

+

Type

+

Description

+

detailId

+

String

+

Function URN.

+
+
+ +
+ + + + + + + + + + + + + +
Table 9 KvItem

Parameter

+

Type

+

Description

+

key

+

String

+

Key.

+

value

+

String

+

Value.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 11 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 12 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 13 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 14 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query resources.

+
POST https://{Endpoint}/v2/{project_id}/{resource_type}/resource-instances/{action}
+
+{
+  "without_any_tag" : true,
+  "limit" : 5,
+  "matches" : [ {
+    "key" : "resource_name",
+    "value" : "test_function"
+  } ]
+}
+
+

Example Responses

Status code: 200

+

ok

+ +
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1022.html b/docs/fg/api-ref/functiongraph_06_1022.html new file mode 100644 index 00000000..0f6fa4c2 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1022.html @@ -0,0 +1,296 @@ + + +

Querying Resource Tags

+

Function

This API is used to query resource tags.

+
+

URI

GET /v2/{project_id}/{resource_type}/tags

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

resource_type

+

Yes

+

String

+

Resource type. Enter "functions" here.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

tags

+

Array of TagItem objects

+

Tag list.

+

sys_tags

+

Array of TagItem objects

+

System tags.

+
+
+ +
+ + + + + + + + + + + + + +
Table 4 TagItem

Parameter

+

Type

+

Description

+

key

+

String

+

Key.

+

values

+

Array of strings

+

Value.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query resource tags.

+
GET https://{Endpoint}/v2/{project_id}/{resource_type}/tags
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "tags" : [ {
+    "key" : "xxx",
+    "values" : [ "yyy", "zzz" ]
+  } ],
+  "sys_tags" : [ {
+    "key" : "_sys_enterprise_project_id",
+    "values" : [ "5aa119a8-d25b-45a7-8d1b-88e127885635" ]
+  } ]
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1023.html b/docs/fg/api-ref/functiongraph_06_1023.html new file mode 100644 index 00000000..03e2ec1e --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1023.html @@ -0,0 +1,233 @@ + + +

Creating Resource Tags

+

Function

This API is used to create resource tags.

+
+

URI

POST /v2/{project_id}/{resource_type}/{resource_id}/tags/create

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

resource_type

+

Yes

+

String

+

Resource type. Enter functions here.

+

resource_id

+

Yes

+

String

+

Resource ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

action

+

No

+

String

+

Action name.

+

Enumeration values:

+
  • create

    +
  • delete

    +
+

tags

+

No

+

Array of KvItem objects

+

Tag list.

+

sys_tags

+

No

+

Array of KvItem objects

+

System tags.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 KvItem

Parameter

+

Mandatory

+

Type

+

Description

+

key

+

No

+

String

+

Key.

+

value

+

No

+

String

+

Value.

+
+
+
+

Response Parameters

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Create resource tags testKey1:testValue1 and testKey2:testValue2.

+
POST https://{Endpoint}/v2/{project_id}/{resource_type}/{resource_id}/tags/create
+
+{
+  "tags" : [ {
+    "key" : "testKey1",
+    "value" : "testValue1"
+  }, {
+    "key" : "testKey2",
+    "value" : "testValue2"
+  } ],
+  "action" : "create"
+}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

400

+

Bad request.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1024.html b/docs/fg/api-ref/functiongraph_06_1024.html new file mode 100644 index 00000000..85775d3c --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1024.html @@ -0,0 +1,230 @@ + + +

Deleting Resource Tags

+

Function

This API is used to delete resource tags.

+
+

URI

DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/delete

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

resource_type

+

Yes

+

String

+

Resource type. Enter functions here.

+

resource_id

+

Yes

+

String

+

Resource ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 3 Request body parameters

Parameter

+

Mandatory

+

Type

+

Description

+

action

+

No

+

String

+

Action name.

+

Enumeration values:

+
  • create

    +
  • delete

    +
+

tags

+

No

+

Array of KvItem objects

+

Tag list.

+

sys_tags

+

No

+

Array of KvItem objects

+

System tags.

+
+
+ +
+ + + + + + + + + + + + + + + + +
Table 4 KvItem

Parameter

+

Mandatory

+

Type

+

Description

+

key

+

No

+

String

+

Key.

+

value

+

No

+

String

+

Value.

+
+
+
+

Response Parameters

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Delete resource tags.

+
DELETE https://{Endpoint}/v2/{project_id}/{resource_type}/{resource_id}/tags/delete
+
+{
+  "tags" : [ {
+    "key" : "testKey1",
+    "value" : "testValue1"
+  } ],
+  "action" : "delete"
+}
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

204

+

No Content

+

400

+

Bad request.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1300.html b/docs/fg/api-ref/functiongraph_06_1300.html new file mode 100644 index 00000000..2bb463fc --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1300.html @@ -0,0 +1,17 @@ + + +

Appendix

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1310.html b/docs/fg/api-ref/functiongraph_06_1310.html new file mode 100644 index 00000000..d5c3b519 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1310.html @@ -0,0 +1,135 @@ + + +

Status Codes

+

Table 1 describes the status codes.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 Status codes

Status Code

+

Message

+

Description

+

200

+

-

+

The request has succeeded.

+

204

+

-

+

The request has succeeded.

+

400

+

Bad Request

+

The server failed to process the request.

+

401

+

Unauthorized

+

The request requires user authentication.

+

403

+

Forbidden

+

The server understood the request, but is refusing to fulfill it.

+

404

+

Not Found

+

The server has not found anything matching the request URI.

+

405

+

Method Not Allowed

+

The method specified in the request line is not allowed for the resource identified by the request URI.

+

406

+

Not Acceptable

+

The response generated by the server cannot be accepted by the client.

+

407

+

Proxy Authentication Required

+

The client must first authenticate itself with the proxy.

+

408

+

Request Timeout

+

The client did not produce a request within the time that the server was prepared to wait.

+

409

+

Conflict

+

The request could not be completed due to a conflict with the current state of the resource.

+

500

+

Internal Server Error

+

The server encountered an unexpected condition which prevented it from fulfilling the request.

+

501

+

Not Implemented

+

The server does not support the functionality required to fulfill the request.

+

502

+

Bad Gateway

+

The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

+

503

+

Service Unavailable

+

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

+

504

+

Gateway Timeout

+

Gateway timed out.

+
+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1340.html b/docs/fg/api-ref/functiongraph_06_1340.html new file mode 100644 index 00000000..f330625d --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1340.html @@ -0,0 +1,184 @@ + + +

FunctionGraph Metrics

+

Introduction

This section describes the function metrics reported to Cloud Eye.

+

Their namespace and dimension are also included. You can view monitoring graphs and alarm messages on the Cloud Eye console.

+
+

Namespace

SYS.FunctionGraph

+
+

Function Metrics

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 Function metrics

Metric

+

Display Name

+

Description

+

Unit

+

Upper Limit

+

Lower Limit

+

Recommended Threshold

+

Value Type

+

Meaning

+

Dimension

+

count

+

Invocations

+

Number of times a function is invoked

+

Count

+

-

+

0

+

-

+

Int

+

Number of times a function is invoked

+

package-functionname

+

failcount

+

Errors

+

Number of errors that occur when a function is invoked

+

Count

+

-

+

0

+

-

+

Int

+

Number of errors that occur when a function is invoked

+

package-functionname

+

rejectcount

+

Throttles

+

Number of times a function is throttled when invoked

+

Count

+

-

+

0

+

-

+

Int

+

Number of times a function is throttled when invoked

+

package-functionname

+

duration

+

Average Duration

+

Average time a function is invoked

+

ms

+

-

+

0

+

-

+

Int

+

Average time a function is invoked

+

package-functionname

+

maxDuration

+

Maximum Duration

+

Maximum time a function is invoked

+

ms

+

-

+

0

+

-

+

Int

+

Maximum time a function is invoked

+

package-functionname

+

minDuration

+

Minimum Duration

+

Minimum time a function is invoked

+

ms

+

-

+

0

+

-

+

Int

+

Minimum time a function is invoked

+

package-functionname

+
+
+
+

Dimension

+
+ + + + + + + +
Table 2 Dimension

Key

+

Value

+

package-functionname

+

App_name-Function_name

+
+
+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1500.html b/docs/fg/api-ref/functiongraph_06_1500.html new file mode 100644 index 00000000..8e7b6ca8 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1500.html @@ -0,0 +1,77 @@ + + +

API Overview

+

FunctionGraph provides developers and partners with open APIs for development, deployment, hosting, and O&M, helping users quickly implement service innovations at low costs and shorten the rollout period of applications.

+

FunctionGraph provides the following types of APIs:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1 API overview

Type

+

Description

+

Function Invocation

+

Execute functions synchronously or asynchronously and return reserved instance IDs.

+

Function Quotas

+

Query quotas.

+

Dependencies

+

Create, delete, query, and update dependencies.

+

Test Events

+

Create, delete, query, and update test events.

+

Function Lifecycle Management

+

Create and delete functions.

+

Versions and Aliases

+

Create and delete function versions and aliases.

+

Function Metrics

+

Query function statistics, top functions for a specified metric, and metrics in a specified period.

+

Function Logs

+

Query a function's log group and log stream, and enable log reporting to LTS.

+

Reserved Instances

+

Query reserved instances and change their number.

+

Function Import and Export

+

Import and export functions.

+

Function Triggers

+

Create, delete, and update triggers.

+

Asynchronous Execution Notification

+

Query, delete, and configure asynchronous invocation notification settings.

+
+
+
+ diff --git a/docs/fg/api-ref/functiongraph_06_1600.html b/docs/fg/api-ref/functiongraph_06_1600.html new file mode 100644 index 00000000..6fd34e46 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1600.html @@ -0,0 +1,21 @@ + + +

Before You Start

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1601.html b/docs/fg/api-ref/functiongraph_06_1601.html new file mode 100644 index 00000000..cebb042a --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1601.html @@ -0,0 +1,11 @@ + + +

API Calling

+

FunctionGraph supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1602.html b/docs/fg/api-ref/functiongraph_06_1602.html new file mode 100644 index 00000000..94eb97d5 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1602.html @@ -0,0 +1,11 @@ + + +

Endpoints

+

An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1603.html b/docs/fg/api-ref/functiongraph_06_1603.html new file mode 100644 index 00000000..fbcf3bd8 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1603.html @@ -0,0 +1,11 @@ + + +

Constraints

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1604.html b/docs/fg/api-ref/functiongraph_06_1604.html new file mode 100644 index 00000000..8549c48f --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1604.html @@ -0,0 +1,18 @@ + + +

Concepts

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_06_1704.html b/docs/fg/api-ref/functiongraph_06_1704.html new file mode 100644 index 00000000..55789e21 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_06_1704.html @@ -0,0 +1,36 @@ + + +

APIs

+

+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_23_1031_01.html b/docs/fg/api-ref/functiongraph_23_1031_01.html new file mode 100644 index 00000000..058d3c08 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_23_1031_01.html @@ -0,0 +1,305 @@ + + +

Querying Function Tags

+

Function

This API is used to query function tags.

+
+

URI

GET /v2/{project_id}/{resource_type}/{resource_id}/tags

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

resource_type

+

Yes

+

String

+

Resource type. Enter functions here.

+

resource_id

+

Yes

+

String

+

Resource ID, function URN.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

tags

+

Array of KvItem objects

+

Tag list.

+

sys_tags

+

Array of KvItem objects

+

System tags.

+
+
+ +
+ + + + + + + + + + + + + +
Table 4 KvItem

Parameter

+

Type

+

Description

+

key

+

String

+

Key.

+

value

+

String

+

Value.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 5 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

This API is used to query all resource tags.

+
GET /v2/{project_id}/{resource_type}/{resource_id}/tags
+
+

Example Responses

Status code: 200

+

ok

+
{
+  "tags" : [ {
+    "key" : "xxx",
+    "value" : "yyy"
+  } ],
+  "sys_tags" : [ {
+    "key" : "_sys_enterprise_project_id",
+    "value" : "5aa119a8-d25b-45a7-8d1b-88e127885635"
+  } ]
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_23_1031_02.html b/docs/fg/api-ref/functiongraph_23_1031_02.html new file mode 100644 index 00000000..c588973a --- /dev/null +++ b/docs/fg/api-ref/functiongraph_23_1031_02.html @@ -0,0 +1,633 @@ + + +

Querying ServiceBridge Functions Bound to a Specified Function

+

Function

This API is used to query ServiceBridge functions bound to a specified function.

+
+

URI

GET /v2/{project_id}/fgs/functions/{function_urn}/servicebridge/relation

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

function_urn

+

Yes

+

String

+

Function URN. For details, see the function model description.

+
+
+ +
+ + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

type

+

No

+

String

+

ServiceBridge type.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

[items]

+

Array of ListFunctionResult objects

+

Bridge functions bound to the function.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5 ListFunctionResult

Parameter

+

Type

+

Description

+

resource_id

+

String

+

Resource ID.

+

func_urn

+

String

+

Function URN.

+

func_name

+

String

+

Function name.

+

domain_id

+

String

+

Domain ID.

+

namespace

+

String

+

Project ID.

+

project_name

+

String

+

Project name.

+

package

+

String

+

Group to which the function belongs. This field is defined to group functions.

+

runtime

+

String

+

Environment for executing a function. Options: Python2.7 Python 3.6 Python 3.9 Go 1.8 Go 1.x Java 8 Java 11 Node.js 6.10 Node.js 8.10 Node.js 10.16 Node.js 12.13 Node.js 14.18 C# (.NET Core 2.0) C# (.NET Core 2.1) C# (.NET Core 3.1) Custom PHP 7.3 HTTP Custom image-based functions

+

Enumeration values:

+
  • Java8
  • Java11
  • Node.js6.10
  • Node.js8.10
  • Node.js10.16
  • Node.js12.13
  • Node.js14.18
  • Python2.7
  • Python3.6
  • Go1.8
  • Go1.x
  • C#(.NET Core 2.0)
  • C#(.NET Core 2.1)
  • C#(.NET Core 3.1)
  • Custom
  • PHP7.3
  • Python3.9
  • http
  • Custom Image
+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

handler

+

String

+

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

+

For example, for Node.js function myfunction.handler, the file name is myfunction.js, and the handler function is handler.

+

memory_size

+

Integer

+

Memory consumed by a function.

+

Unit: MB.

+

The value can be 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584 or 4096.

+

The value ranges from 128 to 4096.

+

gpu_memory

+

Integer

+

GPU memory. This parameter is available only for functions created with a custom runtime or image. Unit: MB. Options: 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, 9216, 10,240, 11,264, 12,288, 13,312, 14,336, 15,360, and 16,384. Range: 1024 to 16,384.

+

cpu

+

Integer

+

CPU resources of a function. Unit: millicore (1 core = 1000 millicores). The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory.

+

code_type

+

String

+

Function code type. Options: inline: inline code zip: ZIP file obs: function code stored in an OBS bucket jar: JAR file, mainly for Java functions Custom-Image-Swr: The function code comes from the SWR custom image.

+

Enumeration values:

+
  • inline
  • zip
  • obs
  • jar
  • Custom-Image-Swr
+

code_url

+

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.

+

code_filename

+

String

+

Name of a function file. This parameter is mandatory only when CodeType is set to jar or zip.

+

code_size

+

Long

+

Code size in bytes.

+

user_data

+

String

+

Name/Value information defined for the function. These are parameters used in the function. For example, if a function needs to access a host, define Host={host_ip}. You can define a maximum of 20 such parameters, and their total length cannot exceed 4 KB.

+

encrypted_user_data

+

String

+

User-defined name/value to be encrypted.

+

digest

+

String

+

SHA512 hash value of function code, which is used to determine whether the function has changed.

+

version

+

String

+

Function version.

+

image_name

+

String

+

Internal identifier of a function version.

+

xrole

+

String

+

Agency used by the function. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

app_xrole

+

String

+

Agency used by the function app. You need to create an agency on the IAM console. This field is mandatory when a function needs to access other services.

+

description

+

String

+

Function description.

+

last_modified

+

String

+

Time when the function was last updated.

+

func_vpc_id

+

String

+

VPC ID.

+

strategy_config

+

StrategyConfig object

+

Function policy configuration.

+

extend_config

+

String

+

Extended configuration.

+

initializer_handler

+

String

+

Initializer of the function in the format of "xx.xx". It must contain a period (.). This parameter is mandatory when the initialization function is configured. For example, for Node.js function myfunction.initializer, the file name is myfunction.js, and the initialization function is initializer.

+

initializer_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–300s. This parameter is mandatory when the initialization function is configured.

+

pre_stop_handler

+

String

+

The pre-stop handler of a function. The value must contain a period (.) in the format of xx.xx. For example, for Node.js function myfunction.pre_stop_handler, the file name is myfunction.js, and the initialization function is pre_stop_handler.

+

pre_stop_timeout

+

Integer

+

Maximum duration the function can be initialized. Value range: 1s–90s.

+

enterprise_project_id

+

String

+

Enterprise project ID. This parameter is mandatory if you create a function as an enterprise user.

+

long_time

+

Boolean

+

Whether to allow a long timeout.

+

log_group_id

+

String

+

Log group ID.

+

log_stream_id

+

String

+

Log stream ID.

+

type

+

String

+

v2 indicates an official version, and v1 indicates a deprecated version.

+

Enumeration values:

+
  • v1
  • v2
+

is_bridge_function

+

Boolean

+

Whether this is a bridge function.

+

bind_bridge_funcUrns

+

Array of strings

+

URNs bound to the bridge function.

+
+
+ +
+ + + + + + + + + + + + + +
Table 6 StrategyConfig

Parameter

+

Type

+

Description

+

concurrency

+

Integer

+

Maximum number of instances for a single function. For v1, the value can be 0 or –1; for v2, it ranges from –1 to 1000.

+
  • -1: The function has unlimited instances.
  • 0: The function is disabled.
+

concurrent_num

+

Integer

+

Number of concurrent requests per instance. This parameter is supported only by v2. The value ranges from 1 to 1,000.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query ServiceBridge functions bound to a specified function.

+
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/servicebridge/relation?type=rds
+
+

Example Responses

Status code: 200

+

ok

+
[ {
+  "func_urn" : "urn:fss:xxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test",
+  "func_name" : "bridge-test",
+  "domain_id" : "cff01_hk",
+  "namespace" : "7aad83af3e8d42e99ac194e8419e2c9b",
+  "project_name" : "xxxxxxxx",
+  "package" : "default",
+  "runtime" : "Node.js6.10",
+  "timeout" : 3,
+  "handler" : "test.handler",
+  "memory_size" : 128,
+  "cpu" : 300,
+  "code_type" : "inline",
+  "code_filename" : "index.js",
+  "code_size" : 272,
+  "digest" : "decbce6939297b0b5ec6d1a23bf9c725870f5e69fc338a89a6a4029264688dc26338f56d08b6535de47f15ad538e22ca66613b9a46f807d50b687bb53fded1c6",
+  "version" : "latest",
+  "xrole" : "cff",
+  "image_name" : "latest-191025153727@zehht",
+  "last_modified" : "2019-10-25 15:37:27",
+  "strategy_config" : {
+    "concurrency" : 0
+  },
+  "initializer_handler" : "index.initializer",
+  "initializer_timeout" : 3,
+  "pre_stop_handler" : "index.pre_stop_handler",
+  "pre_stop_timeout" : 3
+} ]
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_23_1031_03.html b/docs/fg/api-ref/functiongraph_23_1031_03.html new file mode 100644 index 00000000..b502639a --- /dev/null +++ b/docs/fg/api-ref/functiongraph_23_1031_03.html @@ -0,0 +1,304 @@ + + +

Querying the Available ServiceBridge Version

+

Function

This API is used to query the available ServiceBridge version.

+
+

URI

GET /v2/{project_id}/fgs/servicebridge/version

+ +
+ + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+
+
+ +
+ + + + + + + + + + + +
Table 2 Query Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

type

+

Yes

+

String

+

ServiceBridge type. The value can be rds, mqs, or cache.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 3 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + +
Table 4 Response body parameters

Parameter

+

Type

+

Description

+

[items]

+

Array of ServiceBridgeVersion objects

+
+
+ +
+ + + + + + + + + + + + + + + + + +
Table 5 ServiceBridgeVersion

Parameter

+

Type

+

Description

+

name

+

String

+

Code package name.

+

version

+

String

+

Code version.

+

code_url

+

String

+

OBS path where the code is stored.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query the available version of the ServiceBridge function of the rds type.

+
GET https://{Endpoint}/v2/{project_id}/fgs/servicebridge/version?type=rds
+
+

Example Responses

Status code: 200

+

ok

+
[ {
+  "name" : "xxx",
+  "version" : "xxx",
+  "code_url" : "xxx"
+} ]
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_23_1031_04.html b/docs/fg/api-ref/functiongraph_23_1031_04.html new file mode 100644 index 00000000..3b97162f --- /dev/null +++ b/docs/fg/api-ref/functiongraph_23_1031_04.html @@ -0,0 +1,145 @@ + + +

Updating the Pinning Status of a Function

+

Function

This API is used to update the pinning status of a function.

+
+

URI

PUT /v2/{project_id}/fgs/functions/{func_urn}/collect/{state}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

func_urn

+

Yes

+

String

+

Function URN.

+

state

+

Yes

+

String

+

Pinning status.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Update the pinning status of a function.

+
PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/collect/true
+
+

Example Responses

None

+
+

Status Codes

+
+ + + + + + + + + + +

Status Code

+

Description

+

200

+

ok

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/functiongraph_23_1031_06.html b/docs/fg/api-ref/functiongraph_23_1031_06.html new file mode 100644 index 00000000..2efade29 --- /dev/null +++ b/docs/fg/api-ref/functiongraph_23_1031_06.html @@ -0,0 +1,506 @@ + + +

Querying a Specified Function Template

+

Function

This API is used to query a specified function template.

+
+

URI

GET /v2/{project_id}/fgs/templates/{template_id}

+ +
+ + + + + + + + + + + + + + + + +
Table 1 Path Parameters

Parameter

+

Mandatory

+

Type

+

Description

+

project_id

+

Yes

+

String

+

Project ID. For details, see Obtaining a Project ID.

+

template_id

+

Yes

+

String

+

Template ID.

+
+
+
+

Request Parameters

+
+ + + + + + + + + + + + + + + + +
Table 2 Request header parameters

Parameter

+

Mandatory

+

Type

+

Description

+

X-Auth-Token

+

Yes

+

String

+

User token.

+

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

+

Content-Type

+

Yes

+

String

+

Message body type (format).

+
+
+
+

Response Parameters

Status code: 200

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 3 Response body parameters

Parameter

+

Type

+

Description

+

id

+

String

+

Template ID.

+

type

+

Integer

+

Template type.

+

title

+

String

+

Template title.

+

template_name

+

String

+

Template name.

+

description

+

String

+

Template description.

+

runtime

+

String

+

Template runtime.

+

handler

+

String

+

Template handler.

+

code_type

+

String

+

Code type.

+

code

+

String

+

Code file.

+

timeout

+

Integer

+

Maximum duration the function can be executed. Value range: 3s–259,200s.

+

memory_size

+

Integer

+

Memory size.

+

trigger_metadata_list

+

Array of TriggerMetadataList objects

+

Trigger information.

+

temp_detail

+

TempDetail object

+

user_data

+

String

+

User data.

+

encrypted_user_data

+

String

+

Encrypted user data.

+

dependencies

+

Array of strings

+

Dependencies required by the template.

+

scene

+

String

+

Template application scenarios.

+

service

+

String

+

Cloud service associated with the template.

+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
Table 4 TriggerMetadataList

Parameter

+

Type

+

Description

+

trigger_name

+

String

+

Trigger name.

+

trigger_type

+

String

+

Trigger type.

+

event_type

+

String

+

Event type.

+

event_data

+

String

+

Event data.

+
+
+ +
+ + + + + + + + + + + + + + + + + +
Table 5 TempDetail

Parameter

+

Type

+

Description

+

input

+

String

+

Template input.

+

output

+

String

+

Template output.

+

warning

+

String

+

Warning.

+
+
+

Status code: 400

+ +
+ + + + + + + + + + + + + +
Table 6 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 401

+ +
+ + + + + + + + + + + + + +
Table 7 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 403

+ +
+ + + + + + + + + + + + + +
Table 8 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 404

+ +
+ + + + + + + + + + + + + +
Table 9 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+

Status code: 500

+ +
+ + + + + + + + + + + + + +
Table 10 Response body parameters

Parameter

+

Type

+

Description

+

error_code

+

String

+

Error code.

+

error_msg

+

String

+

Error message.

+
+
+
+

Example Requests

Query a specified function template.

+
GET /v2/{project_id}/fgs/templates/{template_id}
+
+

Example Responses

Status code: 200

+

OK

+
{
+  "id" : "d3aa6e4c-xxxx-xxxx-9c09-5c50c4xxxxxx",
+  "type" : 1,
+  "title" : "access-service-with-http",
+  "template_name" : "access-service-with-http-php",
+  "description" : "access service with http.",
+  "runtime" : "PHP7.3",
+  "handler" : "index.handler",
+  "code_type" : "inline",
+  "code" : "xxxxx",
+  "timeout" : 30,
+  "memory_size" : 256,
+  "trigger_metadata_list" : [ ],
+  "temp_detail" : {
+    "input" : "None",
+    "output" : "execution succeed: Return to access service information through http/https,",
+    "warning" : "1. configure the serveraddress environment variables."
+  },
+  "user_data" : "",
+  "encrypted_user_data" : "",
+  "dependencies" : [ ],
+  "scene" : "basic_function_usage",
+  "service" : "FunctionGraph"
+}
+

Status code: 404

+

Not found.

+
{
+  "error_code" : "FSS.1059",
+  "error_msg" : "The function template does not exist."
+}
+
+

Status Codes

+
+ + + + + + + + + + + + + + + + + + + + + + +

Status Code

+

Description

+

200

+

OK

+

400

+

Bad request.

+

401

+

Unauthorized.

+

403

+

Forbidden.

+

404

+

Not found.

+

500

+

Internal server error.

+
+
+
+

Error Codes

See Error Codes.

+
+
+
+ +
+ diff --git a/docs/fg/api-ref/public_sys-resources/caution_3.0-en-us.png b/docs/fg/api-ref/public_sys-resources/caution_3.0-en-us.png new file mode 100644 index 00000000..60f60762 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/caution_3.0-en-us.png differ diff --git a/docs/fg/api-ref/public_sys-resources/danger_3.0-en-us.png b/docs/fg/api-ref/public_sys-resources/danger_3.0-en-us.png new file mode 100644 index 00000000..47a9c723 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/danger_3.0-en-us.png differ diff --git a/docs/fg/api-ref/public_sys-resources/delta.gif b/docs/fg/api-ref/public_sys-resources/delta.gif new file mode 100644 index 00000000..0d1b1f67 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/delta.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/deltaend.gif b/docs/fg/api-ref/public_sys-resources/deltaend.gif new file mode 100644 index 00000000..cc7da0fc Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/deltaend.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-arrowdn.gif b/docs/fg/api-ref/public_sys-resources/icon-arrowdn.gif new file mode 100644 index 00000000..37942803 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-arrowdn.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-arrowrt.gif b/docs/fg/api-ref/public_sys-resources/icon-arrowrt.gif new file mode 100644 index 00000000..6aaaa11c Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-arrowrt.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-caution.gif b/docs/fg/api-ref/public_sys-resources/icon-caution.gif new file mode 100644 index 00000000..079c79b2 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-caution.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-danger.gif b/docs/fg/api-ref/public_sys-resources/icon-danger.gif new file mode 100644 index 00000000..079c79b2 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-danger.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-huawei.gif b/docs/fg/api-ref/public_sys-resources/icon-huawei.gif new file mode 100644 index 00000000..a31d60f8 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-huawei.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-note.gif b/docs/fg/api-ref/public_sys-resources/icon-note.gif new file mode 100644 index 00000000..31be2b03 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-note.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-notice.gif b/docs/fg/api-ref/public_sys-resources/icon-notice.gif new file mode 100644 index 00000000..40907065 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-notice.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-tip.gif b/docs/fg/api-ref/public_sys-resources/icon-tip.gif new file mode 100644 index 00000000..c47bae05 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-tip.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/icon-warning.gif b/docs/fg/api-ref/public_sys-resources/icon-warning.gif new file mode 100644 index 00000000..079c79b2 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/icon-warning.gif differ diff --git a/docs/fg/api-ref/public_sys-resources/note_3.0-en-us.png b/docs/fg/api-ref/public_sys-resources/note_3.0-en-us.png new file mode 100644 index 00000000..57a0e1f5 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/note_3.0-en-us.png differ diff --git a/docs/fg/api-ref/public_sys-resources/notice_3.0-en-us.png b/docs/fg/api-ref/public_sys-resources/notice_3.0-en-us.png new file mode 100644 index 00000000..fa4b6499 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/notice_3.0-en-us.png differ diff --git a/docs/fg/api-ref/public_sys-resources/warning_3.0-en-us.png b/docs/fg/api-ref/public_sys-resources/warning_3.0-en-us.png new file mode 100644 index 00000000..def5c356 Binary files /dev/null and b/docs/fg/api-ref/public_sys-resources/warning_3.0-en-us.png differ