1 Star 1 Fork 0

tencentcloud/tencentcloud-sdk-ruby

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
client.rb 85.04 KB
Copy Edit Raw Blame History
tencentcloud authored 2024-09-11 04:39 . release 3.0.903
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845
# frozen_string_literal: true
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'json'
module TencentCloud
module Dnspod
module V20210323
class Client < TencentCloud::Common::AbstractClient
def initialize(credential, region, profile = nil)
api_version = '2021-03-23'
api_endpoint = 'dnspod.tencentcloudapi.com'
sdk_version = 'DNSPOD_' + File.read(File.expand_path('../VERSION', __dir__)).strip
super(credential, region, api_version, api_endpoint, sdk_version, profile)
end
# 回滚前检查单条记录
# @param request: Request instance for CheckRecordSnapshotRollback.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CheckRecordSnapshotRollbackRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CheckRecordSnapshotRollbackResponse`
def CheckRecordSnapshotRollback(request)
body = send_request('CheckRecordSnapshotRollback', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CheckRecordSnapshotRollbackResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 快照回滚前检查
# @param request: Request instance for CheckSnapshotRollback.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CheckSnapshotRollbackRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CheckSnapshotRollbackResponse`
def CheckSnapshotRollback(request)
body = send_request('CheckSnapshotRollback', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CheckSnapshotRollbackResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# DNSPod商品下单
# @param request: Request instance for CreateDeal.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateDealRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateDealResponse`
def CreateDeal(request)
body = send_request('CreateDeal', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDealResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 添加域名
# @param request: Request instance for CreateDomain.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateDomainRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateDomainResponse`
def CreateDomain(request)
body = send_request('CreateDomain', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDomainResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 创建域名别名
# @param request: Request instance for CreateDomainAlias.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateDomainAliasRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateDomainAliasResponse`
def CreateDomainAlias(request)
body = send_request('CreateDomainAlias', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDomainAliasResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 批量添加域名
# @param request: Request instance for CreateDomainBatch.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateDomainBatchRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateDomainBatchResponse`
def CreateDomainBatch(request)
body = send_request('CreateDomainBatch', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDomainBatchResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 创建域名的自定义线路
# @param request: Request instance for CreateDomainCustomLine.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateDomainCustomLineRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateDomainCustomLineResponse`
def CreateDomainCustomLine(request)
body = send_request('CreateDomainCustomLine', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDomainCustomLineResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 创建域名分组
# @param request: Request instance for CreateDomainGroup.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateDomainGroupRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateDomainGroupResponse`
def CreateDomainGroup(request)
body = send_request('CreateDomainGroup', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateDomainGroupResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 添加记录
# 备注:新添加的解析记录存在短暂的索引延迟,如果查询不到新增记录,请在 30 秒后重试
# @param request: Request instance for CreateRecord.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateRecordRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateRecordResponse`
def CreateRecord(request)
body = send_request('CreateRecord', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateRecordResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 批量添加记录
# @param request: Request instance for CreateRecordBatch.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateRecordBatchRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateRecordBatchResponse`
def CreateRecordBatch(request)
body = send_request('CreateRecordBatch', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateRecordBatchResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 添加记录分组
# @param request: Request instance for CreateRecordGroup.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateRecordGroupRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateRecordGroupResponse`
def CreateRecordGroup(request)
body = send_request('CreateRecordGroup', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateRecordGroupResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 创建快照
# @param request: Request instance for CreateSnapshot.
# @type request: :class:`Tencentcloud::dnspod::V20210323::CreateSnapshotRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::CreateSnapshotResponse`
def CreateSnapshot(request)
body = send_request('CreateSnapshot', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = CreateSnapshotResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 删除域名
# @param request: Request instance for DeleteDomain.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainResponse`
def DeleteDomain(request)
body = send_request('DeleteDomain', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteDomainResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 删除域名别名
# @param request: Request instance for DeleteDomainAlias.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainAliasRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainAliasResponse`
def DeleteDomainAlias(request)
body = send_request('DeleteDomainAlias', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteDomainAliasResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 批量删除域名
# @param request: Request instance for DeleteDomainBatch.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainBatchRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainBatchResponse`
def DeleteDomainBatch(request)
body = send_request('DeleteDomainBatch', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteDomainBatchResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 删除域名的自定义线路
# @param request: Request instance for DeleteDomainCustomLine.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainCustomLineRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteDomainCustomLineResponse`
def DeleteDomainCustomLine(request)
body = send_request('DeleteDomainCustomLine', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteDomainCustomLineResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 删除记录
# @param request: Request instance for DeleteRecord.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteRecordRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteRecordResponse`
def DeleteRecord(request)
body = send_request('DeleteRecord', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteRecordResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 批量删除解析记录
# 备注:因存储限制, 建议一次批量删除最多2000条
# @param request: Request instance for DeleteRecordBatch.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteRecordBatchRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteRecordBatchResponse`
def DeleteRecordBatch(request)
body = send_request('DeleteRecordBatch', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteRecordBatchResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 删除记录分组
# @param request: Request instance for DeleteRecordGroup.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteRecordGroupRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteRecordGroupResponse`
def DeleteRecordGroup(request)
body = send_request('DeleteRecordGroup', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteRecordGroupResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 按账号删除域名共享
# @param request: Request instance for DeleteShareDomain.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteShareDomainRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteShareDomainResponse`
def DeleteShareDomain(request)
body = send_request('DeleteShareDomain', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteShareDomainResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 删除快照
# @param request: Request instance for DeleteSnapshot.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DeleteSnapshotRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DeleteSnapshotResponse`
def DeleteSnapshot(request)
body = send_request('DeleteSnapshot', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DeleteSnapshotResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取任务详情
# @param request: Request instance for DescribeBatchTask.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeBatchTaskRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeBatchTaskResponse`
def DescribeBatchTask(request)
body = send_request('DescribeBatchTask', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeBatchTaskResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名信息
# @param request: Request instance for DescribeDomain.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainResponse`
def DescribeDomain(request)
body = send_request('DescribeDomain', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名别名列表
# @param request: Request instance for DescribeDomainAliasList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainAliasListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainAliasListResponse`
def DescribeDomainAliasList(request)
body = send_request('DescribeDomainAliasList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainAliasListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 统计各个域名的解析量,帮助您了解流量情况、时间段分布。支持查看近 3 个月内的统计情况
# @param request: Request instance for DescribeDomainAnalytics.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainAnalyticsRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainAnalyticsResponse`
def DescribeDomainAnalytics(request)
body = send_request('DescribeDomainAnalytics', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainAnalyticsResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名的自定义线路列表
# @param request: Request instance for DescribeDomainCustomLineList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainCustomLineListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainCustomLineListResponse`
def DescribeDomainCustomLineList(request)
body = send_request('DescribeDomainCustomLineList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainCustomLineListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名筛选列表
# 备注:新添加的解析记录存在短暂的索引延迟,如果查询不到新增记录,请在 30 秒后重试
# @param request: Request instance for DescribeDomainFilterList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainFilterListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainFilterListResponse`
def DescribeDomainFilterList(request)
body = send_request('DescribeDomainFilterList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainFilterListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名分组列表
# @param request: Request instance for DescribeDomainGroupList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainGroupListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainGroupListResponse`
def DescribeDomainGroupList(request)
body = send_request('DescribeDomainGroupList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainGroupListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名列表
# @param request: Request instance for DescribeDomainList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainListResponse`
def DescribeDomainList(request)
body = send_request('DescribeDomainList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名日志
# @param request: Request instance for DescribeDomainLogList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainLogListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainLogListResponse`
def DescribeDomainLogList(request)
body = send_request('DescribeDomainLogList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainLogListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名概览信息
# @param request: Request instance for DescribeDomainPreview.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainPreviewRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainPreviewResponse`
def DescribeDomainPreview(request)
body = send_request('DescribeDomainPreview', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainPreviewResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名权限
# @param request: Request instance for DescribeDomainPurview.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainPurviewRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainPurviewResponse`
def DescribeDomainPurview(request)
body = send_request('DescribeDomainPurview', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainPurviewResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名共享信息
# @param request: Request instance for DescribeDomainShareInfo.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainShareInfoRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainShareInfoResponse`
def DescribeDomainShareInfo(request)
body = send_request('DescribeDomainShareInfo', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainShareInfoResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取指定域名的已共享列表
# @param request: Request instance for DescribeDomainShareUserList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainShareUserListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainShareUserListResponse`
def DescribeDomainShareUserList(request)
body = send_request('DescribeDomainShareUserList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainShareUserListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名Whois信息
# @param request: Request instance for DescribeDomainWhois.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainWhoisRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeDomainWhoisResponse`
def DescribeDomainWhois(request)
body = send_request('DescribeDomainWhois', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeDomainWhoisResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取各套餐配置详情
# @param request: Request instance for DescribePackageDetail.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribePackageDetailRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribePackageDetailResponse`
def DescribePackageDetail(request)
body = send_request('DescribePackageDetail', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribePackageDetailResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取记录信息
# @param request: Request instance for DescribeRecord.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordResponse`
def DescribeRecord(request)
body = send_request('DescribeRecord', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 判断是否有除系统默认的@-NS记录之外的记录存在
# @param request: Request instance for DescribeRecordExistExceptDefaultNS.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordExistExceptDefaultNSRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordExistExceptDefaultNSResponse`
def DescribeRecordExistExceptDefaultNS(request)
body = send_request('DescribeRecordExistExceptDefaultNS', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordExistExceptDefaultNSResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取某个域名下的解析记录列表
# 备注:
# 1. 新添加的解析记录存在短暂的索引延迟,如果查询不到新增记录,请在 30 秒后重试
# 2. API获取的记录总条数会比控制台多2条,原因是: 为了防止用户误操作导致解析服务不可用,对2021-10-29 14:24:26之后添加的域名,在控制台都不显示这2条NS记录。
# @param request: Request instance for DescribeRecordFilterList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordFilterListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordFilterListResponse`
def DescribeRecordFilterList(request)
body = send_request('DescribeRecordFilterList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordFilterListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 查询解析记录分组列表
# @param request: Request instance for DescribeRecordGroupList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordGroupListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordGroupListResponse`
def DescribeRecordGroupList(request)
body = send_request('DescribeRecordGroupList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordGroupListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 按分类返回线路列表
# @param request: Request instance for DescribeRecordLineCategoryList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordLineCategoryListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordLineCategoryListResponse`
def DescribeRecordLineCategoryList(request)
body = send_request('DescribeRecordLineCategoryList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordLineCategoryListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取等级允许的线路
# @param request: Request instance for DescribeRecordLineList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordLineListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordLineListResponse`
def DescribeRecordLineList(request)
body = send_request('DescribeRecordLineList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordLineListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取某个域名下的解析记录列表
# 备注:
# 1. 新添加的解析记录存在短暂的索引延迟,如果查询不到新增记录,请在 30 秒后重试
# 2. API获取的记录总条数会比控制台多2条,原因是: 为了防止用户误操作导致解析服务不可用,对2021-10-29 14:24:26之后添加的域名,在控制台都不显示这2条NS记录。
# @param request: Request instance for DescribeRecordList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordListResponse`
def DescribeRecordList(request)
body = send_request('DescribeRecordList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 查询解析记录重新回滚的结果
# @param request: Request instance for DescribeRecordSnapshotRollbackResult.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordSnapshotRollbackResultRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordSnapshotRollbackResultResponse`
def DescribeRecordSnapshotRollbackResult(request)
body = send_request('DescribeRecordSnapshotRollbackResult', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordSnapshotRollbackResultResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取等级允许的记录类型
# @param request: Request instance for DescribeRecordType.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordTypeRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeRecordTypeResponse`
def DescribeRecordType(request)
body = send_request('DescribeRecordType', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeRecordTypeResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 查询解析快照配置
# @param request: Request instance for DescribeSnapshotConfig.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotConfigRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotConfigResponse`
def DescribeSnapshotConfig(request)
body = send_request('DescribeSnapshotConfig', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeSnapshotConfigResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 查询快照列表
# @param request: Request instance for DescribeSnapshotList.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotListRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotListResponse`
def DescribeSnapshotList(request)
body = send_request('DescribeSnapshotList', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeSnapshotListResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 查询快照回滚结果
# @param request: Request instance for DescribeSnapshotRollbackResult.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotRollbackResultRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotRollbackResultResponse`
def DescribeSnapshotRollbackResult(request)
body = send_request('DescribeSnapshotRollbackResult', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeSnapshotRollbackResultResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 查询最近一次回滚
# @param request: Request instance for DescribeSnapshotRollbackTask.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotRollbackTaskRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeSnapshotRollbackTaskResponse`
def DescribeSnapshotRollbackTask(request)
body = send_request('DescribeSnapshotRollbackTask', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeSnapshotRollbackTaskResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 统计子域名的解析量,帮助您了解流量情况、时间段分布。支持查看近 3 个月内的统计情况。仅付费套餐域名可用。
# @param request: Request instance for DescribeSubdomainAnalytics.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeSubdomainAnalyticsRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeSubdomainAnalyticsResponse`
def DescribeSubdomainAnalytics(request)
body = send_request('DescribeSubdomainAnalytics', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeSubdomainAnalyticsResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取账户信息
# @param request: Request instance for DescribeUserDetail.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeUserDetailRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeUserDetailResponse`
def DescribeUserDetail(request)
body = send_request('DescribeUserDetail', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeUserDetailResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 获取域名增值服务用量
# @param request: Request instance for DescribeVASStatistic.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DescribeVASStatisticRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DescribeVASStatisticResponse`
def DescribeVASStatistic(request)
body = send_request('DescribeVASStatistic', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeVASStatisticResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 下载快照
# @param request: Request instance for DownloadSnapshot.
# @type request: :class:`Tencentcloud::dnspod::V20210323::DownloadSnapshotRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::DownloadSnapshotResponse`
def DownloadSnapshot(request)
body = send_request('DownloadSnapshot', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DownloadSnapshotResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改域名的自定义线路
# @param request: Request instance for ModifyDomainCustomLine.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainCustomLineRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainCustomLineResponse`
def ModifyDomainCustomLine(request)
body = send_request('ModifyDomainCustomLine', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainCustomLineResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 锁定域名
# @param request: Request instance for ModifyDomainLock.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainLockRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainLockResponse`
def ModifyDomainLock(request)
body = send_request('ModifyDomainLock', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainLockResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 域名过户
# @param request: Request instance for ModifyDomainOwner.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainOwnerRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainOwnerResponse`
def ModifyDomainOwner(request)
body = send_request('ModifyDomainOwner', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainOwnerResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 设置域名备注
# @param request: Request instance for ModifyDomainRemark.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainRemarkRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainRemarkResponse`
def ModifyDomainRemark(request)
body = send_request('ModifyDomainRemark', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainRemarkResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改域名状态
# @param request: Request instance for ModifyDomainStatus.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainStatusRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainStatusResponse`
def ModifyDomainStatus(request)
body = send_request('ModifyDomainStatus', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainStatusResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改域名所属分组
# @param request: Request instance for ModifyDomainToGroup.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainToGroupRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainToGroupResponse`
def ModifyDomainToGroup(request)
body = send_request('ModifyDomainToGroup', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainToGroupResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 域名锁定解锁
# @param request: Request instance for ModifyDomainUnlock.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainUnlockRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDomainUnlockResponse`
def ModifyDomainUnlock(request)
body = send_request('ModifyDomainUnlock', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDomainUnlockResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 更新动态 DNS 记录
# @param request: Request instance for ModifyDynamicDNS.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyDynamicDNSRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyDynamicDNSResponse`
def ModifyDynamicDNS(request)
body = send_request('ModifyDynamicDNS', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyDynamicDNSResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# DNS 解析套餐自动续费设置
# @param request: Request instance for ModifyPackageAutoRenew.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyPackageAutoRenewRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyPackageAutoRenewResponse`
def ModifyPackageAutoRenew(request)
body = send_request('ModifyPackageAutoRenew', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyPackageAutoRenewResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改记录
# @param request: Request instance for ModifyRecord.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordResponse`
def ModifyRecord(request)
body = send_request('ModifyRecord', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 批量修改记录
# @param request: Request instance for ModifyRecordBatch.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordBatchRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordBatchResponse`
def ModifyRecordBatch(request)
body = send_request('ModifyRecordBatch', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordBatchResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改记录可选字段
# @param request: Request instance for ModifyRecordFields.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordFieldsRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordFieldsResponse`
def ModifyRecordFields(request)
body = send_request('ModifyRecordFields', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordFieldsResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改记录分组
# @param request: Request instance for ModifyRecordGroup.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordGroupRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordGroupResponse`
def ModifyRecordGroup(request)
body = send_request('ModifyRecordGroup', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordGroupResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 设置记录备注
# @param request: Request instance for ModifyRecordRemark.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordRemarkRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordRemarkResponse`
def ModifyRecordRemark(request)
body = send_request('ModifyRecordRemark', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordRemarkResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改解析记录的状态
# @param request: Request instance for ModifyRecordStatus.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordStatusRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordStatusResponse`
def ModifyRecordStatus(request)
body = send_request('ModifyRecordStatus', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordStatusResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 将记录添加到分组
# @param request: Request instance for ModifyRecordToGroup.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordToGroupRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyRecordToGroupResponse`
def ModifyRecordToGroup(request)
body = send_request('ModifyRecordToGroup', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyRecordToGroupResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 修改快照配置
# @param request: Request instance for ModifySnapshotConfig.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifySnapshotConfigRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifySnapshotConfigResponse`
def ModifySnapshotConfig(request)
body = send_request('ModifySnapshotConfig', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifySnapshotConfigResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 暂停子域名的解析记录
# @param request: Request instance for ModifySubdomainStatus.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifySubdomainStatusRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifySubdomainStatusResponse`
def ModifySubdomainStatus(request)
body = send_request('ModifySubdomainStatus', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifySubdomainStatusResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 增值服务自动续费设置
# @param request: Request instance for ModifyVasAutoRenewStatus.
# @type request: :class:`Tencentcloud::dnspod::V20210323::ModifyVasAutoRenewStatusRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::ModifyVasAutoRenewStatusResponse`
def ModifyVasAutoRenewStatus(request)
body = send_request('ModifyVasAutoRenewStatus', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifyVasAutoRenewStatusResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# DNSPod商品余额支付
# @param request: Request instance for PayOrderWithBalance.
# @type request: :class:`Tencentcloud::dnspod::V20210323::PayOrderWithBalanceRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::PayOrderWithBalanceResponse`
def PayOrderWithBalance(request)
body = send_request('PayOrderWithBalance', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = PayOrderWithBalanceResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 重新回滚指定解析记录快照
# @param request: Request instance for RollbackRecordSnapshot.
# @type request: :class:`Tencentcloud::dnspod::V20210323::RollbackRecordSnapshotRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::RollbackRecordSnapshotResponse`
def RollbackRecordSnapshot(request)
body = send_request('RollbackRecordSnapshot', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = RollbackRecordSnapshotResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
# 回滚快照
# @param request: Request instance for RollbackSnapshot.
# @type request: :class:`Tencentcloud::dnspod::V20210323::RollbackSnapshotRequest`
# @rtype: :class:`Tencentcloud::dnspod::V20210323::RollbackSnapshotResponse`
def RollbackSnapshot(request)
body = send_request('RollbackSnapshot', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = RollbackSnapshotResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
reqid = response['Response']['RequestId']
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
end
rescue TencentCloud::Common::TencentCloudSDKException => e
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
end
end
end
end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tencentcloud/tencentcloud-sdk-ruby.git
git@gitee.com:tencentcloud/tencentcloud-sdk-ruby.git
tencentcloud
tencentcloud-sdk-ruby
tencentcloud-sdk-ruby
master

Search