/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Cws.V20180312 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Cws.V20180312.Models; public class CwsClient : AbstractClient{ private const string endpoint = "cws.tencentcloudapi.com"; private const string version = "2018-03-12"; /// /// Client constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". public CwsClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// /// Client Constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". /// Client profiles. public CwsClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// /// 本接口(CreateMonitors)用于新增一个或多个站点的监测任务。 /// /// /// public async Task CreateMonitors(CreateMonitorsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateMonitors"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateMonitors)用于新增一个或多个站点的监测任务。 /// /// /// public CreateMonitorsResponse CreateMonitorsSync(CreateMonitorsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateMonitors"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateSites)用于新增一个或多个站点。 /// /// /// public async Task CreateSites(CreateSitesRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateSites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateSites)用于新增一个或多个站点。 /// /// /// public CreateSitesResponse CreateSitesSync(CreateSitesRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateSites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateSitesScans)用于新增一个或多个站点的单次扫描任务。 /// /// /// public async Task CreateSitesScans(CreateSitesScansRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateSitesScans"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateSitesScans)用于新增一个或多个站点的单次扫描任务。 /// /// /// public CreateSitesScansResponse CreateSitesScansSync(CreateSitesScansRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateSitesScans"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateVulsMisinformation)可以用于新增一个或多个漏洞误报信息。 /// /// /// public async Task CreateVulsMisinformation(CreateVulsMisinformationRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateVulsMisinformation"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口(CreateVulsMisinformation)可以用于新增一个或多个漏洞误报信息。 /// /// /// public CreateVulsMisinformationResponse CreateVulsMisinformationSync(CreateVulsMisinformationRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateVulsMisinformation"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (CreateVulsReport) 用于生成漏洞报告并返回下载链接。 /// /// /// public async Task CreateVulsReport(CreateVulsReportRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateVulsReport"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (CreateVulsReport) 用于生成漏洞报告并返回下载链接。 /// /// /// public CreateVulsReportResponse CreateVulsReportSync(CreateVulsReportRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateVulsReport"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DeleteMonitors) 用于删除用户监控任务。 /// /// /// public async Task DeleteMonitors(DeleteMonitorsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeleteMonitors"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DeleteMonitors) 用于删除用户监控任务。 /// /// /// public DeleteMonitorsResponse DeleteMonitorsSync(DeleteMonitorsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteMonitors"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DeleteSites) 用于删除站点。 /// /// /// public async Task DeleteSites(DeleteSitesRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeleteSites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DeleteSites) 用于删除站点。 /// /// /// public DeleteSitesResponse DeleteSitesSync(DeleteSitesRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteSites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeConfig) 用于查询用户配置的详细信息。 /// /// /// public async Task DescribeConfig(DescribeConfigRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeConfig"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeConfig) 用于查询用户配置的详细信息。 /// /// /// public DescribeConfigResponse DescribeConfigSync(DescribeConfigRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeConfig"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeMonitors) 用于查询一个或多个监控任务的详细信息。 /// /// /// public async Task DescribeMonitors(DescribeMonitorsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeMonitors"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeMonitors) 用于查询一个或多个监控任务的详细信息。 /// /// /// public DescribeMonitorsResponse DescribeMonitorsSync(DescribeMonitorsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeMonitors"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeSiteQuota) 用于查询用户购买的扫描次数总数和已使用数。 /// /// /// public async Task DescribeSiteQuota(DescribeSiteQuotaRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeSiteQuota"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeSiteQuota) 用于查询用户购买的扫描次数总数和已使用数。 /// /// /// public DescribeSiteQuotaResponse DescribeSiteQuotaSync(DescribeSiteQuotaRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeSiteQuota"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeSites) 用于查询一个或多个站点的详细信息。 /// /// /// public async Task DescribeSites(DescribeSitesRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeSites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeSites) 用于查询一个或多个站点的详细信息。 /// /// /// public DescribeSitesResponse DescribeSitesSync(DescribeSitesRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeSites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeSitesVerification) 用于查询一个或多个待验证站点的验证信息。 /// /// /// public async Task DescribeSitesVerification(DescribeSitesVerificationRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeSitesVerification"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeSitesVerification) 用于查询一个或多个待验证站点的验证信息。 /// /// /// public DescribeSitesVerificationResponse DescribeSitesVerificationSync(DescribeSitesVerificationRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeSitesVerification"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeVuls) 用于查询一个或多个漏洞的详细信息。 /// /// /// public async Task DescribeVuls(DescribeVulsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeVuls"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeVuls) 用于查询一个或多个漏洞的详细信息。 /// /// /// public DescribeVulsResponse DescribeVulsSync(DescribeVulsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeVuls"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeVulsNumber) 用于查询用户网站的漏洞总计数量。 /// /// /// public async Task DescribeVulsNumber(DescribeVulsNumberRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeVulsNumber"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeVulsNumber) 用于查询用户网站的漏洞总计数量。 /// /// /// public DescribeVulsNumberResponse DescribeVulsNumberSync(DescribeVulsNumberRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeVulsNumber"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeVulsNumberTimeline) 用于查询漏洞数随时间变化统计信息。 /// /// /// public async Task DescribeVulsNumberTimeline(DescribeVulsNumberTimelineRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeVulsNumberTimeline"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (DescribeVulsNumberTimeline) 用于查询漏洞数随时间变化统计信息。 /// /// /// public DescribeVulsNumberTimelineResponse DescribeVulsNumberTimelineSync(DescribeVulsNumberTimelineRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeVulsNumberTimeline"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (ModifyConfigAttribute) 用于修改用户配置的属性。 /// /// /// public async Task ModifyConfigAttribute(ModifyConfigAttributeRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyConfigAttribute"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (ModifyConfigAttribute) 用于修改用户配置的属性。 /// /// /// public ModifyConfigAttributeResponse ModifyConfigAttributeSync(ModifyConfigAttributeRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyConfigAttribute"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (ModifyMonitorAttribute) 用于修改监测任务的属性。 /// /// /// public async Task ModifyMonitorAttribute(ModifyMonitorAttributeRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyMonitorAttribute"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (ModifyMonitorAttribute) 用于修改监测任务的属性。 /// /// /// public ModifyMonitorAttributeResponse ModifyMonitorAttributeSync(ModifyMonitorAttributeRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyMonitorAttribute"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (ModifySiteAttribute) 用于修改站点的属性。 /// /// /// public async Task ModifySiteAttribute(ModifySiteAttributeRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifySiteAttribute"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (ModifySiteAttribute) 用于修改站点的属性。 /// /// /// public ModifySiteAttributeResponse ModifySiteAttributeSync(ModifySiteAttributeRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifySiteAttribute"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (VerifySites) 用于验证一个或多个待验证站点。 /// /// /// public async Task VerifySites(VerifySitesRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "VerifySites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 本接口 (VerifySites) 用于验证一个或多个待验证站点。 /// /// /// public VerifySitesResponse VerifySitesSync(VerifySitesRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "VerifySites"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }