Skip to content

Commit 5d41135

Browse files
Auto-generated code for 8.x (#2471)
1 parent e4c4f1a commit 5d41135

16 files changed

+304
-69
lines changed

docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/doc_examples/3fab530a2e43807929c0ef3ebf7d268c.asciidoc renamed to docs/doc_examples/216e24f05cbb82c1718713fbab8623d2.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
----
66
const response = await client.ingest.putPipeline({
77
id: "geoip",
8-
description: "Add geoip info",
8+
description: "Add ip geolocation info",
99
processors: [
1010
{
1111
geoip: {

docs/doc_examples/d3a558ef226e9dccc1c7c61e1167547f.asciidoc renamed to docs/doc_examples/334811cfceb6858aeec5b3461717dd63.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
----
66
const response = await client.ingest.putPipeline({
77
id: "geoip",
8-
description: "Add geoip info",
8+
description: "Add ip geolocation info",
99
processors: [
1010
{
1111
geoip: {

docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/doc_examples/4b113c7f475cfe484a150ddbb8e6c5c7.asciidoc renamed to docs/doc_examples/5e021307d331a4483a5aa2198168451b.asciidoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44
[source, js]
55
----
66
const response = await client.security.putRole({
7-
name: "role_with_remote_indices",
7+
name: "only_remote_access_role",
88
remote_indices: [
99
{
1010
clusters: ["my_remote"],
1111
names: ["logs*"],
1212
privileges: ["read", "read_cross_cluster", "view_index_metadata"],
1313
},
1414
],
15+
remote_cluster: [
16+
{
17+
clusters: ["my_remote"],
18+
privileges: ["monitor_stats"],
19+
},
20+
],
1521
});
1622
console.log(response);
1723
----
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.putPipeline({
7+
id: "ip_location",
8+
description: "Add ip geolocation info",
9+
processors: [
10+
{
11+
ip_location: {
12+
field: "ip",
13+
},
14+
},
15+
],
16+
});
17+
console.log(response);
18+
19+
const response1 = await client.index({
20+
index: "my-index-000001",
21+
id: "my_id",
22+
pipeline: "ip_location",
23+
document: {
24+
ip: "80.231.5.0",
25+
},
26+
});
27+
console.log(response1);
28+
29+
const response2 = await client.get({
30+
index: "my-index-000001",
31+
id: "my_id",
32+
});
33+
console.log(response2);
34+
----

docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.putPipeline({
7+
id: "ip_location",
8+
description: "Add ip geolocation info",
9+
processors: [
10+
{
11+
ip_location: {
12+
field: "ip",
13+
},
14+
},
15+
],
16+
});
17+
console.log(response);
18+
19+
const response1 = await client.index({
20+
index: "my-index-000001",
21+
id: "my_id",
22+
pipeline: "ip_location",
23+
document: {
24+
ip: "89.160.20.128",
25+
},
26+
});
27+
console.log(response1);
28+
29+
const response2 = await client.get({
30+
index: "my-index-000001",
31+
id: "my_id",
32+
});
33+
console.log(response2);
34+
----

docs/doc_examples/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc renamed to docs/doc_examples/b0ee6f19875fe5bad8aab02d60e3532c.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
----
66
const response = await client.ingest.putPipeline({
77
id: "geoip",
8-
description: "Add geoip info",
8+
description: "Add ip geolocation info",
99
processors: [
1010
{
1111
geoip: {
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.putPipeline({
7+
id: "ip_location",
8+
description: "Add ip geolocation info",
9+
processors: [
10+
{
11+
ip_location: {
12+
field: "ip",
13+
target_field: "geo",
14+
database_file: "GeoLite2-Country.mmdb",
15+
},
16+
},
17+
],
18+
});
19+
console.log(response);
20+
21+
const response1 = await client.index({
22+
index: "my-index-000001",
23+
id: "my_id",
24+
pipeline: "ip_location",
25+
document: {
26+
ip: "89.160.20.128",
27+
},
28+
});
29+
console.log(response1);
30+
31+
const response2 = await client.get({
32+
index: "my-index-000001",
33+
id: "my_id",
34+
});
35+
console.log(response2);
36+
----

docs/reference.asciidoc

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5938,6 +5938,17 @@ client.ingest.deleteGeoipDatabase({ id })
59385938
If no response is received before the timeout expires, the request fails and returns an error.
59395939
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
59405940

5941+
[discrete]
5942+
==== delete_ip_location_database
5943+
Deletes an ip location database configuration
5944+
5945+
{ref}/delete-ip-location-database-api.html[Endpoint documentation]
5946+
[source,ts]
5947+
----
5948+
client.ingest.deleteIpLocationDatabase()
5949+
----
5950+
5951+
59415952
[discrete]
59425953
==== delete_pipeline
59435954
Deletes one or more existing ingest pipeline.
@@ -5990,6 +6001,17 @@ To get all database configurations, omit this parameter or use `*`.
59906001
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
59916002
If no response is received before the timeout expires, the request fails and returns an error.
59926003

6004+
[discrete]
6005+
==== get_ip_location_database
6006+
Returns the specified ip location database configuration
6007+
6008+
{ref}/get-ip-location-database-api.html[Endpoint documentation]
6009+
[source,ts]
6010+
----
6011+
client.ingest.getIpLocationDatabase()
6012+
----
6013+
6014+
59936015
[discrete]
59946016
==== get_pipeline
59956017
Returns information about one or more ingest pipelines.
@@ -6047,6 +6069,17 @@ At present, the only supported provider is maxmind, and the maxmind provider req
60476069
If no response is received before the timeout expires, the request fails and returns an error.
60486070
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
60496071

6072+
[discrete]
6073+
==== put_ip_location_database
6074+
Puts the configuration for a ip location database to be downloaded
6075+
6076+
{ref}/put-ip-location-database-api.html[Endpoint documentation]
6077+
[source,ts]
6078+
----
6079+
client.ingest.putIpLocationDatabase()
6080+
----
6081+
6082+
60506083
[discrete]
60516084
==== put_pipeline
60526085
Creates or updates an ingest pipeline.
@@ -9171,7 +9204,7 @@ client.security.bulkPutRole({ roles })
91719204
==== Arguments
91729205

91739206
* *Request (object):*
9174-
** *`roles` (Record<string, { cluster, indices, global, applications, metadata, run_as, description, transient_metadata }>)*: A dictionary of role name to RoleDescriptor objects to add or update
9207+
** *`roles` (Record<string, { cluster, indices, remote_indices, remote_cluster, global, applications, metadata, run_as, description, transient_metadata }>)*: A dictionary of role name to RoleDescriptor objects to add or update
91759208
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
91769209

91779210
[discrete]
@@ -9328,7 +9361,7 @@ client.security.createApiKey({ ... })
93289361
* *Request (object):*
93299362
** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key. By default, API keys never expire.
93309363
** *`name` (Optional, string)*: Specifies the name for this API key.
9331-
** *`role_descriptors` (Optional, Record<string, { cluster, indices, global, applications, metadata, run_as, description, transient_metadata }>)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
9364+
** *`role_descriptors` (Optional, Record<string, { cluster, indices, remote_indices, remote_cluster, global, applications, metadata, run_as, description, transient_metadata }>)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
93329365
** *`metadata` (Optional, Record<string, User-defined value>)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with `_` are reserved for system usage.
93339366
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.
93349367

@@ -9887,7 +9920,7 @@ client.security.hasPrivileges({ ... })
98879920
* *Request (object):*
98889921
** *`user` (Optional, string)*: Username
98899922
** *`application` (Optional, { application, privileges, resources }[])*
9890-
** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of the cluster privileges that you want to check.
9923+
** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_stats" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of the cluster privileges that you want to check.
98919924
** *`index` (Optional, { names, privileges, allow_restricted_indices }[])*
98929925

98939926
[discrete]
@@ -10040,10 +10073,11 @@ client.security.putRole({ name })
1004010073
* *Request (object):*
1004110074
** *`name` (string)*: The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role.
1004210075
** *`applications` (Optional, { application, privileges, resources }[])*: A list of application privilege entries.
10043-
** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role.
10076+
** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_stats" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role.
1004410077
** *`global` (Optional, Record<string, User-defined value>)*: An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.
1004510078
** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries.
1004610079
** *`remote_indices` (Optional, { clusters, field_security, names, privileges, query, allow_restricted_indices }[])*: A list of remote indices permissions entries.
10080+
** *`remote_cluster` (Optional, { clusters, privileges }[])*: A list of remote cluster permissions entries.
1004710081
** *`metadata` (Optional, Record<string, User-defined value>)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.
1004810082
** *`run_as` (Optional, string[])*: A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.
1004910083
** *`description` (Optional, string)*: Optional description of the role descriptor
@@ -10397,7 +10431,7 @@ client.security.updateApiKey({ id })
1039710431

1039810432
* *Request (object):*
1039910433
** *`id` (string)*: The ID of the API key to update.
10400-
** *`role_descriptors` (Optional, Record<string, { cluster, indices, global, applications, metadata, run_as, description, transient_metadata }>)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
10434+
** *`role_descriptors` (Optional, Record<string, { cluster, indices, remote_indices, remote_cluster, global, applications, metadata, run_as, description, transient_metadata }>)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API.
1040110435
** *`metadata` (Optional, Record<string, User-defined value>)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.
1040210436
** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key.
1040310437

@@ -11266,7 +11300,7 @@ client.tasks.list({ ... })
1126611300
** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request.
1126711301
** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
1126811302
** *`group_by` (Optional, Enum("nodes" | "parents" | "none"))*: Key used to group tasks in the response.
11269-
** *`node_id` (Optional, string[])*: List of node IDs or names used to limit returned information.
11303+
** *`nodes` (Optional, string | string[])*: List of node IDs or names used to limit returned information.
1127011304
** *`parent_task_id` (Optional, string)*: Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`.
1127111305
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
1127211306
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

0 commit comments

Comments
 (0)