|
1 | 1 | import json
|
2 | 2 | import logging
|
3 | 3 | import os
|
4 |
| -from datetime import datetime |
5 |
| -from typing import Dict, Any, List |
| 4 | +import sys |
6 | 5 |
|
| 6 | +from typing import Dict, Any, List |
7 | 7 | from alibabacloud_rds20140815 import models as rds_20140815_models
|
8 | 8 | from alibabacloud_rds20140815.client import Client as RdsClient
|
9 | 9 | from alibabacloud_tea_openapi.models import Config
|
10 | 10 | from alibabacloud_vpc20160428 import models as vpc_20160428_models
|
11 | 11 | from alibabacloud_vpc20160428.client import Client as VpcClient
|
12 | 12 | from mcp.server.fastmcp import FastMCP
|
13 |
| - |
14 |
| -from alibabacloud_rds_openapi_mcp_server.utils import transform_to_iso_8601, transform_to_datetime, transform_perf_key |
| 13 | +current_dir = os.path.dirname(os.path.abspath(__file__)) |
| 14 | +sys.path.append(current_dir) |
| 15 | +from utils import transform_to_iso_8601, transform_to_datetime, transform_perf_key |
15 | 16 |
|
16 | 17 | logger = logging.getLogger(__name__)
|
17 | 18 |
|
@@ -99,8 +100,8 @@ async def describe_db_instance_performance(region_id: str, db_instance_id: str,
|
99 | 100 | Args:
|
100 | 101 | region_id: db instance region(e.g. cn-hangzhou)
|
101 | 102 | db_instance_id: db instance id(e.g. rm-xxx)
|
102 |
| - db_type: the db instance database type(e.g. mysql\pgsql\sqlserver) |
103 |
| - perf_key: Performance Key(e.g. MemCpuUsage\QPSTPS\Sessions\COMDML\RowDML) |
| 103 | + db_type: the db instance database type(e.g. mysql,pgsql,sqlserver) |
| 104 | + perf_key: Performance Key(e.g. MemCpuUsage,QPSTPS,Sessions,COMDML,RowDML) |
104 | 105 | start_time: start time(e.g. 2023-01-01 00:00)
|
105 | 106 | end_time: end time(e.g. 2023-01-01 00:00)
|
106 | 107 | """
|
@@ -311,7 +312,7 @@ async def describe_available_classes(
|
311 | 312 | instance_charge_type (str): Instance payment type. Values: Prepaid, Postpaid, Serverless.
|
312 | 313 | engine (str): Database engine type. Values: MySQL, SQLServer, PostgreSQL, MariaDB.
|
313 | 314 | engine_version (str): Database version.
|
314 |
| - dbinstance_storage_type (str): Storage type. Values: local_ssd\general_essd\cloud_essd\cloud_essd2\cloud_essd3 |
| 315 | + dbinstance_storage_type (str): Storage type. Values: local_ssd,general_essd,cloud_essd,cloud_essd2,cloud_essd3 |
315 | 316 | category (str): Instance category. Values: Basic, HighAvailability, cluster, AlwaysOn, Finance, serverless_basic, serverless_standard, serverless_ha.
|
316 | 317 | dbinstance_id (str, optional): The ID of the RDS instance.
|
317 | 318 | order_type (str, optional): Order type. Currently only supports "BUY".
|
@@ -394,7 +395,7 @@ async def create_db_instance(
|
394 | 395 | system_db_charset (str, optional): Character set.
|
395 | 396 | dbinstance_net_type (str, optional): Network connection type (Internet, Intranet). Default: Internet.
|
396 | 397 | category (str, optional): Instance category. Default: Basic.
|
397 |
| - dbinstance_storage_type (str, optional): Storage type. (e.g. local_ssd\general_essd\cloud_essd\cloud_essd2\cloud_essd3) |
| 398 | + dbinstance_storage_type (str, optional): Storage type. (e.g. local_ssd,general_essd,cloud_essd,cloud_essd2,cloud_essd3) |
398 | 399 | vpc_id (str): VPC ID.
|
399 | 400 | vswitch_id (str): VSwitch ID.
|
400 | 401 | private_ip_address (str, optional): Private IP address.
|
|
0 commit comments