Ejemplo n.º 1
0
        /// <summary>
        /// 创建udb实例(包括mysql、mongodb实例和从备份恢复实例)
        /// </summary>
        /// <param name="requestParams">请求参数.</param>
        /// <returns>返回对象<see cref="UCloudSDK.Models.CreateUDBInstanceResponse"/></returns>
        public CreateUDBInstanceResponse CreateUDBInstance(CreateUDBInstanceRequest requestParams)
        {
            var request = new RestRequest(Method.GET);

            request.AddUObject(requestParams);
            return(Execute <CreateUDBInstanceResponse>(request));
        }
Ejemplo n.º 2
0
        public void CreateMDBInstanceTest()
        {
            var entity = new CreateUDBInstanceRequest(Config.region, "mongodb-2.6", "ICYMGDB", "ulv76dr19s", 3306, 3, 600, 20);

            entity.ChargeType = "Month";
            var response = udb.CreateUDBInstance(entity);

            Assert.AreEqual(response.RetCode, 0);
        }