def CloseDBExtranetAccess(self, request): """本接口(CloseDBExtranetAccess)用于关闭云数据库实例的外网访问。关闭外网访问后,外网地址将不可访问,查询实例列表接口将不返回对应实例的外网域名和端口信息。 :param request: Request instance for CloseDBExtranetAccess. :type request: :class:`tencentcloud.dcdb.v20180411.models.CloseDBExtranetAccessRequest` :rtype: :class:`tencentcloud.dcdb.v20180411.models.CloseDBExtranetAccessResponse` """ try: params = request._serialize() body = self.call("CloseDBExtranetAccess", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CloseDBExtranetAccessResponse() 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 CloseDBExtranetAccess(self, request): """This API is used to disable public network access for a TencentDB instance, which will make the public IP address inaccessible. The `DescribeDCDBInstances` API will not return the public domain name and port information of the corresponding instance. :param request: Request instance for CloseDBExtranetAccess. :type request: :class:`tencentcloud.dcdb.v20180411.models.CloseDBExtranetAccessRequest` :rtype: :class:`tencentcloud.dcdb.v20180411.models.CloseDBExtranetAccessResponse` """ try: params = request._serialize() body = self.call("CloseDBExtranetAccess", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CloseDBExtranetAccessResponse() 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)