Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

allocate_instance_public_connection

Assign a public connection endpoint to an Alibaba Cloud RDS database instance, enabling external access with a specified connection string prefix.

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

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
db_instance_idYes
connection_string_prefixNo
portNo3306

Implementation Reference

  • The main handler function for the 'allocate_instance_public_connection' tool. It allocates a public network connection to the specified RDS instance using the Alibaba Cloud RDS SDK.
    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