def OpenDBExtranetAccess(self, request): """本接口(OpenDBExtranetAccess)用于开通云数据库实例的外网访问。开通外网访问后,您可通过外网域名和端口访问实例,可使用查询实例列表接口获取外网域名和端口信息。 :param request: 调用OpenDBExtranetAccess所需参数的结构体。 :type request: :class:`tencentcloud.mariadb.v20170312.models.OpenDBExtranetAccessRequest` :rtype: :class:`tencentcloud.mariadb.v20170312.models.OpenDBExtranetAccessResponse` """ try: params = request._serialize() body = self.call("OpenDBExtranetAccess", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.OpenDBExtranetAccessResponse() 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 e else: raise TencentCloudSDKException(e.message, e.message)
def OpenDBExtranetAccess(self, request): """This API is used to enable public network access for a TencentDB instance. After that, you can access the instance with the public domain name and port obtained through the `DescribeDCDBInstances` API. :param request: Request instance for OpenDBExtranetAccess. :type request: :class:`tencentcloud.mariadb.v20170312.models.OpenDBExtranetAccessRequest` :rtype: :class:`tencentcloud.mariadb.v20170312.models.OpenDBExtranetAccessResponse` """ try: params = request._serialize() body = self.call("OpenDBExtranetAccess", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.OpenDBExtranetAccessResponse() 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)