lib/v20170312/client.rb in tencentcloud-sdk-mariadb-1.0.266 vs lib/v20170312/client.rb in tencentcloud-sdk-mariadb-1.0.267
- old
+ new
@@ -27,10 +27,34 @@
sdk_version = 'MARIADB_' + File.read(File.expand_path('../VERSION', __dir__)).strip
super(credential, region, api_version, api_endpoint, sdk_version, profile)
end
+ # 解隔离后付费实例
+
+ # @param request: Request instance for ActivateHourDBInstance.
+ # @type request: :class:`Tencentcloud::mariadb::V20170312::ActivateHourDBInstanceRequest`
+ # @rtype: :class:`Tencentcloud::mariadb::V20170312::ActivateHourDBInstanceResponse`
+ def ActivateHourDBInstance(request)
+ body = send_request('ActivateHourDBInstance', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = ActivateHourDBInstanceResponse.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
+
# 本接口 (AssociateSecurityGroups) 用于安全组批量绑定云资源。
# @param request: Request instance for AssociateSecurityGroups.
# @type request: :class:`Tencentcloud::mariadb::V20170312::AssociateSecurityGroupsRequest`
# @rtype: :class:`Tencentcloud::mariadb::V20170312::AssociateSecurityGroupsResponse`
@@ -1073,9 +1097,33 @@
def InitDBInstances(request)
body = send_request('InitDBInstances', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = InitDBInstancesResponse.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 IsolateHourDBInstance.
+ # @type request: :class:`Tencentcloud::mariadb::V20170312::IsolateHourDBInstanceRequest`
+ # @rtype: :class:`Tencentcloud::mariadb::V20170312::IsolateHourDBInstanceResponse`
+ def IsolateHourDBInstance(request)
+ body = send_request('IsolateHourDBInstance', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = IsolateHourDBInstanceResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
\ No newline at end of file