From d0c3ff818ad807acbe57b6679ea748aa6faa98c8 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 18 Nov 2024 06:04:05 +0000 Subject: [PATCH] Auto-generated API code --- .../19d60e4890cc57151d596326484d9076.asciidoc | 11 ------ ...216e24f05cbb82c1718713fbab8623d2.asciidoc} | 2 +- ...334811cfceb6858aeec5b3461717dd63.asciidoc} | 2 +- .../3b6718257421b5419bf4cd6a7303c57e.asciidoc | 11 ------ .../533087d787b48878a0bf3fa8d0851b64.asciidoc | 11 ------ ...5e021307d331a4483a5aa2198168451b.asciidoc} | 8 ++++- .../7f1fade93225f8cf6000b93334d76ce4.asciidoc | 34 ++++++++++++++++++ .../9313f534e1aa266cde7d4af74665497f.asciidoc | 13 +++++++ .../a3779f21f132787c48681bfb50453592.asciidoc | 34 ++++++++++++++++++ .../ae3473adaf1515afcf7773f26c018e5c.asciidoc | 14 ++++++++ ...b0ee6f19875fe5bad8aab02d60e3532c.asciidoc} | 2 +- ...e22a1da3c622611be6855e534c0709ae.asciidoc} | 9 +++-- .../e308899a306e61d1a590868308689955.asciidoc | 36 +++++++++++++++++++ 13 files changed, 145 insertions(+), 42 deletions(-) delete mode 100644 docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc rename docs/doc_examples/{3fab530a2e43807929c0ef3ebf7d268c.asciidoc => 216e24f05cbb82c1718713fbab8623d2.asciidoc} (94%) rename docs/doc_examples/{d3a558ef226e9dccc1c7c61e1167547f.asciidoc => 334811cfceb6858aeec5b3461717dd63.asciidoc} (93%) delete mode 100644 docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc delete mode 100644 docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc rename docs/doc_examples/{4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc => 5e021307d331a4483a5aa2198168451b.asciidoc} (73%) create mode 100644 docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc create mode 100644 docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc create mode 100644 docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc create mode 100644 docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc rename docs/doc_examples/{b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc => b0ee6f19875fe5bad8aab02d60e3532c.asciidoc} (93%) rename docs/doc_examples/{981b331db1404b39c1a612a135e4e76d.asciidoc => e22a1da3c622611be6855e534c0709ae.asciidoc} (63%) create mode 100644 docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc diff --git a/docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc b/docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc deleted file mode 100644 index 6f918e3b2..000000000 --- a/docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// Use `node scripts/generate-docs-examples.js` to generate the docs examples - -[source, js] ----- -const response = await client.transport.request({ - method: "DELETE", - path: "/_ingest/geoip/database/my-database-id", -}); -console.log(response); ----- diff --git a/docs/doc_examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc b/docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc similarity index 94% rename from docs/doc_examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc rename to docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc index e7b6ae812..dbaac1815 100644 --- a/docs/doc_examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc +++ b/docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc @@ -5,7 +5,7 @@ ---- const response = await client.ingest.putPipeline({ id: "geoip", - description: "Add geoip info", + description: "Add ip geolocation info", processors: [ { geoip: { diff --git a/docs/doc_examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc b/docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc similarity index 93% rename from docs/doc_examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc rename to docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc index 4c5e7872e..1e3f14f12 100644 --- a/docs/doc_examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc +++ b/docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc @@ -5,7 +5,7 @@ ---- const response = await client.ingest.putPipeline({ id: "geoip", - description: "Add geoip info", + description: "Add ip geolocation info", processors: [ { geoip: { diff --git a/docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc b/docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc deleted file mode 100644 index 7ad8dcc20..000000000 --- a/docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// Use `node scripts/generate-docs-examples.js` to generate the docs examples - -[source, js] ----- -const response = await client.transport.request({ - method: "GET", - path: "/_ingest/geoip/database/my-database-id", -}); -console.log(response); ----- diff --git a/docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc b/docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc deleted file mode 100644 index 65425b66a..000000000 --- a/docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -// This file is autogenerated, DO NOT EDIT -// Use `node scripts/generate-docs-examples.js` to generate the docs examples - -[source, js] ----- -const response = await client.transport.request({ - method: "DELETE", - path: "/_ingest/geoip/database/example-database-id", -}); -console.log(response); ----- diff --git a/docs/doc_examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc b/docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc similarity index 73% rename from docs/doc_examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc rename to docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc index 949a81873..329574d90 100644 --- a/docs/doc_examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc +++ b/docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc @@ -4,7 +4,7 @@ [source, js] ---- const response = await client.security.putRole({ - name: "role_with_remote_indices", + name: "only_remote_access_role", remote_indices: [ { clusters: ["my_remote"], @@ -12,6 +12,12 @@ const response = await client.security.putRole({ privileges: ["read", "read_cross_cluster", "view_index_metadata"], }, ], + remote_cluster: [ + { + clusters: ["my_remote"], + privileges: ["monitor_stats"], + }, + ], }); console.log(response); ---- diff --git a/docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc b/docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc new file mode 100644 index 000000000..9d18e53eb --- /dev/null +++ b/docs/doc_examples/7f1fade93225f8cf6000b93334d76ce4.asciidoc @@ -0,0 +1,34 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.ingest.putPipeline({ + id: "ip_location", + description: "Add ip geolocation info", + processors: [ + { + ip_location: { + field: "ip", + }, + }, + ], +}); +console.log(response); + +const response1 = await client.index({ + index: "my-index-000001", + id: "my_id", + pipeline: "ip_location", + document: { + ip: "80.231.5.0", + }, +}); +console.log(response1); + +const response2 = await client.get({ + index: "my-index-000001", + id: "my_id", +}); +console.log(response2); +---- diff --git a/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc b/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc new file mode 100644 index 000000000..86e737ce5 --- /dev/null +++ b/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc @@ -0,0 +1,13 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.connector.put({ + connector_id: "my-{service-name-stub}-connector", + index_name: "my-elasticsearch-index", + name: "Content synced from {service-name}", + service_type: "{service-name-stub}", +}); +console.log(response); +---- diff --git a/docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc b/docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc new file mode 100644 index 000000000..aa591634b --- /dev/null +++ b/docs/doc_examples/a3779f21f132787c48681bfb50453592.asciidoc @@ -0,0 +1,34 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.ingest.putPipeline({ + id: "ip_location", + description: "Add ip geolocation info", + processors: [ + { + ip_location: { + field: "ip", + }, + }, + ], +}); +console.log(response); + +const response1 = await client.index({ + index: "my-index-000001", + id: "my_id", + pipeline: "ip_location", + document: { + ip: "89.160.20.128", + }, +}); +console.log(response1); + +const response2 = await client.get({ + index: "my-index-000001", + id: "my_id", +}); +console.log(response2); +---- diff --git a/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc b/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc new file mode 100644 index 000000000..67a3d5d75 --- /dev/null +++ b/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc @@ -0,0 +1,14 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.connector.put({ + connector_id: "my-{service-name-stub}-connector", + index_name: "my-elasticsearch-index", + name: "Content synced from {service-name}", + service_type: "{service-name-stub}", + is_native: true, +}); +console.log(response); +---- diff --git a/docs/doc_examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc b/docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc similarity index 93% rename from docs/doc_examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc rename to docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc index 2bad68c5e..abe2a362d 100644 --- a/docs/doc_examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc +++ b/docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc @@ -5,7 +5,7 @@ ---- const response = await client.ingest.putPipeline({ id: "geoip", - description: "Add geoip info", + description: "Add ip geolocation info", processors: [ { geoip: { diff --git a/docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc b/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc similarity index 63% rename from docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc rename to docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc index 0d3cdbbe3..26c4b9b0a 100644 --- a/docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc +++ b/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc @@ -4,12 +4,11 @@ [source, js] ---- const response = await client.transport.request({ - method: "PUT", - path: "/_ingest/geoip/database/my-database-id", + method: "POST", + path: "/_query_rules/my-ruleset/_test", body: { - name: "GeoIP2-Domain", - maxmind: { - account_id: "1025402", + match_criteria: { + query_string: "puggles", }, }, }); diff --git a/docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc b/docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc new file mode 100644 index 000000000..28a832c3a --- /dev/null +++ b/docs/doc_examples/e308899a306e61d1a590868308689955.asciidoc @@ -0,0 +1,36 @@ +// This file is autogenerated, DO NOT EDIT +// Use `node scripts/generate-docs-examples.js` to generate the docs examples + +[source, js] +---- +const response = await client.ingest.putPipeline({ + id: "ip_location", + description: "Add ip geolocation info", + processors: [ + { + ip_location: { + field: "ip", + target_field: "geo", + database_file: "GeoLite2-Country.mmdb", + }, + }, + ], +}); +console.log(response); + +const response1 = await client.index({ + index: "my-index-000001", + id: "my_id", + pipeline: "ip_location", + document: { + ip: "89.160.20.128", + }, +}); +console.log(response1); + +const response2 = await client.get({ + index: "my-index-000001", + id: "my_id", +}); +console.log(response2); +----