diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index ab8aa344b6..0b6d833f27 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -15850,6 +15850,84 @@ }, "x-available-since": "8.15.0" }, + "put": { + "tags": [ + "ingest.put_geoip_database" + ], + "summary": "Returns information about one or more geoip database configurations", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html" + }, + "operationId": "ingest-put-geoip-database", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "ID of the database configuration to create or update.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types:Name" + }, + "maxmind": { + "$ref": "#/components/schemas/ingest._types:Maxmind" + } + }, + "required": [ + "name", + "maxmind" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + }, + "x-available-since": "8.15.0" + }, "delete": { "tags": [ "ingest.delete_geoip_database" @@ -86141,7 +86219,7 @@ "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "database": { - "$ref": "#/components/schemas/ingest.get_geoip_database:DatabaseConfiguration" + "$ref": "#/components/schemas/ingest._types:DatabaseConfiguration" } }, "required": [ @@ -86151,14 +86229,14 @@ "database" ] }, - "ingest.get_geoip_database:DatabaseConfiguration": { + "ingest._types:DatabaseConfiguration": { "type": "object", "properties": { "name": { "$ref": "#/components/schemas/_types:Name" }, "maxmind": { - "$ref": "#/components/schemas/ingest.get_geoip_database:Maxmind" + "$ref": "#/components/schemas/ingest._types:Maxmind" } }, "required": [ @@ -86166,7 +86244,7 @@ "maxmind" ] }, - "ingest.get_geoip_database:Maxmind": { + "ingest._types:Maxmind": { "type": "object", "properties": { "account_id": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 11c6bfb6a8..30b8557c3b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8673,17 +8673,26 @@ }, { "availability": { + "serverless": { + "visibility": "private" + }, "stack": { - "stability": "stable", - "visibility": "public" + "since": "8.15.0", + "stability": "stable" } }, - "description": "Puts the configuration for a geoip database to be downloaded", + "description": "Returns information about one or more geoip database configurations.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", "name": "ingest.put_geoip_database", - "request": null, + "request": { + "name": "Request", + "namespace": "ingest.put_geoip_database" + }, "requestBodyRequired": true, - "response": null, + "response": { + "name": "Response", + "namespace": "ingest.put_geoip_database" + }, "responseMediaType": [ "application/json" ], @@ -139101,6 +139110,40 @@ ], "specLocation": "ingest/_types/Processors.ts#L467-L500" }, + { + "kind": "interface", + "name": { + "name": "DatabaseConfiguration", + "namespace": "ingest._types" + }, + "properties": [ + { + "description": "The provider-assigned name of the IP geolocation database to download.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + } + }, + { + "description": "The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.", + "name": "maxmind", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Maxmind", + "namespace": "ingest._types" + } + } + } + ], + "specLocation": "ingest/_types/Database.ts#L22-L29" + }, { "kind": "interface", "inherits": { @@ -140440,6 +140483,27 @@ ], "specLocation": "ingest/_types/Processors.ts#L910-L926" }, + { + "kind": "interface", + "name": { + "name": "Maxmind", + "namespace": "ingest._types" + }, + "properties": [ + { + "name": "account_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "specLocation": "ingest/_types/Database.ts#L31-L33" + }, { "kind": "interface", "name": { @@ -142389,38 +142453,6 @@ }, "specLocation": "ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31" }, - { - "kind": "interface", - "name": { - "name": "DatabaseConfiguration", - "namespace": "ingest.get_geoip_database" - }, - "properties": [ - { - "name": "name", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Name", - "namespace": "_types" - } - } - }, - { - "name": "maxmind", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Maxmind", - "namespace": "ingest.get_geoip_database" - } - } - } - ], - "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L35-L38" - }, { "kind": "interface", "name": { @@ -142477,33 +142509,12 @@ "kind": "instance_of", "type": { "name": "DatabaseConfiguration", - "namespace": "ingest.get_geoip_database" - } - } - } - ], - "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L28-L33" - }, - { - "kind": "interface", - "name": { - "name": "Maxmind", - "namespace": "ingest.get_geoip_database" - }, - "properties": [ - { - "name": "account_id", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" + "namespace": "ingest._types" } } } ], - "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L40-L42" + "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34" }, { "kind": "request", @@ -142580,7 +142591,7 @@ "name": "Response", "namespace": "ingest.get_geoip_database" }, - "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L24-L26" + "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27" }, { "kind": "request", @@ -142732,6 +142743,113 @@ }, "specLocation": "ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The provider-assigned name of the IP geolocation database to download.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + } + }, + { + "description": "The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.", + "name": "maxmind", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Maxmind", + "namespace": "ingest._types" + } + } + } + ] + }, + "description": "Returns information about one or more geoip database configurations.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "ingest.put_geoip_database" + }, + "path": [ + { + "description": "ID of the database configuration to create or update.", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L57" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "ingest.put_geoip_database" + }, + "specLocation": "ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L24" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index f3828541d2..9440f6e928 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -884,7 +884,8 @@ }, "ingest.put_geoip_database": { "request": [ - "Missing request & response" + "Request: query parameter 'master_timeout' does not exist in the json spec", + "Request: query parameter 'timeout' does not exist in the json spec" ], "response": [] }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index faddb6885c..7551b3f4ca 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12644,6 +12644,11 @@ export interface IngestCsvProcessor extends IngestProcessorBase { trim?: boolean } +export interface IngestDatabaseConfiguration { + name: Name + maxmind: IngestMaxmind +} + export interface IngestDateIndexNameProcessor extends IngestProcessorBase { date_formats: string[] date_rounding: string @@ -12783,6 +12788,10 @@ export interface IngestLowercaseProcessor extends IngestProcessorBase { target_field?: Field } +export interface IngestMaxmind { + account_id: Id +} + export interface IngestPipeline { description?: string on_failure?: IngestProcessorContainer[] @@ -12973,20 +12982,11 @@ export interface IngestGeoIpStatsResponse { nodes: Record } -export interface IngestGetGeoipDatabaseDatabaseConfiguration { - name: Name - maxmind: IngestGetGeoipDatabaseMaxmind -} - export interface IngestGetGeoipDatabaseDatabaseConfigurationMetadata { id: Id version: long modified_date_millis: EpochTime - database: IngestGetGeoipDatabaseDatabaseConfiguration -} - -export interface IngestGetGeoipDatabaseMaxmind { - account_id: Id + database: IngestDatabaseConfiguration } export interface IngestGetGeoipDatabaseRequest extends RequestBase { @@ -13013,6 +13013,18 @@ export interface IngestProcessorGrokResponse { patterns: Record } +export interface IngestPutGeoipDatabaseRequest extends RequestBase { + id: Id + master_timeout?: Duration + timeout?: Duration + body?: { + name: Name + maxmind: IngestMaxmind + } +} + +export type IngestPutGeoipDatabaseResponse = AcknowledgedResponseBase + export interface IngestPutPipelineRequest extends RequestBase { id: Id master_timeout?: Duration diff --git a/specification/ingest/_types/Database.ts b/specification/ingest/_types/Database.ts new file mode 100644 index 0000000000..8c20e3b871 --- /dev/null +++ b/specification/ingest/_types/Database.ts @@ -0,0 +1,33 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Id, Name } from '@_types/common' + +export class DatabaseConfiguration { + /** The provider-assigned name of the IP geolocation database to download. */ + name: Name + /** The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. + * At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured. + */ + maxmind: Maxmind +} + +export class Maxmind { + account_id: Id +} diff --git a/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts b/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts index b8b675250c..169e99d532 100644 --- a/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts +++ b/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts @@ -17,9 +17,10 @@ * under the License. */ -import { Id, Name } from '@_types/common' +import { Id } from '@_types/common' import { long } from '@_types/Numeric' import { EpochTime, UnitMillis } from '@_types/Time' +import { DatabaseConfiguration } from '@ingest/_types/Database' export class Response { body: { databases: DatabaseConfigurationMetadata[] } @@ -31,12 +32,3 @@ class DatabaseConfigurationMetadata { modified_date_millis: EpochTime database: DatabaseConfiguration } - -class DatabaseConfiguration { - name: Name - maxmind: Maxmind -} - -class Maxmind { - account_id: Id -} diff --git a/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts b/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts new file mode 100644 index 0000000000..918431b6d6 --- /dev/null +++ b/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts @@ -0,0 +1,57 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' +import { Id, Name } from '@_types/common' +import { Duration } from '@_types/Time' +import { Maxmind } from '@ingest/_types/Database' + +/** + * Returns information about one or more geoip database configurations. + * @rest_spec_name ingest.put_geoip_database + * @availability stack since=8.15.0 stability=stable + * @availability serverless visibility=private + */ +export interface Request extends RequestBase { + path_parts: { + /** + * ID of the database configuration to create or update. + */ + id: Id + } + query_parameters: { + /** + * 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. + * @server_default 30s */ + master_timeout?: Duration + /** + * Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @server_default 30s */ + timeout?: Duration + } + body: { + /** The provider-assigned name of the IP geolocation database to download. */ + name: Name + /** The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. + * At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured. + */ + maxmind: Maxmind + } +} diff --git a/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts b/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +}