Skip to content

Commit 257ec22

Browse files
Auto-generated API code (#2719)
1 parent 5f49e49 commit 257ec22

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

Diff for: src/api/api/indices.ts

+96
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,38 @@ export default class Indices {
568568
return await this.transport.request({ path, method, querystring, body, meta }, options)
569569
}
570570

571+
/**
572+
* Deletes the data stream options of the selected data streams.
573+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.x/index.html | Elasticsearch API documentation}
574+
*/
575+
async deleteDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
576+
async deleteDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
577+
async deleteDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
578+
async deleteDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
579+
const acceptedPath: string[] = ['name']
580+
const querystring: Record<string, any> = {}
581+
const body = undefined
582+
583+
params = params ?? {}
584+
for (const key in params) {
585+
if (acceptedPath.includes(key)) {
586+
continue
587+
} else if (key !== 'body') {
588+
querystring[key] = params[key]
589+
}
590+
}
591+
592+
const method = 'DELETE'
593+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_options`
594+
const meta: TransportRequestMetadata = {
595+
name: 'indices.delete_data_stream_options',
596+
pathParts: {
597+
name: params.name
598+
}
599+
}
600+
return await this.transport.request({ path, method, querystring, body, meta }, options)
601+
}
602+
571603
/**
572604
* Delete an index template. The provided <index-template> may contain multiple template names separated by a comma. If multiple template names are specified then there is no wildcard support and the provided names should match completely with existing templates.
573605
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.x/indices-delete-template.html | Elasticsearch API documentation}
@@ -1163,6 +1195,38 @@ export default class Indices {
11631195
return await this.transport.request({ path, method, querystring, body, meta }, options)
11641196
}
11651197

1198+
/**
1199+
* Returns the data stream options of the selected data streams.
1200+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.x/index.html | Elasticsearch API documentation}
1201+
*/
1202+
async getDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
1203+
async getDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
1204+
async getDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
1205+
async getDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
1206+
const acceptedPath: string[] = ['name']
1207+
const querystring: Record<string, any> = {}
1208+
const body = undefined
1209+
1210+
params = params ?? {}
1211+
for (const key in params) {
1212+
if (acceptedPath.includes(key)) {
1213+
continue
1214+
} else if (key !== 'body') {
1215+
querystring[key] = params[key]
1216+
}
1217+
}
1218+
1219+
const method = 'GET'
1220+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_options`
1221+
const meta: TransportRequestMetadata = {
1222+
name: 'indices.get_data_stream_options',
1223+
pathParts: {
1224+
name: params.name
1225+
}
1226+
}
1227+
return await this.transport.request({ path, method, querystring, body, meta }, options)
1228+
}
1229+
11661230
/**
11671231
* Get mapping definitions. Retrieves mapping definitions for one or more fields. For data streams, the API retrieves field mappings for the stream’s backing indices. This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.
11681232
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.x/indices-get-field-mapping.html | Elasticsearch API documentation}
@@ -1669,6 +1733,38 @@ export default class Indices {
16691733
return await this.transport.request({ path, method, querystring, body, meta }, options)
16701734
}
16711735

1736+
/**
1737+
* Updates the data stream options of the selected data streams.
1738+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.x/index.html | Elasticsearch API documentation}
1739+
*/
1740+
async putDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
1741+
async putDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
1742+
async putDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
1743+
async putDataStreamOptions (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
1744+
const acceptedPath: string[] = ['name']
1745+
const querystring: Record<string, any> = {}
1746+
const body = undefined
1747+
1748+
params = params ?? {}
1749+
for (const key in params) {
1750+
if (acceptedPath.includes(key)) {
1751+
continue
1752+
} else if (key !== 'body') {
1753+
querystring[key] = params[key]
1754+
}
1755+
}
1756+
1757+
const method = 'PUT'
1758+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_options`
1759+
const meta: TransportRequestMetadata = {
1760+
name: 'indices.put_data_stream_options',
1761+
pathParts: {
1762+
name: params.name
1763+
}
1764+
}
1765+
return await this.transport.request({ path, method, querystring, body, meta }, options)
1766+
}
1767+
16721768
/**
16731769
* Create or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices. Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name. Index templates are applied during data stream or index creation. For data streams, these settings and mappings are applied when the stream's backing indices are created. Settings and mappings specified in a create index API request override any settings or mappings specified in an index template. Changes to index templates do not affect existing indices, including the existing backing indices of a data stream. You can use C-style `/* *\/` block comments in index templates. You can include comments anywhere in the request body, except before the opening curly bracket. **Multiple matching templates** If multiple index templates match the name of a new index or data stream, the template with the highest priority is used. Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities. **Composing aliases, mappings, and settings** When multiple component templates are specified in the `composed_of` field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates. Any mappings, settings, or aliases from the parent index template are merged in next. Finally, any configuration on the index request itself is merged. Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration. If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one. This recursive merging strategy applies not only to field mappings, but also root options like `dynamic_templates` and `meta`. If an earlier component contains a `dynamic_templates` block, then by default new `dynamic_templates` entries are appended onto the end. If an entry already exists with the same key, then it is overwritten by the new definition.
16741770
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-index-template | Elasticsearch API documentation}

0 commit comments

Comments
 (0)