OpenSearch/docs/reference/ingest/apis/enrich/delete-enrich-policy.asciidoc

70 lines
1.3 KiB
Plaintext

[role="xpack"]
[testenv="basic"]
[[delete-enrich-policy-api]]
=== Delete enrich policy API
++++
<titleabbrev>Delete enrich policy</titleabbrev>
++++
Deletes an existing enrich policy and its enrich index.
////
[source,js]
----
PUT /users
PUT /_enrich/policy/my-policy
{
"match": {
"indices": "users",
"match_field": "email",
"enrich_fields": ["first_name", "last_name", "city", "zip", "state"]
}
}
----
// CONSOLE
// TESTSETUP
////
[source,js]
--------------------------------------------------
DELETE /_enrich/policy/my-policy
--------------------------------------------------
// CONSOLE
[[delete-enrich-policy-api-request]]
==== {api-request-title}
`DELETE /_enrich/policy/<enrich-policy>`
[[delete-enrich-policy-api-prereqs]]
==== {api-prereq-title}
include::put-enrich-policy.asciidoc[tag=enrich-policy-api-prereqs]
[[delete-enrich-policy-api-desc]]
==== {api-description-title}
Use the delete enrich policy API
to delete an existing enrich policy
and its enrich index.
[IMPORTANT]
====
You must remove an enrich policy
from any in-use ingest pipelines
before deletion.
You cannot remove in-use enrich policies.
====
[[delete-enrich-policy-api-path-params]]
==== {api-path-parms-title}
`<enrich-policy>`::
(Required, string)
Enrich policy to delete.