from pprint import pprint
import volcenginesdkcore
import volcenginesdkrdspostgresql as pg
from volcenginesdkcore.rest import ApiException
if __name__ == "__main__":
configuration = volcenginesdkcore.Configuration()
configuration.ak = "Your AK"
configuration.sk = "Your SK"
configuration.region = "Your Region"
configuration.host = "Your Host"
api_instance = pg.RDSPOSTGRESQLApi(volcenginesdkcore.ApiClient(configuration))
resp = api_instance.create_db_instance(pg.CreateDBInstanceRequest(
db_engine_version="PostgreSQL_12",
pg.NodeInfoForCreateDBInstanceInput(
node_spec="rds.postgres.1c2g",
node_operate_type="Create"
pg.NodeInfoForCreateDBInstanceInput(
node_spec="rds.postgres.1c2g",
node_operate_type="Create"
storage_type="LocalSSD",
vpc_id="vpc-2bzo8w6m87v282dx0eemg****",
subnet_id="subnet-2d6b6byrhtts058ozfenq****",
charge_info=pg.ChargeInfoForCreateDBInstanceInput(charge_type="PostPaid"),
instance_name="testname",
except ApiException as e:
print("Exception: %s\n" % e)