« Elasticsearch/Client/6_0/Direct/Tasks.pm
↑ Summary
Elasticsearch/Client/6_0/Direct/XPack/Graph.pm »
| 1 | package Search::Elasticsearch::Client::6_0::Direct::XPack; | ||
| 2 | $Search::Elasticsearch::Client::6_0::Direct::XPack::VERSION = '6.80'; | ||
| 3 | use Moo; | ||
| 4 | with 'Search::Elasticsearch::Client::6_0::Role::API'; | ||
| 5 | with 'Search::Elasticsearch::Role::Client::Direct'; | ||
| 6 | |||
| 7 | use namespace::clean; | ||
| 8 | sub _namespace {__PACKAGE__} | ||
| 9 | |||
| 10 | has 'graph' => ( is => 'lazy', init_arg => undef ); | ||
| 11 | has 'license' => ( is => 'lazy', init_arg => undef ); | ||
| 12 | has 'migration' => ( is => 'lazy', init_arg => undef ); | ||
| 13 | has 'ml' => ( is => 'lazy', init_arg => undef ); | ||
| 14 | has 'monitoring' => ( is => 'lazy', init_arg => undef ); | ||
| 15 | has 'rollup' => ( is => 'lazy', init_arg => undef ); | ||
| 16 | has 'security' => ( is => 'lazy', init_arg => undef ); | ||
| 17 | has 'sql' => ( is => 'lazy', init_arg => undef ); | ||
| 18 | has 'ssl' => ( is => 'lazy', init_arg => undef ); | ||
| 19 | has 'watcher' => ( is => 'lazy', init_arg => undef ); | ||
| 20 | |||
| 21 | sub _build_graph { shift->_build_namespace('Graph') } | ||
| 22 | sub _build_license { shift->_build_namespace('License') } | ||
| 23 | sub _build_migration { shift->_build_namespace('Migration') } | ||
| 24 | sub _build_ml { shift->_build_namespace('ML') } | ||
| 25 | sub _build_monitoring { shift->_build_namespace('Monitoring') } | ||
| 26 | sub _build_rollup { shift->_build_namespace('Rollup') } | ||
| 27 | sub _build_security { shift->_build_namespace('Security') } | ||
| 28 | sub _build_sql { shift->_build_namespace('SQL') } | ||
| 29 | sub _build_ssl { shift->_build_namespace('SSL') } | ||
| 30 | sub _build_watcher { shift->_build_namespace('Watcher') } | ||
| 31 | |||
| 32 | __PACKAGE__->_install_api('xpack'); | ||
| 33 | |||
| 34 | 1; | ||
| 35 | |||
| 36 | =pod | ||
| 37 | |||
| 38 | =encoding UTF-8 | ||
| 39 | |||
| 40 | =head1 NAME | ||
| 41 | |||
| 42 | Search::Elasticsearch::Client::6_0::Direct::XPack - Plugin providing XPack APIs for Search::Elasticsearch v6.x | ||
| 43 | |||
| 44 | =head1 VERSION | ||
| 45 | |||
| 46 | version 6.80 | ||
| 47 | |||
| 48 | =head1 SYNOPSIS | ||
| 49 | |||
| 50 | use Search::Elasticsearch(); | ||
| 51 | |||
| 52 | my $es = Search::Elasticsearch->new( | ||
| 53 | nodes => \@nodes | ||
| 54 | ); | ||
| 55 | |||
| 56 | $es->xpack->graph; | ||
| 57 | $es->xpack->license; | ||
| 58 | $es->xpack->security; | ||
| 59 | $es->xpack->watcher; | ||
| 60 | $es->xpack->rollup; | ||
| 61 | $es->xpack->sql; | ||
| 62 | $es->xpack->ml; | ||
| 63 | |||
| 64 | =head2 DESCRIPTION | ||
| 65 | |||
| 66 | This class extends the L<Search::Elasticsearch> client to add support | ||
| 67 | for the X-Pack commercial plugins for Elasticsearch 6.x. | ||
| 68 | |||
| 69 | It extends the L<Search::Elasticsearch> client with a C<graph>, C<license>, C<migration>, C<ml>, | ||
| 70 | C<security>, and C<watcher> namespace, to support the APIs for the X-Pack plugins: | ||
| 71 | Graph, License, Shield, and Watcher. | ||
| 72 | |||
| 73 | In other words, it can be used as follows: | ||
| 74 | |||
| 75 | use Search::Elasticsearch(); | ||
| 76 | my $es = Search::Elasticsearch->new( | ||
| 77 | nodes => \@nodes | ||
| 78 | ); | ||
| 79 | |||
| 80 | my $response = $es->xpack->watcher->start(); | ||
| 81 | |||
| 82 | For details about the supported methods in each namespace, see: | ||
| 83 | |||
| 84 | =over | ||
| 85 | |||
| 86 | =item * | ||
| 87 | |||
| 88 | L<graph()/Search::Elasticsearch::Client::6_0::XPack::Graph> | ||
| 89 | |||
| 90 | =item * | ||
| 91 | |||
| 92 | L<license()/Search::Elasticsearch::Client::6_0::XPack::License> | ||
| 93 | |||
| 94 | =item * | ||
| 95 | |||
| 96 | L<shield()/Search::Elasticsearch::Client::6_0::XPack::Migration> | ||
| 97 | |||
| 98 | =item * | ||
| 99 | |||
| 100 | L<shield()/Search::Elasticsearch::Client::6_0::XPack::ML> | ||
| 101 | |||
| 102 | =item * | ||
| 103 | |||
| 104 | L<shield()/Search::Elasticsearch::Client::6_0::XPack::Rollup> | ||
| 105 | |||
| 106 | =item * | ||
| 107 | |||
| 108 | L<shield()/Search::Elasticsearch::Client::6_0::XPack::Security> | ||
| 109 | |||
| 110 | =item * | ||
| 111 | |||
| 112 | L<shield()/Search::Elasticsearch::Client::6_0::XPack::SQL> | ||
| 113 | |||
| 114 | =item * | ||
| 115 | |||
| 116 | L<watcher()/Search::Elasticsearch::Client::6_0::XPack::Watcher> | ||
| 117 | |||
| 118 | =back | ||
| 119 | |||
| 120 | =head1 AUTHOR | ||
| 121 | |||
| 122 | Enrico Zimuel <enrico.zimuel@elastic.co> | ||
| 123 | |||
| 124 | =head1 COPYRIGHT AND LICENSE | ||
| 125 | |||
| 126 | This software is Copyright (c) 2020 by Elasticsearch BV. | ||
| 127 | |||
| 128 | This is free software, licensed under: | ||
| 129 | |||
| 130 | The Apache License, Version 2.0, January 2004 | ||
| 131 | |||
| 132 | =cut | ||
| 133 | |||
| 134 | __END__ |