Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

create_db_instance_account

Create new user accounts for Alibaba Cloud RDS database instances to manage access permissions and authentication for database operations.

Instructions

Create a new account for an RDS instance.
Args:
    region_id: The region ID of the RDS instance.
    db_instance_id: The ID of the RDS instance.
    account_name: The name of the new account.
    account_password: The password for the new account.
    account_description: The description for the new account.
    account_type: The type of the new account. (e.g. Normal,Super)
Returns:
     dict[str, Any]: The response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
db_instance_idYes
account_nameYes
account_passwordYes
account_descriptionNo
account_typeNoNormal

Implementation Reference

  • The main handler function that implements the 'create_db_instance_account' MCP tool. It uses the Alibaba Cloud RDS OpenAPI client to create a database account on a specified DB instance.
    @mcp.tool()
    async def create_db_instance_account(
            region_id: str,
            db_instance_id: str,
            account_name: str,
            account_password: str,
            account_description: str = None,
            account_type: str = "Normal"
    ) -> dict:
        """
        Create a new account for an RDS instance.
        Args:
            region_id: The region ID of the RDS instance.
            db_instance_id: The ID of the RDS instance.
            account_name: The name of the new account.
            account_password: The password for the new account.
            account_description: The description for the new account.
            account_type: The type of the new account. (e.g. Normal,Super)
        Returns:
             dict[str, Any]: The response.
        """
        try:
            client = get_rds_client(region_id)
            request = rds_20140815_models.CreateAccountRequest(
                dbinstance_id=db_instance_id,
                account_name=account_name,
                account_password=account_password,
                account_description=account_description,
                account_type=account_type
            )
            response = await client.create_account_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