Sha256: 93bd5a164ea244d251ebc6690760457c824baea0e660ca200a9954939bce3be4

Contents?: true

Size: 953 Bytes

Versions: 10

Compression:

Stored size: 953 Bytes

Contents

module Elasticsearch
  module XPack
    module API
      module Security
        module Actions

          # Retrieve one or more roles from the native realm
          #
          # @option arguments [String] :name Role name
          #
          # @see https://www.elastic.co/guide/en/x-pack/current/security-api-roles.html#security-api-get-role
          #
          def get_role(arguments={})
            method = Elasticsearch::API::HTTP_GET
            path   = Elasticsearch::API::Utils.__pathify "_xpack/security/role", Elasticsearch::API::Utils.__listify(arguments[:name])
            params = {}
            body   = nil

            if Array(arguments[:ignore]).include?(404)
              Elasticsearch::API::Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
            else
              perform_request(method, path, params, body).body
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
elasticsearch-xpack-6.8.1 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-6.8.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-6.3.1 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-6.3.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-6.2.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-6.1.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-6.0.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-5.5.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-5.0.0 lib/elasticsearch/xpack/api/actions/security/get_role.rb
elasticsearch-xpack-0.1.0.pre lib/elasticsearch/xpack/api/actions/security/get_role.rb