lib/v20190924/client.rb in tencentcloud-sdk-tcr-3.0.635 vs lib/v20190924/client.rb in tencentcloud-sdk-tcr-3.0.636

- old
+ new

@@ -2189,9 +2189,33 @@ raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end + # 用于在企业版镜像仓库中复制镜像版本 + + # @param request: Request instance for DuplicateImage. + # @type request: :class:`Tencentcloud::tcr::V20190924::DuplicateImageRequest` + # @rtype: :class:`Tencentcloud::tcr::V20190924::DuplicateImageResponse` + def DuplicateImage(request) + body = send_request('DuplicateImage', request.serialize) + response = JSON.parse(body) + if response['Response'].key?('Error') == false + model = DuplicateImageResponse.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 DuplicateImagePersonal. # @type request: :class:`Tencentcloud::tcr::V20190924::DuplicateImagePersonalRequest` # @rtype: :class:`Tencentcloud::tcr::V20190924::DuplicateImagePersonalResponse` \ No newline at end of file