Skip to content

Commit 868dd02

Browse files
Auto-generated API code (#2721)
1 parent d29e079 commit 868dd02

File tree

4 files changed

+159
-9
lines changed

4 files changed

+159
-9
lines changed

docs/reference/api-reference.md

-2
Original file line numberDiff line numberDiff line change
@@ -13530,8 +13530,6 @@ Multi-target syntax is supported.
1353013530
- **`master_timeout` (Optional, string | -1 | 0)**: The period to wait for the master node.
1353113531
If the master node is not available before the timeout expires, the request fails and returns an error.
1353213532
To indicate that the request should never timeout, set it to `-1`.
13533-
- **`timeout` (Optional, string | -1 | 0)**: The period of time to wait for a response.
13534-
If no response is received before the timeout expires, the request fails and returns an error.
1353513533

1353613534
## client.snapshot.create [_snapshot.create]
1353713535
Create a snapshot.

src/api/api/indices.ts

+156
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ export default class Indices {
209209
'expand_wildcards'
210210
]
211211
},
212+
'indices.delete_data_stream_options': {
213+
path: [
214+
'name'
215+
],
216+
body: [],
217+
query: []
218+
},
212219
'indices.delete_index_template': {
213220
path: [
214221
'name'
@@ -408,6 +415,13 @@ export default class Indices {
408415
'verbose'
409416
]
410417
},
418+
'indices.get_data_stream_options': {
419+
path: [
420+
'name'
421+
],
422+
body: [],
423+
query: []
424+
},
411425
'indices.get_field_mapping': {
412426
path: [
413427
'fields',
@@ -559,6 +573,13 @@ export default class Indices {
559573
'timeout'
560574
]
561575
},
576+
'indices.put_data_stream_options': {
577+
path: [
578+
'name'
579+
],
580+
body: [],
581+
query: []
582+
},
562583
'indices.put_index_template': {
563584
path: [
564585
'name'
@@ -1564,6 +1585,51 @@ export default class Indices {
15641585
return await this.transport.request({ path, method, querystring, body, meta }, options)
15651586
}
15661587

1588+
/**
1589+
* Deletes the data stream options of the selected data streams.
1590+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html | Elasticsearch API documentation}
1591+
*/
1592+
async deleteDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
1593+
async deleteDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
1594+
async deleteDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
1595+
async deleteDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
1596+
const {
1597+
path: acceptedPath
1598+
} = this.acceptedParams['indices.delete_data_stream_options']
1599+
1600+
const userQuery = params?.querystring
1601+
const querystring: Record<string, any> = userQuery != null ? { ...userQuery } : {}
1602+
1603+
let body: Record<string, any> | string | undefined
1604+
const userBody = params?.body
1605+
if (userBody != null) {
1606+
if (typeof userBody === 'string') {
1607+
body = userBody
1608+
} else {
1609+
body = { ...userBody }
1610+
}
1611+
}
1612+
1613+
params = params ?? {}
1614+
for (const key in params) {
1615+
if (acceptedPath.includes(key)) {
1616+
continue
1617+
} else if (key !== 'body' && key !== 'querystring') {
1618+
querystring[key] = params[key]
1619+
}
1620+
}
1621+
1622+
const method = 'DELETE'
1623+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_options`
1624+
const meta: TransportRequestMetadata = {
1625+
name: 'indices.delete_data_stream_options',
1626+
pathParts: {
1627+
name: params.name
1628+
}
1629+
}
1630+
return await this.transport.request({ path, method, querystring, body, meta }, options)
1631+
}
1632+
15671633
/**
15681634
* 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.
15691635
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template | Elasticsearch API documentation}
@@ -2377,6 +2443,51 @@ export default class Indices {
23772443
return await this.transport.request({ path, method, querystring, body, meta }, options)
23782444
}
23792445

2446+
/**
2447+
* Returns the data stream options of the selected data streams.
2448+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html | Elasticsearch API documentation}
2449+
*/
2450+
async getDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
2451+
async getDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
2452+
async getDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
2453+
async getDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
2454+
const {
2455+
path: acceptedPath
2456+
} = this.acceptedParams['indices.get_data_stream_options']
2457+
2458+
const userQuery = params?.querystring
2459+
const querystring: Record<string, any> = userQuery != null ? { ...userQuery } : {}
2460+
2461+
let body: Record<string, any> | string | undefined
2462+
const userBody = params?.body
2463+
if (userBody != null) {
2464+
if (typeof userBody === 'string') {
2465+
body = userBody
2466+
} else {
2467+
body = { ...userBody }
2468+
}
2469+
}
2470+
2471+
params = params ?? {}
2472+
for (const key in params) {
2473+
if (acceptedPath.includes(key)) {
2474+
continue
2475+
} else if (key !== 'body' && key !== 'querystring') {
2476+
querystring[key] = params[key]
2477+
}
2478+
}
2479+
2480+
const method = 'GET'
2481+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_options`
2482+
const meta: TransportRequestMetadata = {
2483+
name: 'indices.get_data_stream_options',
2484+
pathParts: {
2485+
name: params.name
2486+
}
2487+
}
2488+
return await this.transport.request({ path, method, querystring, body, meta }, options)
2489+
}
2490+
23802491
/**
23812492
* 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.
23822493
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping | Elasticsearch API documentation}
@@ -3049,6 +3160,51 @@ export default class Indices {
30493160
return await this.transport.request({ path, method, querystring, body, meta }, options)
30503161
}
30513162

3163+
/**
3164+
* Updates the data stream options of the selected data streams.
3165+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html | Elasticsearch API documentation}
3166+
*/
3167+
async putDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
3168+
async putDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
3169+
async putDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
3170+
async putDataStreamOptions (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
3171+
const {
3172+
path: acceptedPath
3173+
} = this.acceptedParams['indices.put_data_stream_options']
3174+
3175+
const userQuery = params?.querystring
3176+
const querystring: Record<string, any> = userQuery != null ? { ...userQuery } : {}
3177+
3178+
let body: Record<string, any> | string | undefined
3179+
const userBody = params?.body
3180+
if (userBody != null) {
3181+
if (typeof userBody === 'string') {
3182+
body = userBody
3183+
} else {
3184+
body = { ...userBody }
3185+
}
3186+
}
3187+
3188+
params = params ?? {}
3189+
for (const key in params) {
3190+
if (acceptedPath.includes(key)) {
3191+
continue
3192+
} else if (key !== 'body' && key !== 'querystring') {
3193+
querystring[key] = params[key]
3194+
}
3195+
}
3196+
3197+
const method = 'PUT'
3198+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_options`
3199+
const meta: TransportRequestMetadata = {
3200+
name: 'indices.put_data_stream_options',
3201+
pathParts: {
3202+
name: params.name
3203+
}
3204+
}
3205+
return await this.transport.request({ path, method, querystring, body, meta }, options)
3206+
}
3207+
30523208
/**
30533209
* 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.
30543210
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template | Elasticsearch API documentation}

src/api/api/snapshot.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export default class Snapshot {
5555
'indices'
5656
],
5757
query: [
58-
'master_timeout',
59-
'timeout'
58+
'master_timeout'
6059
]
6160
},
6261
'snapshot.create': {

src/api/types.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -33941,16 +33941,13 @@ export interface SnapshotCloneRequest extends RequestBase {
3394133941
* If the master node is not available before the timeout expires, the request fails and returns an error.
3394233942
* To indicate that the request should never timeout, set it to `-1`. */
3394333943
master_timeout?: Duration
33944-
/** The period of time to wait for a response.
33945-
* If no response is received before the timeout expires, the request fails and returns an error. */
33946-
timeout?: Duration
3394733944
/** A comma-separated list of indices to include in the snapshot.
3394833945
* Multi-target syntax is supported. */
3394933946
indices: string
3395033947
/** All values in `body` will be added to the request body. */
33951-
body?: string | { [key: string]: any } & { repository?: never, snapshot?: never, target_snapshot?: never, master_timeout?: never, timeout?: never, indices?: never }
33948+
body?: string | { [key: string]: any } & { repository?: never, snapshot?: never, target_snapshot?: never, master_timeout?: never, indices?: never }
3395233949
/** All values in `querystring` will be added to the request querystring. */
33953-
querystring?: { [key: string]: any } & { repository?: never, snapshot?: never, target_snapshot?: never, master_timeout?: never, timeout?: never, indices?: never }
33950+
querystring?: { [key: string]: any } & { repository?: never, snapshot?: never, target_snapshot?: never, master_timeout?: never, indices?: never }
3395433951
}
3395533952

3395633953
export type SnapshotCloneResponse = AcknowledgedResponseBase

0 commit comments

Comments
 (0)