lib/elasticsearch/api/actions/security/grant_api_key.rb in elasticsearch-api-8.12.2 vs lib/elasticsearch/api/actions/security/grant_api_key.rb in elasticsearch-api-8.13.0

- old
+ new

@@ -26,23 +26,23 @@ # # @option arguments [String] :refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (options: true, false, wait_for) # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The api key request to create an API key (*Required*) # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/security-api-grant-api-key.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.13/security-api-grant-api-key.html # def grant_api_key(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || "security.grant_api_key" } + request_opts = { endpoint: arguments[:endpoint] || 'security.grant_api_key' } raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST - path = "_security/api_key/grant" + path = '_security/api_key/grant' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) )