Skip to content

Commit 68cb255

Browse files
author
wenfeng.wf
committed
Add multi zones.
1 parent 692740e commit 68cb255

File tree

1 file changed

+11
-6
lines changed
  • src/alibabacloud_rds_openapi_mcp_server

1 file changed

+11
-6
lines changed

src/alibabacloud_rds_openapi_mcp_server/server.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,11 @@ async def create_db_instance(
359359
vpc_id: str,
360360
vswitch_id: str,
361361
zone_id: str,
362+
zone_id_slave1: str = None,
363+
zone_id_slave2: str = None,
362364
security_ip_list: str = "127.0.0.1",
363365
instance_network_type: str = "VPC",
364366
pay_type: str = "Postpaid",
365-
instance_charge_type: str = None,
366367
system_db_charset: str = None,
367368
dbinstance_net_type: str = "Internet",
368369
category: str = "Basic",
@@ -385,6 +386,8 @@ async def create_db_instance(
385386
security_ip_list: IP whitelist, separated by commas. Default: "127.0.0.1".
386387
instance_network_type: Network type (Classic, VPC). Default: VPC.
387388
zone_id: Zone ID. Query available zones by `describe_available_zones`.
389+
zone_id_slave1: Slave Node1 Zone ID. Query available zones by `describe_available_zones`.
390+
zone_id_slave2: Slave Node2 Zone ID. Query available zones by `describe_available_zones`.
388391
pay_type: Payment type (Postpaid, Prepaid). Default: Postpaid.
389392
instance_charge_type: Instance charge type.
390393
system_db_charset: Character set.
@@ -419,22 +422,24 @@ async def create_db_instance(
419422
# Add optional parameters
420423
if zone_id:
421424
request.zone_id = zone_id
425+
if zone_id_slave1:
426+
request.zone_id_slave_1 = zone_id_slave1
427+
if zone_id_slave2:
428+
request.zone_id_slave_2 = zone_id_slave2
422429
if pay_type:
423430
request.pay_type = pay_type
424-
if instance_charge_type:
425-
request.instance_charge_type = instance_charge_type
426431
if system_db_charset:
427-
request.system_db_charset = system_db_charset
432+
request.system_dbcharset = system_db_charset
428433
if dbinstance_net_type:
429434
request.dbinstance_net_type = dbinstance_net_type
430435
if category:
431436
request.category = category
432437
if dbinstance_storage_type:
433438
request.dbinstance_storage_type = dbinstance_storage_type
434439
if vpc_id:
435-
request.vpc_id = vpc_id
440+
request.vpcid = vpc_id
436441
if vswitch_id:
437-
request.vswitch_id = vswitch_id
442+
request.v_switch_id = vswitch_id
438443
if private_ip_address:
439444
request.private_ip_address = private_ip_address
440445
if client_token:

0 commit comments

Comments
 (0)