diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index d885cc159a..c3ede242cf 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -15396,6 +15396,145 @@ "x-state": "Added in 8.15.0" } }, + "/_ingest/ip_location/database/{id}": { + "get": { + "tags": [ + "ingest" + ], + "summary": "Returns information about one or more IP location database configurations", + "operationId": "ingest-get-ip-location-database-1", + "parameters": [ + { + "$ref": "#/components/parameters/ingest.get_ip_location_database#id" + }, + { + "$ref": "#/components/parameters/ingest.get_ip_location_database#master_timeout" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ingest.get_ip_location_database#200" + } + }, + "x-state": "Added in 8.15.0" + }, + "put": { + "tags": [ + "ingest" + ], + "summary": "Returns information about one or more IP location database configurations", + "operationId": "ingest-put-ip-location-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": { + "$ref": "#/components/schemas/ingest._types:DatabaseConfiguration" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Added in 8.15.0" + }, + "delete": { + "tags": [ + "ingest" + ], + "summary": "Deletes an IP location database configuration", + "operationId": "ingest-delete-ip-location-database", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "A comma-separated list of IP location database configurations to delete", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Ids" + }, + "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" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Added in 8.15.0" + } + }, "/_ingest/pipeline/{id}": { "get": { "tags": [ @@ -15653,6 +15792,26 @@ "x-state": "Added in 8.15.0" } }, + "/_ingest/ip_location/database": { + "get": { + "tags": [ + "ingest" + ], + "summary": "Returns information about one or more IP location database configurations", + "operationId": "ingest-get-ip-location-database", + "parameters": [ + { + "$ref": "#/components/parameters/ingest.get_ip_location_database#master_timeout" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ingest.get_ip_location_database#200" + } + }, + "x-state": "Added in 8.15.0" + } + }, "/_ingest/pipeline": { "get": { "tags": [ @@ -70281,18 +70440,32 @@ ] }, "ingest._types:DatabaseConfiguration": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/_types:Name" + "description": "The configuration necessary to identify which IP geolocation provider to use to download a database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported providers are maxmind and ipinfo, and the maxmind provider requires that an account_id (string) is configured.\nA provider (either maxmind or ipinfo) must be specified. The web and local providers can be returned as read only configurations.", + "allOf": [ + { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types:Name" + } + }, + "required": [ + "name" + ] }, - "maxmind": { - "$ref": "#/components/schemas/ingest._types:Maxmind" + { + "type": "object", + "properties": { + "maxmind": { + "$ref": "#/components/schemas/ingest._types:Maxmind" + }, + "ipinfo": { + "$ref": "#/components/schemas/ingest._types:Ipinfo" + } + }, + "minProperties": 1, + "maxProperties": 1 } - }, - "required": [ - "name", - "maxmind" ] }, "ingest._types:Maxmind": { @@ -70306,6 +70479,66 @@ "account_id" ] }, + "ingest._types:Ipinfo": { + "type": "object" + }, + "ingest.get_ip_location_database:DatabaseConfigurationMetadata": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "version": { + "$ref": "#/components/schemas/_types:VersionNumber" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" + }, + "database": { + "$ref": "#/components/schemas/ingest._types:DatabaseConfigurationFull" + } + }, + "required": [ + "id", + "version", + "database" + ] + }, + "ingest._types:DatabaseConfigurationFull": { + "allOf": [ + { + "$ref": "#/components/schemas/ingest._types:DatabaseConfiguration" + }, + { + "type": "object", + "properties": { + "web": { + "$ref": "#/components/schemas/ingest._types:Web" + }, + "local": { + "$ref": "#/components/schemas/ingest._types:Local" + } + } + } + ] + }, + "ingest._types:Web": { + "type": "object" + }, + "ingest._types:Local": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, "ingest._types:Pipeline": { "type": "object", "properties": { @@ -91175,6 +91408,27 @@ } } }, + "ingest.get_ip_location_database#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest.get_ip_location_database:DatabaseConfigurationMetadata" + } + } + }, + "required": [ + "databases" + ] + } + } + } + }, "ingest.get_pipeline#200": { "description": "", "content": { @@ -98309,6 +98563,27 @@ }, "style": "form" }, + "ingest.get_ip_location_database#id": { + "in": "path", + "name": "id", + "description": "Comma-separated list of database configuration IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all database configurations, omit this parameter or use `*`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Ids" + }, + "style": "simple" + }, + "ingest.get_ip_location_database#master_timeout": { + "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" + }, "ingest.get_pipeline#id": { "in": "path", "name": "id", diff --git a/output/schema/schema.json b/output/schema/schema.json index 772ac0e6e8..7bd60b362c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8667,17 +8667,26 @@ }, { "availability": { + "serverless": { + "visibility": "private" + }, "stack": { - "stability": "stable", - "visibility": "public" + "since": "8.15.0", + "stability": "stable" } }, - "description": "Deletes an ip location database configuration", + "description": "Deletes an IP location database configuration.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-ip-location-database-api.html", "name": "ingest.delete_ip_location_database", - "request": null, + "request": { + "name": "Request", + "namespace": "ingest.delete_ip_location_database" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "ingest.delete_ip_location_database" + }, "responseMediaType": [ "application/json" ], @@ -8807,17 +8816,26 @@ }, { "availability": { + "serverless": { + "visibility": "private" + }, "stack": { - "stability": "stable", - "visibility": "public" + "since": "8.15.0", + "stability": "stable" } }, - "description": "Returns the specified ip location database configuration", + "description": "Returns information about one or more IP location database configurations.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-ip-location-database-api.html", "name": "ingest.get_ip_location_database", - "request": null, + "request": { + "name": "Request", + "namespace": "ingest.get_ip_location_database" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "ingest.get_ip_location_database" + }, "responseMediaType": [ "application/json" ], @@ -8956,20 +8974,29 @@ }, { "availability": { + "serverless": { + "visibility": "private" + }, "stack": { - "stability": "stable", - "visibility": "public" + "since": "8.15.0", + "stability": "stable" } }, - "description": "Puts the configuration for a ip location database to be downloaded", + "description": "Returns information about one or more IP location database configurations.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-ip-location-database-api.html", "name": "ingest.put_ip_location_database", - "request": null, + "request": { + "name": "Request", + "namespace": "ingest.put_ip_location_database" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "ingest.put_ip_location_database" + }, "responseMediaType": [ "application/json" ], @@ -142781,12 +142808,14 @@ }, { "kind": "interface", + "description": "The configuration necessary to identify which IP geolocation provider to use to download a database, as well as any provider-specific configuration necessary for such downloading.\nAt present, the only supported providers are maxmind and ipinfo, and the maxmind provider requires that an account_id (string) is configured.\nA provider (either maxmind or ipinfo) must be specified. The web and local providers can be returned as read only configurations.", "name": { "name": "DatabaseConfiguration", "namespace": "ingest._types" }, "properties": [ { + "containerProperty": true, "description": "The provider-assigned name of the IP geolocation database to download.", "name": "name", "required": true, @@ -142799,9 +142828,8 @@ } }, { - "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, + "required": false, "type": { "kind": "instance_of", "type": { @@ -142809,9 +142837,61 @@ "namespace": "ingest._types" } } + }, + { + "name": "ipinfo", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Ipinfo", + "namespace": "ingest._types" + } + } + } + ], + "specLocation": "ingest/_types/Database.ts#L22-L37", + "variants": { + "kind": "container" + } + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "DatabaseConfiguration", + "namespace": "ingest._types" + } + }, + "name": { + "name": "DatabaseConfigurationFull", + "namespace": "ingest._types" + }, + "properties": [ + { + "name": "web", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Web", + "namespace": "ingest._types" + } + } + }, + { + "name": "local", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Local", + "namespace": "ingest._types" + } + } } ], - "specLocation": "ingest/_types/Database.ts#L22-L29" + "specLocation": "ingest/_types/Database.ts#L39-L42" }, { "kind": "interface", @@ -144274,6 +144354,15 @@ ], "specLocation": "ingest/_types/Processors.ts#L478-L512" }, + { + "kind": "interface", + "name": { + "name": "Ipinfo", + "namespace": "ingest._types" + }, + "properties": [], + "specLocation": "ingest/_types/Database.ts#L48-L48" + }, { "kind": "interface", "inherits": { @@ -144581,6 +144670,27 @@ ], "specLocation": "ingest/_types/Processors.ts#L1158-L1210" }, + { + "kind": "interface", + "name": { + "name": "Local", + "namespace": "ingest._types" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ingest/_types/Database.ts#L52-L54" + }, { "kind": "interface", "inherits": { @@ -144654,7 +144764,7 @@ } } ], - "specLocation": "ingest/_types/Database.ts#L31-L33" + "specLocation": "ingest/_types/Database.ts#L44-L46" }, { "kind": "interface", @@ -146764,6 +146874,15 @@ }, "specLocation": "ingest/_types/Processors.ts#L547-L553" }, + { + "kind": "interface", + "name": { + "name": "Web", + "namespace": "ingest._types" + }, + "properties": [], + "specLocation": "ingest/_types/Database.ts#L50-L50" + }, { "kind": "request", "attachedBehaviors": [ @@ -146845,6 +146964,87 @@ }, "specLocation": "ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L24" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Deletes an IP location database configuration.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "ingest.delete_ip_location_database" + }, + "path": [ + { + "description": "A comma-separated list of IP location database configurations to delete", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Ids", + "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/delete_ip_location_database/DeleteIpLocationDatabaseRequest.ts#L24-L48" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "ingest.delete_ip_location_database" + }, + "specLocation": "ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L24" + }, { "kind": "request", "attachedBehaviors": [ @@ -147291,6 +147491,166 @@ }, "specLocation": "ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27" }, + { + "kind": "interface", + "name": { + "name": "DatabaseConfigurationMetadata", + "namespace": "ingest.get_ip_location_database" + }, + "properties": [ + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "version", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionNumber", + "namespace": "_types" + } + } + }, + { + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "name": "database", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DatabaseConfigurationFull", + "namespace": "ingest._types" + } + } + } + ], + "specLocation": "ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L29-L35" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Returns information about one or more IP location database configurations.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "ingest.get_ip_location_database" + }, + "path": [ + { + "description": "Comma-separated list of database configuration IDs to retrieve.\nWildcard (`*`) expressions are supported.\nTo get all database configurations, omit this parameter or use `*`.", + "name": "id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Ids", + "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" + } + } + } + ], + "specLocation": "ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts#L24-L46" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "databases", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DatabaseConfigurationMetadata", + "namespace": "ingest.get_ip_location_database" + } + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "ingest.get_ip_location_database" + }, + "specLocation": "ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L25-L27" + }, { "kind": "request", "attachedBehaviors": [ @@ -147548,6 +147908,95 @@ }, "specLocation": "ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L24" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "configuration", + "value": { + "kind": "instance_of", + "type": { + "name": "DatabaseConfiguration", + "namespace": "ingest._types" + } + } + }, + "description": "Returns information about one or more IP location database configurations.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "ingest.put_ip_location_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_ip_location_database/PutIpLocationDatabaseRequest.ts#L25-L51" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "ingest.put_ip_location_database" + }, + "specLocation": "ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L24" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 18f4b43d11..dec4e947a9 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -553,7 +553,8 @@ }, "ingest.delete_ip_location_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": [] }, @@ -565,7 +566,7 @@ }, "ingest.get_ip_location_database": { "request": [ - "Missing request & response" + "Request: query parameter 'master_timeout' does not exist in the json spec" ], "response": [] }, @@ -578,7 +579,8 @@ }, "ingest.put_ip_location_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 2de101888b..a01d40e52f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12876,7 +12876,13 @@ export interface IngestCsvProcessor extends IngestProcessorBase { export interface IngestDatabaseConfiguration { name: Name - maxmind: IngestMaxmind + maxmind?: IngestMaxmind + ipinfo?: IngestIpinfo +} + +export interface IngestDatabaseConfigurationFull extends IngestDatabaseConfiguration { + web?: IngestWeb + local?: IngestLocal } export interface IngestDateIndexNameProcessor extends IngestProcessorBase { @@ -13028,6 +13034,10 @@ export interface IngestIpLocationProcessor extends IngestProcessorBase { download_database_on_pipeline_creation?: boolean } +export interface IngestIpinfo { + [key: string]: never +} + export interface IngestJoinProcessor extends IngestProcessorBase { field: Field separator: string @@ -13058,6 +13068,10 @@ export interface IngestKeyValueProcessor extends IngestProcessorBase { value_split: string } +export interface IngestLocal { + type: string +} + export interface IngestLowercaseProcessor extends IngestProcessorBase { field: Field ignore_missing?: boolean @@ -13265,6 +13279,10 @@ export interface IngestUserAgentProcessor extends IngestProcessorBase { export type IngestUserAgentProperty = 'name' | 'os' | 'device' | 'original' | 'version' +export interface IngestWeb { + [key: string]: never +} + export interface IngestDeleteGeoipDatabaseRequest extends RequestBase { id: Ids master_timeout?: Duration @@ -13273,6 +13291,14 @@ export interface IngestDeleteGeoipDatabaseRequest extends RequestBase { export type IngestDeleteGeoipDatabaseResponse = AcknowledgedResponseBase +export interface IngestDeleteIpLocationDatabaseRequest extends RequestBase { + id: Ids + master_timeout?: Duration + timeout?: Duration +} + +export type IngestDeleteIpLocationDatabaseResponse = AcknowledgedResponseBase + export interface IngestDeletePipelineRequest extends RequestBase { id: Id master_timeout?: Duration @@ -13323,6 +13349,23 @@ export interface IngestGetGeoipDatabaseResponse { databases: IngestGetGeoipDatabaseDatabaseConfigurationMetadata[] } +export interface IngestGetIpLocationDatabaseDatabaseConfigurationMetadata { + id: Id + version: VersionNumber + modified_date_millis?: EpochTime + modified_date?: EpochTime + database: IngestDatabaseConfigurationFull +} + +export interface IngestGetIpLocationDatabaseRequest extends RequestBase { + id?: Ids + master_timeout?: Duration +} + +export interface IngestGetIpLocationDatabaseResponse { + databases: IngestGetIpLocationDatabaseDatabaseConfigurationMetadata[] +} + export interface IngestGetPipelineRequest extends RequestBase { id?: Id master_timeout?: Duration @@ -13350,6 +13393,15 @@ export interface IngestPutGeoipDatabaseRequest extends RequestBase { export type IngestPutGeoipDatabaseResponse = AcknowledgedResponseBase +export interface IngestPutIpLocationDatabaseRequest extends RequestBase { + id: Id + master_timeout?: Duration + timeout?: Duration + body?: IngestDatabaseConfiguration +} + +export type IngestPutIpLocationDatabaseResponse = 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 index 8c20e3b871..3210d86da8 100644 --- a/specification/ingest/_types/Database.ts +++ b/specification/ingest/_types/Database.ts @@ -19,15 +19,36 @@ import { Id, Name } from '@_types/common' +/** + * The configuration necessary to identify which IP geolocation provider to use to download a database, as well as any provider-specific configuration necessary for such downloading. + * At present, the only supported providers are maxmind and ipinfo, and the maxmind provider requires that an account_id (string) is configured. + * A provider (either maxmind or ipinfo) must be specified. The web and local providers can be returned as read only configurations. + * @variants container + */ 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. + /** + * The provider-assigned name of the IP geolocation database to download. + * @variant container_property */ - maxmind: Maxmind + name: Name + + maxmind?: Maxmind + ipinfo?: Ipinfo +} + +export class DatabaseConfigurationFull extends DatabaseConfiguration { + web?: Web + local?: Local } export class Maxmind { account_id: Id } + +export class Ipinfo {} + +export class Web {} + +export class Local { + type: string +} diff --git a/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseRequest.ts b/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseRequest.ts new file mode 100644 index 0000000000..e582550a23 --- /dev/null +++ b/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseRequest.ts @@ -0,0 +1,48 @@ +/* + * 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 { Ids } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Deletes an IP location database configuration. + * @rest_spec_name ingest.delete_ip_location_database + * @availability stack since=8.15.0 stability=stable + * @availability serverless visibility=private + */ +export interface Request extends RequestBase { + path_parts: { + /** + * A comma-separated list of IP location database configurations to delete + */ + id: Ids + } + 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 + } +} diff --git a/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts b/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.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 +} diff --git a/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts b/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts new file mode 100644 index 0000000000..41e4700f37 --- /dev/null +++ b/specification/ingest/get_ip_location_database/GetIpLocationDatabaseRequest.ts @@ -0,0 +1,46 @@ +/* + * 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 { Ids } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Returns information about one or more IP location database configurations. + * @rest_spec_name ingest.get_ip_location_database + * @availability stack since=8.15.0 stability=stable + * @availability serverless visibility=private + */ +export interface Request extends RequestBase { + path_parts: { + /** + * Comma-separated list of database configuration IDs to retrieve. + * Wildcard (`*`) expressions are supported. + * To get all database configurations, omit this parameter or use `*`. + */ + id?: Ids + } + 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 + } +} diff --git a/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts b/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts new file mode 100644 index 0000000000..6f194ba8bb --- /dev/null +++ b/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts @@ -0,0 +1,34 @@ +/* + * 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 { DatabaseConfigurationFull } from '@ingest/_types/Database' +import { Id, VersionNumber } from '@_types/common' +import { EpochTime, UnitMillis } from '@_types/Time' + +export class Response { + body: { databases: DatabaseConfigurationMetadata[] } +} + +class DatabaseConfigurationMetadata { + id: Id + version: VersionNumber + modified_date_millis?: EpochTime + modified_date?: EpochTime + database: DatabaseConfigurationFull +} diff --git a/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts b/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts new file mode 100644 index 0000000000..e27b6ac5c4 --- /dev/null +++ b/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts @@ -0,0 +1,51 @@ +/* + * 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 { DatabaseConfiguration } from '@ingest/_types/Database' +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Returns information about one or more IP location database configurations. + * @rest_spec_name ingest.put_ip_location_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 + } + /** @codegen_name configuration */ + body: DatabaseConfiguration +} diff --git a/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts b/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.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 +}