def PurgePathCache(self, request): """PurgePathCache 用于批量刷新目录缓存,一次提交将返回一个刷新任务id。 >? 若您的业务已迁移至 CDN 控制台,请参考<a href=" https://cloud.tencent.com/document/api/570/42475"> CDN 接口文档</a>,使用 CDN 相关API 进行操作。 :param request: Request instance for PurgePathCache. :type request: :class:`tencentcloud.ecdn.v20191012.models.PurgePathCacheRequest` :rtype: :class:`tencentcloud.ecdn.v20191012.models.PurgePathCacheResponse` """ try: params = request._serialize() headers = request.headers body = self.call("PurgePathCache", params, headers=headers) response = json.loads(body) if "Error" not in response["Response"]: model = models.PurgePathCacheResponse() 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 PurgePathCache(self, request): """PurgePathCache 用于批量刷新目录缓存,一次提交将返回一个刷新任务id。 :param request: Request instance for PurgePathCache. :type request: :class:`tencentcloud.ecdn.v20191012.models.PurgePathCacheRequest` :rtype: :class:`tencentcloud.ecdn.v20191012.models.PurgePathCacheResponse` """ try: params = request._serialize() body = self.call("PurgePathCache", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.PurgePathCacheResponse() 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 PurgePathCache(self, request): """This API is used to purge cache directories in batches. One purge task ID will be returned for each submission. :param request: Request instance for PurgePathCache. :type request: :class:`tencentcloud.ecdn.v20191012.models.PurgePathCacheRequest` :rtype: :class:`tencentcloud.ecdn.v20191012.models.PurgePathCacheResponse` """ try: params = request._serialize() body = self.call("PurgePathCache", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.PurgePathCacheResponse() 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)