Setting a Shared Connection
Function
This API is used to add a shared connection.
URI
POST /v3/{project_id}/connections/share
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: The value can contain 32 characters. Only letters and digits are allowed. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
shared_conn_id |
Yes |
String |
Explanation: ID of a shared connection established between a database account and the database. The database user ID is created using the API in Creating an Instance Connection. Constraints: N/A Values: The value is a UUID containing 36 characters. Only letters, digits, and hyphens (-) are allowed. Default value: N/A |
expired_time |
No |
String |
Explanation: Expiration time Constraints: Format: yyyy-MM-ddTHH:mm:ss.SSSZ Values: N/A Default value: N/A |
users |
Yes |
Array of ShareConnUserInfo objects |
Explanation: User Constraints: Multiple values need to be separated by commas (,). Values: N/A Default value: N/A |
Response Parameters
Status code: 200
None
Example Request
Setting a shared link
POST https://{{endpoint}}/v3/{{project_id}}/connections/share { "shared_conn_id": "ee64e597-4f25-486f-bba1-0c850b3b59d6", "users": [ { "user_id": "0852a89ae180d5401f5ac00271a4a02e", "user_name": "username" } ], "expired_time": "2023-05-03T10:30:00.200Z" }
Example Response
None
Status Codes
Status Code |
Description |
---|---|
200 |
Successful request |
400 |
Bad request |
500 |
Internal server error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot