elasticsearch raw
Run an elasticsearch raw command based REST API
Description
Run an elasticsearch raw command based REST API, providing path, body and http method
Synopsis
elasticsearch raw
[--site <site>]
[--cluster <cluster>]
--path <path>
[--method <method>]
[--body <body>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of elastic search cluster
Example: --cluster "elastic-default"
Default: elastic-default
Attributes: optional
path
- (string)
REST API URL path
Example: --path "/my-index-01/_rollover"
Default: _None_
Attributes: required
method
- (string)
HTTP method - GET/POST/PUT/DELETE
Example: --method "method-1"
Default: _None_
Attributes: optional
body
- (string)
Body for REST API, JSON formatted
Example: --body "{"field1": "value1"}"
Default: {}
Attributes: optional
Examples
elasticsearch raw --path "/my-index-01/_rollover" --method "method-1"
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | x = "read" |
if method == "PUT": | |
x = "update" | |
if method == "POST" | |
x = "create" | |
if method == "DELETE": | |
x = "delete" | |
x | |
Service Type | "elasticsearch" |
Service Instance | cluster |
Namespace | |
Object Type | "raw_resource" |
Object ID | index |
Please see Access Control for details.