Auto-generated code for main (#2371)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
This commit is contained in:
15
docs/doc_examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc
Normal file
15
docs/doc_examples/11be807bdeaeecc8174dec88e0851ea7.asciidoc
Normal file
@ -0,0 +1,15 @@
|
||||
// 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: "/_connector/_sync_job",
|
||||
querystring: {
|
||||
connector_id: "my-connector-id",
|
||||
size: "1",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
18
docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc
Normal file
18
docs/doc_examples/12e9e758f7f18a6cbf27e9d0aea57a19.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// 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.update({
|
||||
index: ".elastic-connectors",
|
||||
id: "connector_id",
|
||||
doc: {
|
||||
features: {
|
||||
native_connector_api_keys: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
25
docs/doc_examples/13fd7a99c5cf53279409ecc679084f87.asciidoc
Normal file
25
docs/doc_examples/13fd7a99c5cf53279409ecc679084f87.asciidoc
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.indices.create({
|
||||
index: "idx_keep",
|
||||
mappings: {
|
||||
_source: {
|
||||
mode: "synthetic",
|
||||
},
|
||||
properties: {
|
||||
path: {
|
||||
type: "object",
|
||||
synthetic_source_keep: "all",
|
||||
},
|
||||
ids: {
|
||||
type: "integer",
|
||||
synthetic_source_keep: "arrays",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
19
docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc
Normal file
19
docs/doc_examples/1522a9297151d7046e6345b9b27539ca.asciidoc
Normal file
@ -0,0 +1,19 @@
|
||||
// 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.updateConfiguration({
|
||||
connector_id: "my-connector-id",
|
||||
values: {
|
||||
host: "127.0.0.1",
|
||||
port: 5432,
|
||||
username: "myuser",
|
||||
password: "mypassword",
|
||||
database: "chinook",
|
||||
schema: "public",
|
||||
tables: "album,artist",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
15
docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc
Normal file
15
docs/doc_examples/16a7ce08b4a6b3af269f27eecc71d664.asciidoc
Normal file
@ -0,0 +1,15 @@
|
||||
// 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.indices.delete({
|
||||
index: "books",
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.indices.delete({
|
||||
index: "my-explicit-mappings-books",
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
26
docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc
Normal file
26
docs/doc_examples/17316a81c9dbdd120b7754116bf0461c.asciidoc
Normal file
@ -0,0 +1,26 @@
|
||||
// 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.security.createApiKey({
|
||||
name: "my-connector-api-key",
|
||||
role_descriptors: {
|
||||
"my-connector-connector-role": {
|
||||
cluster: ["monitor", "manage_connector"],
|
||||
indices: [
|
||||
{
|
||||
names: [
|
||||
"my-index_name",
|
||||
".search-acl-filter-my-index_name",
|
||||
".elastic-connectors*",
|
||||
],
|
||||
privileges: ["all"],
|
||||
allow_restricted_indices: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/193704020a19714dec390452a4e75e8d.asciidoc
Normal file
10
docs/doc_examples/193704020a19714dec390452a4e75e8d.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.indices.create({
|
||||
index: "books",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -4,7 +4,7 @@
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: "my-index-000003",
|
||||
index: "my-index-000002",
|
||||
mappings: {
|
||||
properties: {
|
||||
metrics: {
|
||||
@ -29,7 +29,7 @@ const response = await client.indices.create({
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.indices.getMapping({
|
||||
index: "my-index-000003",
|
||||
index: "my-index-000002",
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
10
docs/doc_examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc
Normal file
10
docs/doc_examples/1c9dac4183a3532c91dbd1a46907729b.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.indices.delete({
|
||||
index: "music",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
33
docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc
Normal file
33
docs/doc_examples/1fb2c77c0988bc6545040b20e3afa7e9.asciidoc
Normal file
@ -0,0 +1,33 @@
|
||||
// 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.security.createApiKey({
|
||||
name: "john-api-key",
|
||||
expiration: "1d",
|
||||
role_descriptors: {
|
||||
"sharepoint-online-role": {
|
||||
index: [
|
||||
{
|
||||
names: ["sharepoint-search-application"],
|
||||
privileges: ["read"],
|
||||
query: {
|
||||
template: {
|
||||
params: {
|
||||
access_control: ["john@example.co", "Engineering Members"],
|
||||
},
|
||||
source:
|
||||
'\n {\n "bool": {\n "should": [\n {\n "bool": {\n "must_not": {\n "exists": {\n "field": "_allow_access_control"\n }\n }\n }\n },\n {\n "terms": {\n "_allow_access_control.enum": {{#toJson}}access_control{{/toJson}}\n }\n }\n ]\n }\n }\n ',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
restriction: {
|
||||
workflows: ["search_application_query"],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
28
docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc
Normal file
28
docs/doc_examples/2c86840a46242a38cf82024a9321be46.asciidoc
Normal file
@ -0,0 +1,28 @@
|
||||
// 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.indices.create({
|
||||
index: "my-explicit-mappings-books",
|
||||
mappings: {
|
||||
dynamic: false,
|
||||
properties: {
|
||||
name: {
|
||||
type: "text",
|
||||
},
|
||||
author: {
|
||||
type: "text",
|
||||
},
|
||||
release_date: {
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd",
|
||||
},
|
||||
page_count: {
|
||||
type: "integer",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
25
docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc
Normal file
25
docs/doc_examples/2d0244c020075595acb625aa5ba8f455.asciidoc
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.index({
|
||||
index: "idx_keep",
|
||||
id: 1,
|
||||
document: {
|
||||
path: {
|
||||
to: [
|
||||
{
|
||||
foo: [3, 2, 1],
|
||||
},
|
||||
{
|
||||
foo: [30, 20, 10],
|
||||
},
|
||||
],
|
||||
bar: "baz",
|
||||
},
|
||||
ids: [200, 100, 300, 100],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
38
docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc
Normal file
38
docs/doc_examples/4da0cb8693e9ceceee2ba3b558014bbf.asciidoc
Normal file
@ -0,0 +1,38 @@
|
||||
// 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.updateByQuery({
|
||||
index: "INDEX_NAME",
|
||||
conflicts: "proceed",
|
||||
query: {
|
||||
bool: {
|
||||
filter: [
|
||||
{
|
||||
match: {
|
||||
object_type: "drive_item",
|
||||
},
|
||||
},
|
||||
{
|
||||
exists: {
|
||||
field: "file",
|
||||
},
|
||||
},
|
||||
{
|
||||
range: {
|
||||
lastModifiedDateTime: {
|
||||
lte: "now-180d",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
script: {
|
||||
source: "ctx._source.body = ''",
|
||||
lang: "painless",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
31
docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc
Normal file
31
docs/doc_examples/529671ffaf7cc75fe83a81d729788be4.asciidoc
Normal file
@ -0,0 +1,31 @@
|
||||
// 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.update({
|
||||
index: ".elastic-connectors",
|
||||
id: "connector_id",
|
||||
doc: {
|
||||
configuration: {
|
||||
field_a: {
|
||||
type: "str",
|
||||
value: "",
|
||||
},
|
||||
field_b: {
|
||||
type: "bool",
|
||||
value: false,
|
||||
},
|
||||
field_c: {
|
||||
type: "int",
|
||||
value: 1,
|
||||
},
|
||||
field_d: {
|
||||
type: "list",
|
||||
value: "a,b",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
15
docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc
Normal file
15
docs/doc_examples/54a47b5d07e7bfbea75c77f35eaae18d.asciidoc
Normal file
@ -0,0 +1,15 @@
|
||||
// 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.indices.putMapping({
|
||||
index: ".elastic-connectors-sync-jobs-v1",
|
||||
properties: {
|
||||
job_type: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc
Normal file
10
docs/doc_examples/6329fb2840a4373ff6d342f2653247cb.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.indices.getMapping({
|
||||
index: "books",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
20
docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc
Normal file
20
docs/doc_examples/63a53fcb0717ae9033a679cbfc932851.asciidoc
Normal file
@ -0,0 +1,20 @@
|
||||
// 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.inference.put({
|
||||
task_type: "completion",
|
||||
inference_id: "alibabacloud_ai_search_completion",
|
||||
inference_config: {
|
||||
service: "alibabacloud-ai-search",
|
||||
service_settings: {
|
||||
host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
|
||||
api_key: "{{API_KEY}}",
|
||||
service_id: "ops-qwen-turbo",
|
||||
workspace: "default",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc
Normal file
10
docs/doc_examples/640dbeecb736bd25f6f2b392b76a7531.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.cluster.stats({
|
||||
include_remotes: "true",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc
Normal file
10
docs/doc_examples/6f8bdca97e43aac75e32de655aa4314a.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.delete({
|
||||
connector_id: "my-connector-id&delete_sync_jobs=true",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -4,14 +4,7 @@
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
index: "my-index",
|
||||
query: {
|
||||
semantic: {
|
||||
field: "inference_field",
|
||||
query: "mountain lake",
|
||||
inner_hits: {},
|
||||
},
|
||||
},
|
||||
index: "music",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
50
docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc
Normal file
50
docs/doc_examples/7a27336a61284d079f3cc3994cf927d1.asciidoc
Normal file
@ -0,0 +1,50 @@
|
||||
// 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.security.createApiKey({
|
||||
name: "my-api-key",
|
||||
role_descriptors: {
|
||||
"role-source1": {
|
||||
indices: [
|
||||
{
|
||||
names: ["source1"],
|
||||
privileges: ["read"],
|
||||
query: {
|
||||
template: {
|
||||
params: {
|
||||
access_control: [
|
||||
"example.user@example.com",
|
||||
"source1-user-group",
|
||||
],
|
||||
},
|
||||
},
|
||||
source: "...",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
"role-source2": {
|
||||
indices: [
|
||||
{
|
||||
names: ["source2"],
|
||||
privileges: ["read"],
|
||||
query: {
|
||||
template: {
|
||||
params: {
|
||||
access_control: [
|
||||
"example.user@example.com",
|
||||
"source2-user-group",
|
||||
],
|
||||
},
|
||||
},
|
||||
source: "...",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
22
docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc
Normal file
22
docs/doc_examples/7af1f62b0cf496cbf593d83d30b472cc.asciidoc
Normal file
@ -0,0 +1,22 @@
|
||||
// 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.security.createApiKey({
|
||||
name: "music-connector",
|
||||
role_descriptors: {
|
||||
"music-connector-role": {
|
||||
cluster: ["monitor", "manage_connector"],
|
||||
indices: [
|
||||
{
|
||||
names: ["music", ".search-acl-filter-music", ".elastic-connectors*"],
|
||||
privileges: ["all"],
|
||||
allow_restricted_indices: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,51 +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.indices.create({
|
||||
index: "my-index-000004",
|
||||
mappings: {
|
||||
properties: {
|
||||
metrics: {
|
||||
subobjects: "auto",
|
||||
properties: {
|
||||
time: {
|
||||
type: "object",
|
||||
properties: {
|
||||
min: {
|
||||
type: "long",
|
||||
},
|
||||
},
|
||||
},
|
||||
to: {
|
||||
type: "object",
|
||||
properties: {
|
||||
inner_metrics: {
|
||||
type: "object",
|
||||
subobjects: "auto",
|
||||
properties: {
|
||||
time: {
|
||||
type: "object",
|
||||
properties: {
|
||||
max: {
|
||||
type: "long",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.indices.getMapping({
|
||||
index: "my-index-000004",
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
@ -1,20 +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.search({
|
||||
index: "my-index",
|
||||
query: {
|
||||
semantic: {
|
||||
field: "inference_field",
|
||||
query: "mountain lake",
|
||||
inner_hits: {
|
||||
from: 1,
|
||||
size: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc
Normal file
10
docs/doc_examples/998c8479c8704bca0e121d5969859517.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.count({
|
||||
index: "music",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
35
docs/doc_examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc
Normal file
35
docs/doc_examples/9bd5a470ee6d2b4a1f5280adc39675d2.asciidoc
Normal file
@ -0,0 +1,35 @@
|
||||
// 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.update({
|
||||
index: ".elastic-connectors",
|
||||
id: "connector_id",
|
||||
doc: {
|
||||
configuration: {
|
||||
tables: {
|
||||
type: "list",
|
||||
value: "*",
|
||||
},
|
||||
ssl_enabled: {
|
||||
type: "bool",
|
||||
value: false,
|
||||
},
|
||||
ssl_ca: {
|
||||
type: "str",
|
||||
value: "",
|
||||
},
|
||||
fetch_size: {
|
||||
type: "int",
|
||||
value: 50,
|
||||
},
|
||||
retry_count: {
|
||||
type: "int",
|
||||
value: 3,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/b8400dbe39215705060500f0e569f452.asciidoc
Normal file
10
docs/doc_examples/b8400dbe39215705060500f0e569f452.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.get({
|
||||
connector_id: "my-connector-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
14
docs/doc_examples/c4654a4ca2f4600606dcc5bf37186c0b.asciidoc
Normal file
14
docs/doc_examples/c4654a4ca2f4600606dcc5bf37186c0b.asciidoc
Normal file
@ -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.esql.asyncQuery({
|
||||
format: "json",
|
||||
body: {
|
||||
query:
|
||||
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
26
docs/doc_examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc
Normal file
26
docs/doc_examples/d1ea13e1e8372cbf1480a414723ff55a.asciidoc
Normal file
@ -0,0 +1,26 @@
|
||||
// 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.security.createApiKey({
|
||||
name: "connector_name-connector-api-key",
|
||||
role_descriptors: {
|
||||
"connector_name-connector-role": {
|
||||
cluster: ["monitor", "manage_connector"],
|
||||
indices: [
|
||||
{
|
||||
names: [
|
||||
"index_name",
|
||||
".search-acl-filter-index_name",
|
||||
".elastic-connectors*",
|
||||
],
|
||||
privileges: ["all"],
|
||||
allow_restricted_indices: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,68 +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.indices.create({
|
||||
index: "my-index-000002",
|
||||
mappings: {
|
||||
properties: {
|
||||
metrics: {
|
||||
type: "object",
|
||||
subobjects: "auto",
|
||||
properties: {
|
||||
inner: {
|
||||
type: "object",
|
||||
enabled: false,
|
||||
},
|
||||
nested: {
|
||||
type: "nested",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.index({
|
||||
index: "my-index-000002",
|
||||
id: "metric_1",
|
||||
document: {
|
||||
"metrics.time": 100,
|
||||
"metrics.time.min": 10,
|
||||
"metrics.time.max": 900,
|
||||
},
|
||||
});
|
||||
console.log(response1);
|
||||
|
||||
const response2 = await client.index({
|
||||
index: "my-index-000002",
|
||||
id: "metric_2",
|
||||
document: {
|
||||
metrics: {
|
||||
time: 100,
|
||||
"time.min": 10,
|
||||
"time.max": 900,
|
||||
inner: {
|
||||
foo: "bar",
|
||||
"path.to.some.field": "baz",
|
||||
},
|
||||
nested: [
|
||||
{
|
||||
id: 10,
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response2);
|
||||
|
||||
const response3 = await client.indices.getMapping({
|
||||
index: "my-index-000002",
|
||||
});
|
||||
console.log(response3);
|
||||
----
|
||||
@ -16,7 +16,7 @@ const response = await client.indices.create({
|
||||
filter: {
|
||||
my_snow: {
|
||||
type: "snowball",
|
||||
language: "Lovins",
|
||||
language: "English",
|
||||
},
|
||||
},
|
||||
},
|
||||
14
docs/doc_examples/eed968e0d9fa2a4545c36a4e5f47b64b.asciidoc
Normal file
14
docs/doc_examples/eed968e0d9fa2a4545c36a4e5f47b64b.asciidoc
Normal file
@ -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.esql.asyncQuery({
|
||||
format: "json",
|
||||
body: {
|
||||
query:
|
||||
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -4,13 +4,13 @@
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.index({
|
||||
index: "my-index",
|
||||
id: "lake_tahoe",
|
||||
index: "books",
|
||||
document: {
|
||||
inference_field: [
|
||||
"Lake Tahoe is the largest alpine lake in North America",
|
||||
"When hiking in the area, please be on alert for bears",
|
||||
],
|
||||
name: "The Great Gatsby",
|
||||
author: "F. Scott Fitzgerald",
|
||||
release_date: "1925-04-10",
|
||||
page_count: 180,
|
||||
language: "EN",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
15
docs/doc_examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc
Normal file
15
docs/doc_examples/f321d4e92aa83d573ecf52bf56b0b774.asciidoc
Normal file
@ -0,0 +1,15 @@
|
||||
// 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: "POST",
|
||||
path: "/_connector/_sync_job",
|
||||
body: {
|
||||
id: "my-connector-id",
|
||||
job_type: "full",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
14
docs/doc_examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc
Normal file
14
docs/doc_examples/f625fdbbe78c4198d9e40b35f3f008b3.asciidoc
Normal file
@ -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.update({
|
||||
index: ".elastic-connectors",
|
||||
id: "connector-id",
|
||||
doc: {
|
||||
custom_scheduling: {},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
13
docs/doc_examples/f679e414de48b8fe25e458844be05618.asciidoc
Normal file
13
docs/doc_examples/f679e414de48b8fe25e458844be05618.asciidoc
Normal file
@ -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-connector-id",
|
||||
name: "Music catalog",
|
||||
index_name: "music",
|
||||
service_type: "postgresql",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
12
docs/doc_examples/f6f647eb644a2d236637ff05f833cb73.asciidoc
Normal file
12
docs/doc_examples/f6f647eb644a2d236637ff05f833cb73.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// 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.secretPost({
|
||||
body: {
|
||||
value: "encoded_api_key",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
12
docs/doc_examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc
Normal file
12
docs/doc_examples/fb56c2ac77d4c308d7702b6b33698382.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// 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.updateApiKeyId({
|
||||
connector_id: "my_connector_id>",
|
||||
api_key_id: "API key_id",
|
||||
api_key_secret_id: "secret_id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -2810,7 +2810,7 @@ client.cluster.stats({ ... })
|
||||
|
||||
* *Request (object):*
|
||||
** *`node_id` (Optional, string | string[])*: List of node filters used to limit returned information. Defaults to all nodes in the cluster.
|
||||
** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
|
||||
** *`include_remotes` (Optional, boolean)*: Include remote cluster data into the response
|
||||
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for each node to respond.
|
||||
If a node does not respond before its timeout expires, the response does not include its stats.
|
||||
However, timed out nodes are included in the response’s `_nodes.failed` property. Defaults to no timeout.
|
||||
@ -3882,7 +3882,7 @@ Manually moves an index into the specified step and executes that step.
|
||||
{ref}/ilm-move-to-step.html[Endpoint documentation]
|
||||
[source,ts]
|
||||
----
|
||||
client.ilm.moveToStep({ index })
|
||||
client.ilm.moveToStep({ index, current_step, next_step })
|
||||
----
|
||||
|
||||
[discrete]
|
||||
@ -3890,8 +3890,8 @@ client.ilm.moveToStep({ index })
|
||||
|
||||
* *Request (object):*
|
||||
** *`index` (string)*: The name of the index whose lifecycle step is to change
|
||||
** *`current_step` (Optional, { action, name, phase })*
|
||||
** *`next_step` (Optional, { action, name, phase })*
|
||||
** *`current_step` ({ action, name, phase })*
|
||||
** *`next_step` ({ action, name, phase })*
|
||||
|
||||
[discrete]
|
||||
==== put_lifecycle
|
||||
@ -5003,7 +5003,7 @@ client.indices.putIndexTemplate({ name })
|
||||
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
|
||||
** *`template` (Optional, { aliases, mappings, settings, lifecycle })*: Template to be applied.
|
||||
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
|
||||
** *`data_stream` (Optional, { hidden })*: If this object is included, the template is used to create data streams and their backing indices.
|
||||
** *`data_stream` (Optional, { hidden, allow_custom_routing })*: If this object is included, the template is used to create data streams and their backing indices.
|
||||
Supports an empty object.
|
||||
Data streams require a matching index template with a `data_stream` object.
|
||||
** *`priority` (Optional, number)*: Priority to determine index template precedence when a new data stream or index is created.
|
||||
@ -5428,7 +5428,7 @@ If set to `false`, then indices or data streams matching the template must alway
|
||||
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
|
||||
** *`template` (Optional, { aliases, mappings, settings, lifecycle })*: Template to be applied.
|
||||
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
|
||||
** *`data_stream` (Optional, { hidden })*: If this object is included, the template is used to create data streams and their backing indices.
|
||||
** *`data_stream` (Optional, { hidden, allow_custom_routing })*: If this object is included, the template is used to create data streams and their backing indices.
|
||||
Supports an empty object.
|
||||
Data streams require a matching index template with a `data_stream` object.
|
||||
** *`priority` (Optional, number)*: Priority to determine index template precedence when a new data stream or index is created.
|
||||
|
||||
@ -2761,7 +2761,7 @@ export interface ShardStatistics {
|
||||
}
|
||||
|
||||
export interface ShardsOperationResponseBase {
|
||||
_shards: ShardStatistics
|
||||
_shards?: ShardStatistics
|
||||
}
|
||||
|
||||
export interface SlicedScroll {
|
||||
@ -4519,8 +4519,8 @@ export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase {
|
||||
export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase {
|
||||
type: 'edge_ngram'
|
||||
custom_token_chars?: string
|
||||
max_gram: integer
|
||||
min_gram: integer
|
||||
max_gram?: integer
|
||||
min_gram?: integer
|
||||
token_chars?: AnalysisTokenChar[]
|
||||
}
|
||||
|
||||
@ -4862,8 +4862,8 @@ export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase {
|
||||
export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase {
|
||||
type: 'ngram'
|
||||
custom_token_chars?: string
|
||||
max_gram: integer
|
||||
min_gram: integer
|
||||
max_gram?: integer
|
||||
min_gram?: integer
|
||||
token_chars?: AnalysisTokenChar[]
|
||||
}
|
||||
|
||||
@ -9474,7 +9474,7 @@ export interface ClusterStatsOperatingSystemMemoryInfo {
|
||||
|
||||
export interface ClusterStatsRequest extends RequestBase {
|
||||
node_id?: NodeIds
|
||||
flat_settings?: boolean
|
||||
include_remotes?: boolean
|
||||
timeout?: Duration
|
||||
}
|
||||
|
||||
@ -10610,15 +10610,15 @@ export interface IlmMigrateToDataTiersResponse {
|
||||
|
||||
export interface IlmMoveToStepRequest extends RequestBase {
|
||||
index: IndexName
|
||||
current_step?: IlmMoveToStepStepKey
|
||||
next_step?: IlmMoveToStepStepKey
|
||||
current_step: IlmMoveToStepStepKey
|
||||
next_step: IlmMoveToStepStepKey
|
||||
}
|
||||
|
||||
export type IlmMoveToStepResponse = AcknowledgedResponseBase
|
||||
|
||||
export interface IlmMoveToStepStepKey {
|
||||
action: string
|
||||
name: string
|
||||
action?: string
|
||||
name?: string
|
||||
phase: string
|
||||
}
|
||||
|
||||
@ -10744,6 +10744,7 @@ export interface IndicesDataStreamTimestampField {
|
||||
|
||||
export interface IndicesDataStreamVisibility {
|
||||
hidden?: boolean
|
||||
allow_custom_routing?: boolean
|
||||
}
|
||||
|
||||
export interface IndicesDownsampleConfig {
|
||||
@ -12862,6 +12863,7 @@ export interface IngestRedactProcessor extends IngestProcessorBase {
|
||||
suffix?: string
|
||||
ignore_missing?: boolean
|
||||
skip_if_unlicensed?: boolean
|
||||
trace_redact?: boolean
|
||||
}
|
||||
|
||||
export interface IngestRemoveProcessor extends IngestProcessorBase {
|
||||
@ -13073,6 +13075,7 @@ export type IngestSimulateDocumentSimulation = IngestSimulateDocumentSimulationK
|
||||
& { [property: string]: string | Id | IndexName | IngestSimulateIngest | Record<string, any> | SpecUtilsStringified<VersionNumber> | VersionType }
|
||||
|
||||
export interface IngestSimulateIngest {
|
||||
_redact?: IngestSimulateRedact
|
||||
timestamp: DateTime
|
||||
pipeline?: Name
|
||||
}
|
||||
@ -13087,6 +13090,10 @@ export interface IngestSimulatePipelineSimulation {
|
||||
error?: ErrorCause
|
||||
}
|
||||
|
||||
export interface IngestSimulateRedact {
|
||||
_is_redacted: boolean
|
||||
}
|
||||
|
||||
export interface IngestSimulateRequest extends RequestBase {
|
||||
id?: Id
|
||||
verbose?: boolean
|
||||
@ -20059,13 +20066,12 @@ export interface XpackInfoFeatures {
|
||||
aggregate_metric: XpackInfoFeature
|
||||
analytics: XpackInfoFeature
|
||||
ccr: XpackInfoFeature
|
||||
data_frame?: XpackInfoFeature
|
||||
data_science?: XpackInfoFeature
|
||||
data_streams: XpackInfoFeature
|
||||
data_tiers: XpackInfoFeature
|
||||
enrich: XpackInfoFeature
|
||||
enterprise_search: XpackInfoFeature
|
||||
eql: XpackInfoFeature
|
||||
flattened?: XpackInfoFeature
|
||||
esql: XpackInfoFeature
|
||||
frozen_indices: XpackInfoFeature
|
||||
graph: XpackInfoFeature
|
||||
ilm: XpackInfoFeature
|
||||
@ -20080,7 +20086,7 @@ export interface XpackInfoFeatures {
|
||||
spatial: XpackInfoFeature
|
||||
sql: XpackInfoFeature
|
||||
transform: XpackInfoFeature
|
||||
vectors?: XpackInfoFeature
|
||||
universal_profiling: XpackInfoFeature
|
||||
voting_only: XpackInfoFeature
|
||||
watcher: XpackInfoFeature
|
||||
archive: XpackInfoFeature
|
||||
|
||||
@ -2837,7 +2837,7 @@ export interface ShardStatistics {
|
||||
}
|
||||
|
||||
export interface ShardsOperationResponseBase {
|
||||
_shards: ShardStatistics
|
||||
_shards?: ShardStatistics
|
||||
}
|
||||
|
||||
export interface SlicedScroll {
|
||||
@ -4595,8 +4595,8 @@ export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase {
|
||||
export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase {
|
||||
type: 'edge_ngram'
|
||||
custom_token_chars?: string
|
||||
max_gram: integer
|
||||
min_gram: integer
|
||||
max_gram?: integer
|
||||
min_gram?: integer
|
||||
token_chars?: AnalysisTokenChar[]
|
||||
}
|
||||
|
||||
@ -4938,8 +4938,8 @@ export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase {
|
||||
export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase {
|
||||
type: 'ngram'
|
||||
custom_token_chars?: string
|
||||
max_gram: integer
|
||||
min_gram: integer
|
||||
max_gram?: integer
|
||||
min_gram?: integer
|
||||
token_chars?: AnalysisTokenChar[]
|
||||
}
|
||||
|
||||
@ -9578,7 +9578,7 @@ export interface ClusterStatsOperatingSystemMemoryInfo {
|
||||
|
||||
export interface ClusterStatsRequest extends RequestBase {
|
||||
node_id?: NodeIds
|
||||
flat_settings?: boolean
|
||||
include_remotes?: boolean
|
||||
timeout?: Duration
|
||||
}
|
||||
|
||||
@ -10783,16 +10783,16 @@ export interface IlmMoveToStepRequest extends RequestBase {
|
||||
index: IndexName
|
||||
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
|
||||
body?: {
|
||||
current_step?: IlmMoveToStepStepKey
|
||||
next_step?: IlmMoveToStepStepKey
|
||||
current_step: IlmMoveToStepStepKey
|
||||
next_step: IlmMoveToStepStepKey
|
||||
}
|
||||
}
|
||||
|
||||
export type IlmMoveToStepResponse = AcknowledgedResponseBase
|
||||
|
||||
export interface IlmMoveToStepStepKey {
|
||||
action: string
|
||||
name: string
|
||||
action?: string
|
||||
name?: string
|
||||
phase: string
|
||||
}
|
||||
|
||||
@ -10921,6 +10921,7 @@ export interface IndicesDataStreamTimestampField {
|
||||
|
||||
export interface IndicesDataStreamVisibility {
|
||||
hidden?: boolean
|
||||
allow_custom_routing?: boolean
|
||||
}
|
||||
|
||||
export interface IndicesDownsampleConfig {
|
||||
@ -13090,6 +13091,7 @@ export interface IngestRedactProcessor extends IngestProcessorBase {
|
||||
suffix?: string
|
||||
ignore_missing?: boolean
|
||||
skip_if_unlicensed?: boolean
|
||||
trace_redact?: boolean
|
||||
}
|
||||
|
||||
export interface IngestRemoveProcessor extends IngestProcessorBase {
|
||||
@ -13307,6 +13309,7 @@ export type IngestSimulateDocumentSimulation = IngestSimulateDocumentSimulationK
|
||||
& { [property: string]: string | Id | IndexName | IngestSimulateIngest | Record<string, any> | SpecUtilsStringified<VersionNumber> | VersionType }
|
||||
|
||||
export interface IngestSimulateIngest {
|
||||
_redact?: IngestSimulateRedact
|
||||
timestamp: DateTime
|
||||
pipeline?: Name
|
||||
}
|
||||
@ -13321,6 +13324,10 @@ export interface IngestSimulatePipelineSimulation {
|
||||
error?: ErrorCause
|
||||
}
|
||||
|
||||
export interface IngestSimulateRedact {
|
||||
_is_redacted: boolean
|
||||
}
|
||||
|
||||
export interface IngestSimulateRequest extends RequestBase {
|
||||
id?: Id
|
||||
verbose?: boolean
|
||||
@ -20566,13 +20573,12 @@ export interface XpackInfoFeatures {
|
||||
aggregate_metric: XpackInfoFeature
|
||||
analytics: XpackInfoFeature
|
||||
ccr: XpackInfoFeature
|
||||
data_frame?: XpackInfoFeature
|
||||
data_science?: XpackInfoFeature
|
||||
data_streams: XpackInfoFeature
|
||||
data_tiers: XpackInfoFeature
|
||||
enrich: XpackInfoFeature
|
||||
enterprise_search: XpackInfoFeature
|
||||
eql: XpackInfoFeature
|
||||
flattened?: XpackInfoFeature
|
||||
esql: XpackInfoFeature
|
||||
frozen_indices: XpackInfoFeature
|
||||
graph: XpackInfoFeature
|
||||
ilm: XpackInfoFeature
|
||||
@ -20587,7 +20593,7 @@ export interface XpackInfoFeatures {
|
||||
spatial: XpackInfoFeature
|
||||
sql: XpackInfoFeature
|
||||
transform: XpackInfoFeature
|
||||
vectors?: XpackInfoFeature
|
||||
universal_profiling: XpackInfoFeature
|
||||
voting_only: XpackInfoFeature
|
||||
watcher: XpackInfoFeature
|
||||
archive: XpackInfoFeature
|
||||
|
||||
Reference in New Issue
Block a user