示例#1
0
        public void TestDescribeSubnet()
        {
            VpcClient             vpcClient = GetVpcClient();
            DescribeSubnetRequest request   = new DescribeSubnetRequest();

            request.RegionId = "cn-north-1";
            request.SubnetId = "subnet-j0yka3pkcu";
            var result = vpcClient.DescribeSubnet(request).Result;

            _output.WriteLine(JsonConvert.SerializeObject(result));
        }
        /// <summary>
        /// 查询子网列表
        /// </summary>
        /// <param name="req"><see cref="DescribeSubnetRequest"/></param>
        /// <returns><see cref="DescribeSubnetResponse"/></returns>
        public DescribeSubnetResponse DescribeSubnetSync(DescribeSubnetRequest req)
        {
            JsonResponseModel <DescribeSubnetResponse> rsp = null;

            try
            {
                var strResp = this.InternalRequestSync(req, "DescribeSubnet");
                rsp = JsonConvert.DeserializeObject <JsonResponseModel <DescribeSubnetResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }
示例#3
0
 /// <summary>
 ///  查询子网信息详情
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public async Task <DescribeSubnetResponse> DescribeSubnet(DescribeSubnetRequest request)
 {
     return(await new DescribeSubnetExecutor().Client(this).Execute <DescribeSubnetResponse, DescribeSubnetResult, DescribeSubnetRequest>(request).ConfigureAwait(false));
 }
示例#4
0
 /// <summary>
 ///  查询子网信息详情
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public DescribeSubnetResponse DescribeSubnet(DescribeSubnetRequest request)
 {
     return(new DescribeSubnetExecutor().Client(this).Execute <DescribeSubnetResponse, DescribeSubnetResult, DescribeSubnetRequest>(request));
 }