Method: Elasticsearch::API::Connector::Actions#update_name
- Defined in:
- lib/elasticsearch/api/actions/connector/update_name.rb
#update_name(arguments = {}) ⇒ Object
Updates the name and/or description fields in the connector document. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/elasticsearch/api/actions/connector/update_name.rb', line 37 def update_name(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || "connector.update_name" } defined_params = [:connector_id].inject({}) do |set_variables, variable| set_variables[variable] = arguments[variable] if arguments.key?(variable) set_variables end request_opts[:defined_params] = defined_params unless defined_params.empty? raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _connector_id = arguments.delete(:connector_id) method = Elasticsearch::API::HTTP_PUT path = "_connector/#{Utils.__listify(_connector_id)}/_name" params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |