login_instance
Authenticate to a TDSQL-C or TDSQL database instance via Tencent Cloud DMC. Session caching avoids repeated logins for subsequent requests.
Instructions
Login to a database instance via Tencent Cloud DMC. Supports both TDSQL-C (CynosDB) and TDSQL (DCDB) instances. The session is cached - subsequent calls reuse the same token without re-login, unless the token expires.
Use find_instance_by_ip to discover the instance_id and db_type, then pass the db_type value from the search results here.
Args: instance_id: Instance ID, e.g. "cynosdbmysql-xxx" or "tdsqlshard-xxx" user: Database account name, e.g. "db_user" password: Database account password (plain text) db_type: Database type - "cynosdbmysql" (TDSQL-C) or "tdsql" (TDSQL) region_id: Region ID, default 4 (Shanghai)
Returns: Login status message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | ||
| db_type | No | cynosdbmysql | |
| password | Yes | ||
| region_id | No | ||
| instance_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |