Auto-generated code for 8.16 (#2470)

This commit is contained in:
Elastic Machine
2024-11-18 18:27:50 +01:00
committed by GitHub
parent 1e103baec1
commit 47de886973
17 changed files with 290 additions and 45 deletions

View File

@ -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);
----

View File

@ -5,7 +5,7 @@
---- ----
const response = await client.ingest.putPipeline({ const response = await client.ingest.putPipeline({
id: "geoip", id: "geoip",
description: "Add geoip info", description: "Add ip geolocation info",
processors: [ processors: [
{ {
geoip: { geoip: {

View File

@ -5,7 +5,7 @@
---- ----
const response = await client.ingest.putPipeline({ const response = await client.ingest.putPipeline({
id: "geoip", id: "geoip",
description: "Add geoip info", description: "Add ip geolocation info",
processors: [ processors: [
{ {
geoip: { geoip: {

View File

@ -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);
----

View File

@ -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);
----

View File

@ -4,7 +4,7 @@
[source, js] [source, js]
---- ----
const response = await client.security.putRole({ const response = await client.security.putRole({
name: "role_with_remote_indices", name: "only_remote_access_role",
remote_indices: [ remote_indices: [
{ {
clusters: ["my_remote"], clusters: ["my_remote"],
@ -12,6 +12,12 @@ const response = await client.security.putRole({
privileges: ["read", "read_cross_cluster", "view_index_metadata"], privileges: ["read", "read_cross_cluster", "view_index_metadata"],
}, },
], ],
remote_cluster: [
{
clusters: ["my_remote"],
privileges: ["monitor_stats"],
},
],
}); });
console.log(response); console.log(response);
---- ----

View File

@ -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);
----

View 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-{service-name-stub}-connector",
index_name: "my-elasticsearch-index",
name: "Content synced from {service-name}",
service_type: "{service-name-stub}",
});
console.log(response);
----

View File

@ -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);
----

View 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.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);
----

View File

@ -5,7 +5,7 @@
---- ----
const response = await client.ingest.putPipeline({ const response = await client.ingest.putPipeline({
id: "geoip", id: "geoip",
description: "Add geoip info", description: "Add ip geolocation info",
processors: [ processors: [
{ {
geoip: { geoip: {

View File

@ -4,12 +4,11 @@
[source, js] [source, js]
---- ----
const response = await client.transport.request({ const response = await client.transport.request({
method: "PUT", method: "POST",
path: "/_ingest/geoip/database/my-database-id", path: "/_query_rules/my-ruleset/_test",
body: { body: {
name: "GeoIP2-Domain", match_criteria: {
maxmind: { query_string: "puggles",
account_id: "1025402",
}, },
}, },
}); });

View File

@ -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);
----

View File

@ -5884,6 +5884,17 @@ client.ingest.deleteGeoipDatabase({ id })
If no response is received before the timeout expires, the request fails and returns an error. If no response is received before the timeout expires, the request fails and returns an error.
** *`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. ** *`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.
[discrete]
==== delete_ip_location_database
Deletes an ip location database configuration
{ref}/delete-ip-location-database-api.html[Endpoint documentation]
[source,ts]
----
client.ingest.deleteIpLocationDatabase()
----
[discrete] [discrete]
==== delete_pipeline ==== delete_pipeline
Deletes one or more existing ingest pipeline. Deletes one or more existing ingest pipeline.
@ -5936,6 +5947,17 @@ To get all database configurations, omit this parameter or use `*`.
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. ** *`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. If no response is received before the timeout expires, the request fails and returns an error.
[discrete]
==== get_ip_location_database
Returns the specified ip location database configuration
{ref}/get-ip-location-database-api.html[Endpoint documentation]
[source,ts]
----
client.ingest.getIpLocationDatabase()
----
[discrete] [discrete]
==== get_pipeline ==== get_pipeline
Returns information about one or more ingest pipelines. Returns information about one or more ingest pipelines.
@ -5993,6 +6015,17 @@ At present, the only supported provider is maxmind, and the maxmind provider req
If no response is received before the timeout expires, the request fails and returns an error. If no response is received before the timeout expires, the request fails and returns an error.
** *`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. ** *`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.
[discrete]
==== put_ip_location_database
Puts the configuration for a ip location database to be downloaded
{ref}/put-ip-location-database-api.html[Endpoint documentation]
[source,ts]
----
client.ingest.putIpLocationDatabase()
----
[discrete] [discrete]
==== put_pipeline ==== put_pipeline
Creates or updates an ingest pipeline. Creates or updates an ingest pipeline.
@ -11214,7 +11247,7 @@ client.tasks.list({ ... })
** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request. ** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request.
** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries. ** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
** *`group_by` (Optional, Enum("nodes" | "parents" | "none"))*: Key used to group tasks in the response. ** *`group_by` (Optional, Enum("nodes" | "parents" | "none"))*: Key used to group tasks in the response.
** *`node_id` (Optional, string[])*: List of node IDs or names used to limit returned information. ** *`nodes` (Optional, string | string[])*: List of node IDs or names used to limit returned information.
** *`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`. ** *`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`.
** *`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. ** *`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.
** *`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. ** *`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.

View File

@ -76,6 +76,38 @@ export default class Ingest {
return await this.transport.request({ path, method, querystring, body, meta }, options) return await this.transport.request({ path, method, querystring, body, meta }, options)
} }
/**
* Deletes an ip location database configuration
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-ip-location-database-api.html | Elasticsearch API documentation}
*/
async deleteIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async deleteIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async deleteIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async deleteIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['id']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}
const method = 'DELETE'
const path = `/_ingest/ip_location/database/${encodeURIComponent(params.id.toString())}`
const meta: TransportRequestMetadata = {
name: 'ingest.delete_ip_location_database',
pathParts: {
id: params.id
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/** /**
* Deletes one or more existing ingest pipeline. * Deletes one or more existing ingest pipeline.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-pipeline-api.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-pipeline-api.html | Elasticsearch API documentation}
@ -178,6 +210,45 @@ export default class Ingest {
return await this.transport.request({ path, method, querystring, body, meta }, options) return await this.transport.request({ path, method, querystring, body, meta }, options)
} }
/**
* Returns the specified ip location database configuration
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-ip-location-database-api.html | Elasticsearch API documentation}
*/
async getIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async getIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async getIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async getIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['id']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}
let method = ''
let path = ''
if (params.id != null) {
method = 'GET'
path = `/_ingest/ip_location/database/${encodeURIComponent(params.id.toString())}`
} else {
method = 'GET'
path = '/_ingest/ip_location/database'
}
const meta: TransportRequestMetadata = {
name: 'ingest.get_ip_location_database',
pathParts: {
id: params.id
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/** /**
* Returns information about one or more ingest pipelines. This API returns a local reference of the pipeline. * Returns information about one or more ingest pipelines. This API returns a local reference of the pipeline.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-pipeline-api.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-pipeline-api.html | Elasticsearch API documentation}
@ -292,6 +363,38 @@ export default class Ingest {
return await this.transport.request({ path, method, querystring, body, meta }, options) return await this.transport.request({ path, method, querystring, body, meta }, options)
} }
/**
* Puts the configuration for a ip location database to be downloaded
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/put-ip-location-database-api.html | Elasticsearch API documentation}
*/
async putIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async putIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async putIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async putIpLocationDatabase (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['id']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}
const method = 'PUT'
const path = `/_ingest/ip_location/database/${encodeURIComponent(params.id.toString())}`
const meta: TransportRequestMetadata = {
name: 'ingest.put_ip_location_database',
pathParts: {
id: params.id
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/** /**
* Creates or updates an ingest pipeline. Changes made using this API take effect immediately. * Creates or updates an ingest pipeline. Changes made using this API take effect immediately.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ingest.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ingest.html | Elasticsearch API documentation}

View File

@ -10932,6 +10932,8 @@ export interface IndicesIndexTemplate {
_meta?: Metadata _meta?: Metadata
allow_auto_create?: boolean allow_auto_create?: boolean
data_stream?: IndicesIndexTemplateDataStreamConfiguration data_stream?: IndicesIndexTemplateDataStreamConfiguration
deprecated?: boolean
ignore_missing_component_templates?: Names
} }
export interface IndicesIndexTemplateDataStreamConfiguration { export interface IndicesIndexTemplateDataStreamConfiguration {
@ -17336,6 +17338,7 @@ export interface SecurityRemoteIndicesPrivileges {
export interface SecurityReplicationAccess { export interface SecurityReplicationAccess {
names: IndexName[] names: IndexName[]
allow_restricted_indices?: boolean
} }
export interface SecurityRoleDescriptor { export interface SecurityRoleDescriptor {
@ -19130,7 +19133,7 @@ export interface TasksListRequest extends RequestBase {
actions?: string | string[] actions?: string | string[]
detailed?: boolean detailed?: boolean
group_by?: TasksGroupBy group_by?: TasksGroupBy
node_id?: string[] nodes?: NodeIds
parent_task_id?: Id parent_task_id?: Id
master_timeout?: Duration master_timeout?: Duration
timeout?: Duration timeout?: Duration

View File

@ -11109,6 +11109,8 @@ export interface IndicesIndexTemplate {
_meta?: Metadata _meta?: Metadata
allow_auto_create?: boolean allow_auto_create?: boolean
data_stream?: IndicesIndexTemplateDataStreamConfiguration data_stream?: IndicesIndexTemplateDataStreamConfiguration
deprecated?: boolean
ignore_missing_component_templates?: Names
} }
export interface IndicesIndexTemplateDataStreamConfiguration { export interface IndicesIndexTemplateDataStreamConfiguration {
@ -17716,6 +17718,7 @@ export interface SecurityRemoteIndicesPrivileges {
export interface SecurityReplicationAccess { export interface SecurityReplicationAccess {
names: IndexName[] names: IndexName[]
allow_restricted_indices?: boolean
} }
export interface SecurityRoleDescriptor { export interface SecurityRoleDescriptor {
@ -19624,7 +19627,7 @@ export interface TasksListRequest extends RequestBase {
actions?: string | string[] actions?: string | string[]
detailed?: boolean detailed?: boolean
group_by?: TasksGroupBy group_by?: TasksGroupBy
node_id?: string[] nodes?: NodeIds
parent_task_id?: Id parent_task_id?: Id
master_timeout?: Duration master_timeout?: Duration
timeout?: Duration timeout?: Duration