|
| 1 | +# Licensed to Elasticsearch B.V. under one or more contributor |
| 2 | +# license agreements. See the NOTICE file distributed with |
| 3 | +# this work for additional information regarding copyright |
| 4 | +# ownership. Elasticsearch B.V. licenses this file to you under |
| 5 | +# the Apache License, Version 2.0 (the "License"); you may |
| 6 | +# not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | +# |
| 18 | +# This code was automatically generated from the Elasticsearch Specification |
| 19 | +# See https://github.com/elastic/elasticsearch-specification |
| 20 | +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. |
| 21 | +module Elasticsearch |
| 22 | + module API |
| 23 | + module Project |
| 24 | + module Actions |
| 25 | + # Return tags defined for the project |
| 26 | + # This functionality is Experimental and may be changed or removed |
| 27 | + # completely in a future release. Elastic will take a best effort approach |
| 28 | + # to fix any issues, but experimental features are not subject to the |
| 29 | + # support SLA of official GA features. |
| 30 | + # |
| 31 | + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors |
| 32 | + # when they occur. |
| 33 | + # @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response |
| 34 | + # returned by Elasticsearch. |
| 35 | + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. |
| 36 | + # For example `"exists_time": "1h"` for humans and |
| 37 | + # `"exists_time_in_millis": 3600000` for computers. When disabled the human |
| 38 | + # readable values will be omitted. This makes sense for responses being consumed |
| 39 | + # only by machines. |
| 40 | + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use |
| 41 | + # this option for debugging only. |
| 42 | + # @option arguments [Hash] :headers Custom HTTP headers |
| 43 | + # |
| 44 | + # @see |
| 45 | + # |
| 46 | + def tags(arguments = {}) |
| 47 | + request_opts = { endpoint: arguments[:endpoint] || 'project.tags' } |
| 48 | + |
| 49 | + arguments = arguments.clone |
| 50 | + headers = arguments.delete(:headers) || {} |
| 51 | + |
| 52 | + body = nil |
| 53 | + |
| 54 | + method = Elasticsearch::API::HTTP_GET |
| 55 | + path = '_project/tags' |
| 56 | + params = Utils.process_params(arguments) |
| 57 | + |
| 58 | + Elasticsearch::API::Response.new( |
| 59 | + perform_request(method, path, params, body, headers, request_opts) |
| 60 | + ) |
| 61 | + end |
| 62 | + end |
| 63 | + end |
| 64 | + end |
| 65 | +end |
0 commit comments