lib/v20170312/client.rb in tencentcloud-sdk-cvm-3.0.901 vs lib/v20170312/client.rb in tencentcloud-sdk-cvm-3.0.902

- old
+ new

@@ -157,9 +157,33 @@ raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end + # 本接口(ConvertOperatingSystem)用于转换实例的操作系统,仅支持源操作系统为 CentOS 7、CentOS 8 的实例。 + + # @param request: Request instance for ConvertOperatingSystems. + # @type request: :class:`Tencentcloud::cvm::V20170312::ConvertOperatingSystemsRequest` + # @rtype: :class:`Tencentcloud::cvm::V20170312::ConvertOperatingSystemsResponse` + def ConvertOperatingSystems(request) + body = send_request('ConvertOperatingSystems', request.serialize) + response = JSON.parse(body) + if response['Response'].key?('Error') == false + model = ConvertOperatingSystemsResponse.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 + # 本接口 (CreateDisasterRecoverGroup)用于创建[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。创建好的置放群组,可在[创建实例](https://cloud.tencent.com/document/api/213/15730)时指定。 # @param request: Request instance for CreateDisasterRecoverGroup. # @type request: :class:`Tencentcloud::cvm::V20170312::CreateDisasterRecoverGroupRequest` # @rtype: :class:`Tencentcloud::cvm::V20170312::CreateDisasterRecoverGroupResponse` \ No newline at end of file