Updating a Dependency
Function
This API is used to update a dependency.
URI
PUT /v2/{project_id}/fgs/dependencies/{depend_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| depend_id | Yes | String | Dependency ID. |
| project_id | Yes | String | Tenant's project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| depend_file | No | String | When depend_type is set to zip, this parameter is required and indicates the file stream format. |
| depend_link | No | String | When depend_type is set to obs, this parameter indicates the address of the dependency stored in OBS. |
| depend_type | Yes | String | Import mode. Options: obs and zip. |
| runtime | Yes | String | Runtime. Enumeration values:
|
| name | No | String | Name of the dependency. The name 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
| Parameter | Type | Description |
|---|---|---|
| id | String | Dependency ID. |
| owner | String | Dependency owner. |
| link | String | URL of the dependency in the OBS console. |
| runtime | String | Runtime. |
| etag | String | Unique ID of the dependency. |
| size | Long | Size of the dependency. |
| name | String | Name of the dependency. |
| description | String | Description of the dependency. |
| file_name | String | File name of the dependency. |
Example Requests
PUT https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/dependencies/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3 Example Responses
Status code: 200
ok
{
"id" : "4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3",
"owner" : "*****",
"link" : "https://***.obs.cn-north-1.myhuaweicloud.com/depends/****/4f4ae4eb-dcdc-4dd3-bffd-79600bd972b3.zip",
"runtime" : "Python3.6",
"etag" : "83863be4b6c3a86aef995dbc83aae68f",
"size" : 577118,
"name" : "python-kafka",
"description" : "kafka lib of python",
"file_name" : "python-kafka.zip"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | ok |
Error Codes
See Error Codes.
Last Article: Obtaining a Specified Dependency
Next Article: Obtaining Test Events
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.