NAME

Search::Elasticsearch::Plugin::XPack::5_0::License - Plugin providing License API for Search::Elasticsearch 2.x

VERSION

version 5.02

SYNOPSIS

use Search::Elasticsearch();

my $es = Search::Elasticsearch->new(
    nodes    => \@nodes,
    plugins  => ['XPack']
);

my $response = $es->license->get();

DESCRIPTION

This class extends the Search::Elasticsearch client with a license namespace, to support the API for the License plugin for Elasticsearch. In other words, it can be used as follows:

use Search::Elasticsearch();
my $es = Search::Elasticsearch->new(
    nodes    => \@nodes,
    plugins  => ['XPack']
);

my $response = $es->license->get();

METHODS

The full documentation for the License plugin is available here: https://www.elastic.co/guide/en/x-pack/current/license-management.html

get()

$response = $es->license->get()

The get() method returns the currently installed license.

See the license.get docs for more information.

Query string parameters: error_trace, human, local

post()

$response = $es->license->post(
    body     => {...}          # required
);

The post() method adds or updates the license for the cluster. The body can be passed as JSON or as a string.

See the license.put docs for more information.

Query string parameters: acknowledge, error_trace, human

AUTHOR

Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Elasticsearch BV.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004