Binding the Dependent Resources
Function
This API is used to bind resources required by RES. After resources are bound, these resources can be used to perform offline, nearline, and ranking tasks.
URI
POST /v1/{project_id}/resources
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| resource | Yes | JSON | Resource information. For details, see Table 3. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Resource type. The options are DLI, DIS, and CloudTable. |
| resource_info | Yes | JSON | Resource details, JSON character string. |
Response
Example
- Example request
{ "resource":{ "type":"DLI", "resource_info":"{\"cluster_name\":\"res_cluster\"}" } } - Example of a successful response
{ "is_success": true, "message": "Succeed to register resource", } - Example of a failed response
{ "is_success": false, "error_code": "res.1001", "error_msg": "The value of request parameter(type) is invalid." }
Status Code
For details about status codes, see Status Codes.
Last Article: Platform Resource APIs
Next Article: Obtaining the Resource Lists
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.