lib/v20180416/client.rb in tencentcloud-sdk-scf-3.0.640 vs lib/v20180416/client.rb in tencentcloud-sdk-scf-3.0.641

- old
+ new

@@ -1090,9 +1090,48 @@ raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end + # 支持触发器配置更新。 + # 默认接口请求频率限制:20次/秒 + + # 注意:目前只支持timer触发器和ckafka触发器更新! + + # timer触发器和ckafka触发器支持更新字段有:Enable、TriggerDesc、Description、CustomArgument。 + + # timer触发器TriggerDesc支持5段式和7段式的更新。 + + # ckafka触发器TriggerDesc支持Retry、MaxMsgNum、TimeOut参数更新,不传值表示原值不变,传值不能为空。 + + # Enable 触发器开启或关闭,传参为OPEN为开启,CLOSE为关闭。不传值表示原值不变,传值不能为空。 + + # Description 触发器描述,不传值保持原值不变,传值为空则为空。 + + # CustomArgument 触发器用户附加信息(注意:只有timer触发器展示),不传值保持原值不变,传值为空则为空。 + + # @param request: Request instance for UpdateTrigger. + # @type request: :class:`Tencentcloud::scf::V20180416::UpdateTriggerRequest` + # @rtype: :class:`Tencentcloud::scf::V20180416::UpdateTriggerResponse` + def UpdateTrigger(request) + body = send_request('UpdateTrigger', request.serialize) + response = JSON.parse(body) + if response['Response'].key?('Error') == false + model = UpdateTriggerResponse.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 UpdateTriggerStatus. # @type request: :class:`Tencentcloud::scf::V20180416::UpdateTriggerStatusRequest` # @rtype: :class:`Tencentcloud::scf::V20180416::UpdateTriggerStatusResponse` \ No newline at end of file