Module: Elasticsearch::XPack::API::Rollup::Actions

Included in:
RollupClient
Defined in:
lib/elasticsearch/xpack/api/namespace/rollup.rb,
lib/elasticsearch/xpack/api/actions/rollup/put_job.rb,
lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb,
lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb,
lib/elasticsearch/xpack/api/actions/rollup/start_job.rb,
lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb,
lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb,
lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb,
lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb

Instance Method Summary collapse

Instance Method Details

#delete_job(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the job to delete (Required)

Raises:

  • (ArgumentError)

See Also:



13
14
15
16
17
18
19
20
21
# File 'lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb', line 13

def delete_job(arguments={})
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  method = Elasticsearch::API::HTTP_DELETE
  path   = "_xpack/rollup/job/#{arguments[:id]}"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#get_jobs(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs

See Also:



13
14
15
16
17
18
19
20
# File 'lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb', line 13

def get_jobs(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = "_xpack/rollup/job/#{arguments[:id]}"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#get_rollup_caps(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the index to check rollup capabilities on, or left blank for all jobs



11
12
13
14
15
16
17
18
# File 'lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb', line 11

def get_rollup_caps(arguments={})
  method = Elasticsearch::API::HTTP_GET
  path   = "_xpack/rollup/data/#{arguments[:id]}"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#get_rollup_index_caps(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (String)

    The rollup index or index pattern to obtain rollup capabilities from (Required)

Raises:

  • (ArgumentError)

See Also:



13
14
15
16
17
18
19
20
21
# File 'lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb', line 13

def get_rollup_index_caps(arguments={})
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
  method = Elasticsearch::API::HTTP_GET
  path   = "#{arguments[:index]}/_xpack/rollup/data"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#put_job(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the job to create (Required)

  • :body (Hash)

    The job configuration (Required)

Raises:

  • (ArgumentError)

See Also:



14
15
16
17
18
19
20
21
22
23
# File 'lib/elasticsearch/xpack/api/actions/rollup/put_job.rb', line 14

def put_job(arguments={})
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
  method = Elasticsearch::API::HTTP_PUT
  path   = "_xpack/rollup/job/#{arguments[:id]}"
  params = {}
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#rollup_search(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (String)

    The index or index-pattern (containing rollup or regular data) that should be searched (Required)

  • :type (String)

    The doc type inside the index

  • :body (Hash)

    The search request body (Required)

Raises:

  • (ArgumentError)

See Also:



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb', line 15

def rollup_search(arguments={})
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

  valid_params = [ :typed_keys ]

  method = Elasticsearch::API::HTTP_GET
  path   = "#{arguments[:index]}/_rollup_search"
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
  body   = arguments[:body]

  perform_request(method, path, params, body).body
end

#start_job(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the job to start (Required)

Raises:

  • (ArgumentError)

See Also:



13
14
15
16
17
18
19
20
21
# File 'lib/elasticsearch/xpack/api/actions/rollup/start_job.rb', line 13

def start_job(arguments={})
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  method = Elasticsearch::API::HTTP_POST
  path   = "_xpack/rollup/job/#{arguments[:id]}/_start"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end

#stop_job(arguments = {}) ⇒ Object

TODO: Description

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :id (String)

    The ID of the job to stop (Required)

Raises:

  • (ArgumentError)

See Also:



13
14
15
16
17
18
19
20
21
# File 'lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb', line 13

def stop_job(arguments={})
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
  method = Elasticsearch::API::HTTP_POST
  path   = "_xpack/rollup/job/#{arguments[:id]}/_stop"
  params = {}
  body   = nil

  perform_request(method, path, params, body).body
end