diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index af4883f41e..a747c8b7c5 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -23334,6 +23334,245 @@ ] } }, + "/_project_routing/{name}": { + "get": { + "tags": [ + "project-routing" + ], + "summary": "Get named project routing expressions", + "description": "Get named project routing expressions.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", + "operationId": "project-routing-get", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of project routing expression", + "required": true, + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_routing._types.ProjectRoutingExpression" + }, + "examples": { + "GetProjectResponseExample1": { + "summary": "A single expressions", + "value": "{\n \"expression\" : \"_csp:aws AND _region:us*\"\n}" + } + } + } + } + } + }, + "x-state": "Technical preview", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "project-routing" + ], + "summary": "Create of update a single named project routing expression", + "description": "Create of update a single named project routing expression.\n\n## Required authorization\n\n* Cluster privileges: `manage`\n", + "operationId": "project-routing-create", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of project routing expression", + "required": true, + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_routing._types.ProjectRoutingExpression" + }, + "examples": { + "CreateProjectRoutingRequestExample1": { + "summary": "A single expression", + "value": "{\n \"expression\" : \"_csp:aws AND _region:us*\"\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "CreateProjectResponseExample1": { + "summary": "A single expressions", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Technical preview", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "delete": { + "tags": [ + "project-routing" + ], + "summary": "Delete named project routing expressions", + "description": "Delete named project routing expressions.\n\n## Required authorization\n\n* Cluster privileges: `manage`\n", + "operationId": "project-routing-delete", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "The name of project routing expression", + "required": true, + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "DeleteProjectResponseExample1": { + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Technical preview", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, + "/_project_routing": { + "get": { + "tags": [ + "project-routing" + ], + "summary": "Get named project routing expressions", + "description": "Get named project routing expressions.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", + "operationId": "project-routing-get-many", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_routing._types.NamedProjectRoutingExpressions" + }, + "examples": { + "GetProjectResponseExample1": { + "summary": "Multiple expressions", + "value": "{\n \"aws-us-only\": { \"expression\": \"_csp:aws AND _region:us*\" },\n \"aws-eu-only\": { \"expression\": \"_csp:aws AND _region:eu*\" }\n}" + } + } + } + } + } + }, + "x-state": "Technical preview", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "put": { + "tags": [ + "project-routing" + ], + "summary": "Create of update named project routing expressions", + "description": "Create or update named project routing expressions.\n\n## Required authorization\n\n* Cluster privileges: `manage`\n", + "operationId": "project-routing-create-many", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_routing._types.NamedProjectRoutingExpressions" + }, + "examples": { + "CreateProjectRoutingRequestExample1": { + "summary": "Multiple expressions", + "value": "{\n \"aws-us-only\": { \"expression\": \"_csp:aws AND _region:us*\" },\n \"aws-eu-only\": { \"expression\": \"_csp:aws AND _region:eu*\" }\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "CreateProjectResponseExample1": { + "summary": "Multiple expressions", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Technical preview", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + } + }, "/_scripts/{id}/{context}": { "put": { "tags": [ @@ -79632,6 +79871,30 @@ "_organisation" ] }, + "project_routing._types.ProjectRoutingExpression": { + "type": "object", + "properties": { + "expression": { + "allOf": [ + { + "$ref": "#/components/schemas/project_routing._types.RoutingExpression" + } + ] + } + }, + "required": [ + "expression" + ] + }, + "project_routing._types.RoutingExpression": { + "type": "string" + }, + "project_routing._types.NamedProjectRoutingExpressions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/project_routing._types.ProjectRoutingExpression" + } + }, "query_rules._types.QueryRule": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index c3864ed57d..2f7ac4d87d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -17107,6 +17107,196 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Create of update a single named project routing expression.\n\nCreate of update a single named project routing expression.", + "docId": "project-routing", + "docTag": "project-routing", + "docUrl": "", + "name": "project_routing.create", + "privileges": { + "cluster": [ + "manage" + ] + }, + "request": { + "name": "Request", + "namespace": "project_routing.create" + }, + "requestBodyRequired": true, + "response": { + "name": "Response", + "namespace": "project_routing.create" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_project_routing/{name}" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Create of update named project routing expressions.\n\nCreate or update named project routing expressions.", + "docId": "project-routing", + "docTag": "project-routing", + "docUrl": "", + "name": "project_routing.create_many", + "privileges": { + "cluster": [ + "manage" + ] + }, + "request": { + "name": "Request", + "namespace": "project_routing.create_many" + }, + "requestBodyRequired": true, + "response": { + "name": "Response", + "namespace": "project_routing.create_many" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_project_routing" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Delete named project routing expressions.\n\nDelete named project routing expressions.", + "docId": "project-routing", + "docTag": "project-routing", + "docUrl": "", + "name": "project_routing.delete", + "privileges": { + "cluster": [ + "manage" + ] + }, + "request": { + "name": "Request", + "namespace": "project_routing.delete" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "project_routing.delete" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "DELETE" + ], + "path": "/_project_routing/{name}" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Get named project routing expressions.\n\nGet named project routing expressions.", + "docId": "project-routing", + "docTag": "project-routing", + "docUrl": "", + "name": "project_routing.get", + "privileges": { + "cluster": [ + "monitor" + ] + }, + "request": { + "name": "Request", + "namespace": "project_routing.get" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "project_routing.get" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_project_routing/{name}" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Get named project routing expressions.\n\nGet named project routing expressions.", + "docId": "project-routing", + "docTag": "project-routing", + "docUrl": "", + "name": "project_routing.get_many", + "privileges": { + "cluster": [ + "monitor" + ] + }, + "request": { + "name": "Request", + "namespace": "project_routing.get_many" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "project_routing.get_many" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_project_routing" + } + ] + }, { "availability": { "serverless": { @@ -236812,6 +237002,393 @@ ], "specLocation": "project/tags/TagsResponse.ts#L23-L31" }, + { + "kind": "type_alias", + "name": { + "name": "NamedProjectRoutingExpressions", + "namespace": "project_routing._types" + }, + "specLocation": "project_routing/_types/RoutingExpression.ts#L28-L28", + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "ProjectRoutingExpression", + "namespace": "project_routing._types" + } + } + } + }, + { + "kind": "interface", + "name": { + "name": "ProjectRoutingExpression", + "namespace": "project_routing._types" + }, + "properties": [ + { + "name": "expression", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "RoutingExpression", + "namespace": "project_routing._types" + } + } + } + ], + "specLocation": "project_routing/_types/RoutingExpression.ts#L24-L26" + }, + { + "kind": "type_alias", + "name": { + "name": "RoutingExpression", + "namespace": "project_routing._types" + }, + "specLocation": "project_routing/_types/RoutingExpression.ts#L22-L22", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "expressions", + "value": { + "kind": "instance_of", + "type": { + "name": "ProjectRoutingExpression", + "namespace": "project_routing._types" + } + } + }, + "description": "Create of update a single named project routing expression.\n\nCreate of update a single named project routing expression.", + "examples": { + "CreateProjectRoutingRequestExample1": { + "method_request": "PUT /_project_routing/aws-us-only", + "summary": "A single expression", + "value": "{\n \"expression\" : \"_csp:aws AND _region:us*\"\n}" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "project_routing.create" + }, + "path": [ + { + "description": "The name of project routing expression", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "project_routing/create/CreateRoutingRequest.ts#L24-L52" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "examples": { + "CreateProjectResponseExample1": { + "summary": "A single expressions", + "value": "{\n \"acknowledged\": true\n}" + } + }, + "name": { + "name": "Response", + "namespace": "project_routing.create" + }, + "specLocation": "project_routing/create/CreateRoutingResponse.ts#L22-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "expressions", + "value": { + "kind": "instance_of", + "type": { + "name": "NamedProjectRoutingExpressions", + "namespace": "project_routing._types" + } + } + }, + "description": "Create of update named project routing expressions.\n\nCreate or update named project routing expressions.", + "examples": { + "CreateProjectRoutingRequestExample1": { + "method_request": "PUT /_project_routing/", + "summary": "Multiple expressions", + "value": "{\n \"aws-us-only\": { \"expression\": \"_csp:aws AND _region:us*\" },\n \"aws-eu-only\": { \"expression\": \"_csp:aws AND _region:eu*\" }\n}" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "project_routing.create_many" + }, + "path": [], + "query": [], + "specLocation": "project_routing/create_many/CreateRoutingRequest.ts#L24-L46" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "examples": { + "CreateProjectResponseExample1": { + "summary": "Multiple expressions", + "value": "{\n \"acknowledged\": true\n}" + } + }, + "name": { + "name": "Response", + "namespace": "project_routing.create_many" + }, + "specLocation": "project_routing/create_many/CreateRoutingResponse.ts#L22-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Delete named project routing expressions.\n\nDelete named project routing expressions.", + "examples": { + "DeleteProjectRoutingRequestExample1": { + "method_request": "DELETE _project_routing/aws-us-only" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "project_routing.delete" + }, + "path": [ + { + "description": "The name of project routing expression", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "project_routing/delete/DeleteRoutingRequest.ts#L23-L47" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "examples": { + "DeleteProjectResponseExample1": { + "value": "{\n \"acknowledged\": true\n}" + } + }, + "name": { + "name": "Response", + "namespace": "project_routing.delete" + }, + "specLocation": "project_routing/delete/DeleteRoutingResponse.ts#L22-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Get named project routing expressions.\n\nGet named project routing expressions.", + "examples": { + "GetProjectRoutingRequestExample1": { + "method_request": "GET /_project_routing/aws-us-only", + "summary": "A single expression" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "project_routing.get" + }, + "path": [ + { + "description": "The name of project routing expression", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "project_routing/get/GetRoutingRequest.ts#L23-L47" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "ProjectRoutingExpression", + "namespace": "project_routing._types" + } + } + }, + "examples": { + "GetProjectResponseExample1": { + "summary": "A single expressions", + "value": "{\n \"expression\" : \"_csp:aws AND _region:us*\"\n}" + } + }, + "name": { + "name": "Response", + "namespace": "project_routing.get" + }, + "specLocation": "project_routing/get/GetRoutingResponse.ts#L22-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Get named project routing expressions.\n\nGet named project routing expressions.", + "examples": { + "GetProjectRoutingRequestExample1": { + "method_request": "GET /_project_routing/", + "summary": "Multiple expressions" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "project_routing.get_many" + }, + "path": [], + "query": [], + "specLocation": "project_routing/get_many/GetRoutingRequest.ts#L23-L41" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "NamedProjectRoutingExpressions", + "namespace": "project_routing._types" + } + } + }, + "examples": { + "GetProjectResponseExample1": { + "summary": "Multiple expressions", + "value": "{\n \"aws-us-only\": { \"expression\": \"_csp:aws AND _region:us*\" },\n \"aws-eu-only\": { \"expression\": \"_csp:aws AND _region:eu*\" }\n}" + } + }, + "name": { + "name": "Response", + "namespace": "project_routing.get_many" + }, + "specLocation": "project_routing/get_many/GetRoutingResponse.ts#L22-L25" + }, { "kind": "interface", "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index f228416ea7..54faf6bc1a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -20107,6 +20107,44 @@ export interface ProjectTagsTagsKeys { export type ProjectTagsTags = ProjectTagsTagsKeys & { [property: string]: string } +export type ProjectRoutingNamedProjectRoutingExpressions = Record + +export interface ProjectRoutingProjectRoutingExpression { + expression: ProjectRoutingRoutingExpression +} + +export type ProjectRoutingRoutingExpression = string + +export interface ProjectRoutingCreateRequest extends RequestBase { + name: string + body?: ProjectRoutingProjectRoutingExpression +} + +export type ProjectRoutingCreateResponse = AcknowledgedResponseBase + +export interface ProjectRoutingCreateManyRequest extends RequestBase { + body?: ProjectRoutingNamedProjectRoutingExpressions +} + +export type ProjectRoutingCreateManyResponse = AcknowledgedResponseBase + +export interface ProjectRoutingDeleteRequest extends RequestBase { + name: string +} + +export type ProjectRoutingDeleteResponse = AcknowledgedResponseBase + +export interface ProjectRoutingGetRequest extends RequestBase { + name: string +} + +export type ProjectRoutingGetResponse = ProjectRoutingProjectRoutingExpression + +export interface ProjectRoutingGetManyRequest extends RequestBase { +} + +export type ProjectRoutingGetManyResponse = ProjectRoutingNamedProjectRoutingExpressions + export interface QueryRulesQueryRule { rule_id: Id type: QueryRulesQueryRuleType diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index eda1a873b9..b19928ed1c 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -541,6 +541,7 @@ prevalidate-node-removal,https://www.elastic.co/docs/api/doc/elasticsearch/group preview-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-dfanalytics.html, preview-transform,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-transform.html, project-tags,https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-project-tags,,Get tags +project-routing,,,Project routing put-analytics-collection,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-analytics-collection.html, put-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-dfanalytics.html, put-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-enrich-policy-api.html, diff --git a/specification/_json_spec/project_routing.create.json b/specification/_json_spec/project_routing.create.json new file mode 100644 index 0000000000..ebaed298a5 --- /dev/null +++ b/specification/_json_spec/project_routing.create.json @@ -0,0 +1,32 @@ +{ + "project_routing.create": { + "documentation": { + "url": null, + "description": "Create or update named project routing expression" + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_project_routing/{name}", + "methods": ["PUT"], + "parts": { + "name": { + "type": "string", + "description": "The name of the project routing expression" + } + } + } + ] + }, + "body": { + "description": "Project routing expression to save", + "required": true + } + } +} diff --git a/specification/_json_spec/project_routing.create_many.json b/specification/_json_spec/project_routing.create_many.json new file mode 100644 index 0000000000..b7b1827db3 --- /dev/null +++ b/specification/_json_spec/project_routing.create_many.json @@ -0,0 +1,26 @@ +{ + "project_routing.create_many": { + "documentation": { + "url": null, + "description": "Create or update named project routing expressions" + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_project_routing/", + "methods": ["PUT"] + } + ] + }, + "body": { + "description": "Project routing expressions to save", + "required": true + } + } +} diff --git a/specification/_json_spec/project_routing.delete.json b/specification/_json_spec/project_routing.delete.json new file mode 100644 index 0000000000..a9244b051b --- /dev/null +++ b/specification/_json_spec/project_routing.delete.json @@ -0,0 +1,28 @@ +{ + "project_routing.delete": { + "documentation": { + "url": null, + "description": "Delete named project routing expression" + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_project_routing/{name}", + "methods": ["DELETE"], + "parts": { + "name": { + "type": "string", + "description": "The name of the project routing expression" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/project_routing.get.json b/specification/_json_spec/project_routing.get.json new file mode 100644 index 0000000000..a383958850 --- /dev/null +++ b/specification/_json_spec/project_routing.get.json @@ -0,0 +1,28 @@ +{ + "project_routing.get": { + "documentation": { + "url": null, + "description": "Get named project routing expression" + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_project_routing/{name}", + "methods": ["GET"], + "parts": { + "name": { + "type": "string", + "description": "The name of the project routing expression" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/project_routing.get_many.json b/specification/_json_spec/project_routing.get_many.json new file mode 100644 index 0000000000..79645d273a --- /dev/null +++ b/specification/_json_spec/project_routing.get_many.json @@ -0,0 +1,22 @@ +{ + "project_routing.get_many": { + "documentation": { + "url": null, + "description": "Get named project routing expressions" + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_project_routing/", + "methods": ["GET"] + } + ] + } + } +} diff --git a/specification/project_routing/_types/RoutingExpression.ts b/specification/project_routing/_types/RoutingExpression.ts new file mode 100644 index 0000000000..bdf7ce48c9 --- /dev/null +++ b/specification/project_routing/_types/RoutingExpression.ts @@ -0,0 +1,31 @@ +/* + * 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 { Dictionary } from '@spec_utils/Dictionary' + +export type RoutingExpression = string + +export class ProjectRoutingExpression { + expression: RoutingExpression +} + +export type NamedProjectRoutingExpressions = Dictionary< + string, + ProjectRoutingExpression +> diff --git a/specification/project_routing/create/CreateRoutingRequest.ts b/specification/project_routing/create/CreateRoutingRequest.ts new file mode 100644 index 0000000000..b3bc7fd933 --- /dev/null +++ b/specification/project_routing/create/CreateRoutingRequest.ts @@ -0,0 +1,52 @@ +/* + * 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 { MediaType } from '@_types/common' +import { ProjectRoutingExpression } from '../_types/RoutingExpression' + +/** + * Create of update a single named project routing expression. + * + * Create of update a single named project routing expression. + * @doc_id project-routing + * @rest_spec_name project_routing.create + * @availability serverless stability=experimental visibility=public + * @cluster_privileges manage + * @doc_tag project-routing + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_project_routing/{name}' + methods: ['PUT'] + } + ] + response_media_type: MediaType.Json + path_parts: { + /** + * The name of project routing expression + */ + name: string + } + /** + * @codegen_name expressions + */ + body: ProjectRoutingExpression +} diff --git a/specification/project_routing/create/CreateRoutingResponse.ts b/specification/project_routing/create/CreateRoutingResponse.ts new file mode 100644 index 0000000000..9e7bdb91cd --- /dev/null +++ b/specification/project_routing/create/CreateRoutingResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { + /** @codegen_name result */ + body: AcknowledgedResponseBase +} diff --git a/specification/project_routing/create/examples/request/CreateProjectRoutingRequestExample1.yaml b/specification/project_routing/create/examples/request/CreateProjectRoutingRequestExample1.yaml new file mode 100644 index 0000000000..d31d3d9364 --- /dev/null +++ b/specification/project_routing/create/examples/request/CreateProjectRoutingRequestExample1.yaml @@ -0,0 +1,7 @@ +summary: A single expression +method_request: PUT /_project_routing/aws-us-only +# type: request +value: |- + { + "expression" : "_csp:aws AND _region:us*" + } diff --git a/specification/project_routing/create/examples/response/CreateProjectResponseExample1.yaml b/specification/project_routing/create/examples/response/CreateProjectResponseExample1.yaml new file mode 100644 index 0000000000..080fd4a9d9 --- /dev/null +++ b/specification/project_routing/create/examples/response/CreateProjectResponseExample1.yaml @@ -0,0 +1,7 @@ +summary: A single expressions +# type: response +# response_code: 201 +value: |- + { + "acknowledged": true + } diff --git a/specification/project_routing/create_many/CreateRoutingRequest.ts b/specification/project_routing/create_many/CreateRoutingRequest.ts new file mode 100644 index 0000000000..b48a50da24 --- /dev/null +++ b/specification/project_routing/create_many/CreateRoutingRequest.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 { MediaType } from '@_types/common' +import { NamedProjectRoutingExpressions } from '../_types/RoutingExpression' + +/** + * Create of update named project routing expressions. + * + * Create or update named project routing expressions. + * @doc_id project-routing + * @rest_spec_name project_routing.create_many + * @availability serverless stability=experimental visibility=public + * @cluster_privileges manage + * @doc_tag project-routing + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_project_routing' + methods: ['PUT'] + } + ] + response_media_type: MediaType.Json + /** + * @codegen_name expressions + */ + body: NamedProjectRoutingExpressions +} diff --git a/specification/project_routing/create_many/CreateRoutingResponse.ts b/specification/project_routing/create_many/CreateRoutingResponse.ts new file mode 100644 index 0000000000..9e7bdb91cd --- /dev/null +++ b/specification/project_routing/create_many/CreateRoutingResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { + /** @codegen_name result */ + body: AcknowledgedResponseBase +} diff --git a/specification/project_routing/create_many/examples/request/CreateProjectRoutingRequestExample1.yaml b/specification/project_routing/create_many/examples/request/CreateProjectRoutingRequestExample1.yaml new file mode 100644 index 0000000000..d18369879d --- /dev/null +++ b/specification/project_routing/create_many/examples/request/CreateProjectRoutingRequestExample1.yaml @@ -0,0 +1,8 @@ +summary: Multiple expressions +method_request: PUT /_project_routing/ +# type: request +value: |- + { + "aws-us-only": { "expression": "_csp:aws AND _region:us*" }, + "aws-eu-only": { "expression": "_csp:aws AND _region:eu*" } + } diff --git a/specification/project_routing/create_many/examples/response/CreateProjectResponseExample1.yaml b/specification/project_routing/create_many/examples/response/CreateProjectResponseExample1.yaml new file mode 100644 index 0000000000..11b3e431ba --- /dev/null +++ b/specification/project_routing/create_many/examples/response/CreateProjectResponseExample1.yaml @@ -0,0 +1,7 @@ +summary: Multiple expressions +# type: response +# response_code: 201 +value: |- + { + "acknowledged": true + } diff --git a/specification/project_routing/delete/DeleteRoutingRequest.ts b/specification/project_routing/delete/DeleteRoutingRequest.ts new file mode 100644 index 0000000000..f8c01f1238 --- /dev/null +++ b/specification/project_routing/delete/DeleteRoutingRequest.ts @@ -0,0 +1,47 @@ +/* + * 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 { MediaType } from '@_types/common' + +/** + * Delete named project routing expressions. + * + * Delete named project routing expressions. + * @doc_id project-routing + * @rest_spec_name project_routing.delete + * @availability serverless stability=experimental visibility=public + * @cluster_privileges manage + * @doc_tag project-routing + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_project_routing/{name}' + methods: ['DELETE'] + } + ] + response_media_type: MediaType.Json + path_parts: { + /** + * The name of project routing expression + */ + name: string + } +} diff --git a/specification/project_routing/delete/DeleteRoutingResponse.ts b/specification/project_routing/delete/DeleteRoutingResponse.ts new file mode 100644 index 0000000000..9e7bdb91cd --- /dev/null +++ b/specification/project_routing/delete/DeleteRoutingResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { + /** @codegen_name result */ + body: AcknowledgedResponseBase +} diff --git a/specification/project_routing/delete/examples/request/DeleteProjectRoutingRequestExample1.yaml b/specification/project_routing/delete/examples/request/DeleteProjectRoutingRequestExample1.yaml new file mode 100644 index 0000000000..4d43169446 --- /dev/null +++ b/specification/project_routing/delete/examples/request/DeleteProjectRoutingRequestExample1.yaml @@ -0,0 +1 @@ +method_request: DELETE _project_routing/aws-us-only diff --git a/specification/project_routing/delete/examples/response/DeleteProjectResponseExample1.yaml b/specification/project_routing/delete/examples/response/DeleteProjectResponseExample1.yaml new file mode 100644 index 0000000000..87e087808a --- /dev/null +++ b/specification/project_routing/delete/examples/response/DeleteProjectResponseExample1.yaml @@ -0,0 +1,6 @@ +# type: response +# response_code: 200 +value: |- + { + "acknowledged": true + } diff --git a/specification/project_routing/get/GetRoutingRequest.ts b/specification/project_routing/get/GetRoutingRequest.ts new file mode 100644 index 0000000000..cc77b14f7a --- /dev/null +++ b/specification/project_routing/get/GetRoutingRequest.ts @@ -0,0 +1,47 @@ +/* + * 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 { MediaType } from '@_types/common' + +/** + * Get named project routing expressions. + * + * Get named project routing expressions. + * @doc_id project-routing + * @rest_spec_name project_routing.get + * @availability serverless stability=experimental visibility=public + * @cluster_privileges monitor + * @doc_tag project-routing + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_project_routing/{name}' + methods: ['GET'] + } + ] + response_media_type: MediaType.Json + path_parts: { + /** + * The name of project routing expression + */ + name: string + } +} diff --git a/specification/project_routing/get/GetRoutingResponse.ts b/specification/project_routing/get/GetRoutingResponse.ts new file mode 100644 index 0000000000..23c6a8c841 --- /dev/null +++ b/specification/project_routing/get/GetRoutingResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { ProjectRoutingExpression } from '../_types/RoutingExpression' + +export class Response { + /** @codegen_name result */ + body: ProjectRoutingExpression +} diff --git a/specification/project_routing/get/examples/request/GetProjectRoutingRequestExample1.yaml b/specification/project_routing/get/examples/request/GetProjectRoutingRequestExample1.yaml new file mode 100644 index 0000000000..cee8549a7b --- /dev/null +++ b/specification/project_routing/get/examples/request/GetProjectRoutingRequestExample1.yaml @@ -0,0 +1,2 @@ +summary: A single expression +method_request: GET /_project_routing/aws-us-only diff --git a/specification/project_routing/get/examples/response/GetProjectResponseExample1.yaml b/specification/project_routing/get/examples/response/GetProjectResponseExample1.yaml new file mode 100644 index 0000000000..18d4fb6f6c --- /dev/null +++ b/specification/project_routing/get/examples/response/GetProjectResponseExample1.yaml @@ -0,0 +1,7 @@ +summary: A single expressions +# type: response +# response_code: 201 +value: |- + { + "expression" : "_csp:aws AND _region:us*" + } diff --git a/specification/project_routing/get_many/GetRoutingRequest.ts b/specification/project_routing/get_many/GetRoutingRequest.ts new file mode 100644 index 0000000000..344929a978 --- /dev/null +++ b/specification/project_routing/get_many/GetRoutingRequest.ts @@ -0,0 +1,41 @@ +/* + * 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 { MediaType } from '@_types/common' + +/** + * Get named project routing expressions. + * + * Get named project routing expressions. + * @doc_id project-routing + * @rest_spec_name project_routing.get_many + * @availability serverless stability=experimental visibility=public + * @cluster_privileges monitor + * @doc_tag project-routing + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_project_routing' + methods: ['GET'] + } + ] + response_media_type: MediaType.Json +} diff --git a/specification/project_routing/get_many/GetRoutingResponse.ts b/specification/project_routing/get_many/GetRoutingResponse.ts new file mode 100644 index 0000000000..3f4698f47d --- /dev/null +++ b/specification/project_routing/get_many/GetRoutingResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { NamedProjectRoutingExpressions } from '../_types/RoutingExpression' + +export class Response { + /** @codegen_name result */ + body: NamedProjectRoutingExpressions +} diff --git a/specification/project_routing/get_many/examples/request/GetProjectRoutingRequestExample1.yaml b/specification/project_routing/get_many/examples/request/GetProjectRoutingRequestExample1.yaml new file mode 100644 index 0000000000..731ed7d8e4 --- /dev/null +++ b/specification/project_routing/get_many/examples/request/GetProjectRoutingRequestExample1.yaml @@ -0,0 +1,2 @@ +summary: Multiple expressions +method_request: GET /_project_routing/ diff --git a/specification/project_routing/get_many/examples/response/GetProjectResponseExample1.yaml b/specification/project_routing/get_many/examples/response/GetProjectResponseExample1.yaml new file mode 100644 index 0000000000..ac12e2630b --- /dev/null +++ b/specification/project_routing/get_many/examples/response/GetProjectResponseExample1.yaml @@ -0,0 +1,8 @@ +summary: Multiple expressions +# type: response +# response_code: 200 +value: |- + { + "aws-us-only": { "expression": "_csp:aws AND _region:us*" }, + "aws-eu-only": { "expression": "_csp:aws AND _region:eu*" } + }