def DescribePurgeTasks(self, request): """This API is used to query the record and progress of URL or directory purge tasks submitted via the `PurgePathCache` or `PurgeUrlsCache` APIs. :param request: Request instance for DescribePurgeTasks. :type request: :class:`tencentcloud.cdn.v20180606.models.DescribePurgeTasksRequest` :rtype: :class:`tencentcloud.cdn.v20180606.models.DescribePurgeTasksResponse` """ try: params = request._serialize() body = self.call("DescribePurgeTasks", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribePurgeTasksResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def DescribePurgeTasks(self, request): """DescribePurgeTasks 用于查询提交的 URL 刷新、目录刷新记录及执行进度,通过 PurgePathCache 与 PurgeUrlsCache 接口提交的任务均可通过此接口进行查询。 :param request: Request instance for DescribePurgeTasks. :type request: :class:`tencentcloud.cdn.v20180606.models.DescribePurgeTasksRequest` :rtype: :class:`tencentcloud.cdn.v20180606.models.DescribePurgeTasksResponse` """ try: params = request._serialize() body = self.call("DescribePurgeTasks", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribePurgeTasksResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def DescribePurgeTasks(self, request): """DescribePurgeTasks 用于查询刷新任务提交历史记录及执行进度。 :param request: 调用DescribePurgeTasks所需参数的结构体。 :type request: :class:`tencentcloud.cdn.v20180606.models.DescribePurgeTasksRequest` :rtype: :class:`tencentcloud.cdn.v20180606.models.DescribePurgeTasksResponse` """ try: params = request._serialize() body = self.call("DescribePurgeTasks", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribePurgeTasksResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)