Exemple #1
0
        /// <summary>
        /// 将防火墙应用到资源上
        /// </summary>
        /// <param name="requestParams">请求参数.</param>
        /// <returns>返回对象<see cref="UCloudSDK.Models.GrantSecurityGroupResponse"/></returns>
        public GrantSecurityGroupResponse GrantSecurityGroup(GrantSecurityGroupRequest requestParams)
        {
            var request = new RestRequest(Method.GET);

            request.AddUObject(requestParams);
            return(Execute <GrantSecurityGroupResponse>(request));
        }
Exemple #2
0
        public void GrantSecurityGroupTest()
        {
            var entity   = new GrantSecurityGroupRequest(Config.region, "15032", "UHost", Config.UhostId);
            var response = unet.GrantSecurityGroup(entity);

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