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