def CreateDirectConnect(self, request): """申请物理专线接入。 调用该接口时,请注意: 账号要进行实名认证,否则不允许申请物理专线; 若账户下存在欠费状态的物理专线,则不能申请更多的物理专线。 :param request: 调用CreateDirectConnect所需参数的结构体。 :type request: :class:`tencentcloud.dc.v20180410.models.CreateDirectConnectRequest` :rtype: :class:`tencentcloud.dc.v20180410.models.CreateDirectConnectResponse` """ try: params = request._serialize() body = self.call("CreateDirectConnect", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreateDirectConnectResponse() 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 CreateDirectConnect(self, request): """This API is used to apply for a connection. When calling this API, please note that: You need to complete identity verification for your account; otherwise, you cannot apply for a connection; If there is any connection in arrears under your account, you cannot apply for more connections. :param request: Request instance for CreateDirectConnect. :type request: :class:`tencentcloud.dc.v20180410.models.CreateDirectConnectRequest` :rtype: :class:`tencentcloud.dc.v20180410.models.CreateDirectConnectResponse` """ try: params = request._serialize() body = self.call("CreateDirectConnect", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.CreateDirectConnectResponse() 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)