Skip to main content
Glama

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

allocate_instance_public_connection

Assign a public connection to an Alibaba Cloud RDS instance by specifying the region, instance ID, and connection string prefix. Returns the configured connection details.

Instructions

allocate db instance public connection. Args: region_id: The region ID of the RDS instance. db_instance_id: The ID of the RDS instance. connection_string_prefix: The prefix of connection string. Returns: dict[str, Any]: The response.

Input Schema

NameRequiredDescriptionDefault
connection_string_prefixNo
db_instance_idYes
portNo3306
region_idYes

Input Schema (JSON Schema)

{ "properties": { "connection_string_prefix": { "default": null, "title": "Connection String Prefix", "type": "string" }, "db_instance_id": { "title": "Db Instance Id", "type": "string" }, "port": { "default": "3306", "title": "Port", "type": "string" }, "region_id": { "title": "Region Id", "type": "string" } }, "required": [ "region_id", "db_instance_id" ], "title": "allocate_instance_public_connectionArguments", "type": "object" }

Implementation Reference

  • The main handler function that implements the 'allocate_instance_public_connection' tool. It uses the Alibaba Cloud RDS SDK to create a public connection for the specified DB instance, handling parameters like connection string prefix and port.
    @mcp.tool() async def allocate_instance_public_connection( region_id: str, db_instance_id: str, connection_string_prefix: str = None, port: str = '3306' ): """ allocate db instance public connection. Args: region_id: The region ID of the RDS instance. db_instance_id: The ID of the RDS instance. connection_string_prefix: The prefix of connection string. Returns: dict[str, Any]: The response. """ try: if connection_string_prefix is None: connection_string_prefix = db_instance_id + "-public" client = get_rds_client(region_id) request = rds_20140815_models.AllocateInstancePublicConnectionRequest( dbinstance_id=db_instance_id, connection_string_prefix=connection_string_prefix, port=port ) response = await client.allocate_instance_public_connection_async(request) return response.body.to_map() except Exception as e: raise e

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliyun/alibabacloud-rds-openapi-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server