Skip to content

Commit

Permalink
Add documentation for Deprovision Workflow API allow_delete parameter (
Browse files Browse the repository at this point in the history
…opensearch-project#7639)

* Add documentation for Deprovision Workflow API allow_delete parameter

Signed-off-by: Daniel Widdis <[email protected]>

* Add new steps and missing delete search pipeline doc

Signed-off-by: Daniel Widdis <[email protected]>

* Revert changes to workflow steps. Users can't use these new step types

Signed-off-by: Daniel Widdis <[email protected]>

* Update _automating-configurations/api/deprovision-workflow.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

* Update _automating-configurations/api/deprovision-workflow.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

* Update _automating-configurations/api/deprovision-workflow.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>

* Remove redundant use of workflow, accept other edits

Signed-off-by: Daniel Widdis <[email protected]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Sander van de Geijn <[email protected]>
  • Loading branch information
2 people authored and sandervandegeijn committed Jul 30, 2024
1 parent a6530a5 commit 47a3ba9
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Gemfile.lock
.idea
*.iml
.jekyll-cache
.project
13 changes: 12 additions & 1 deletion _automating-configurations/api/deprovision-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ nav_order: 70

When you no longer need a workflow, you can deprovision its resources. Most workflow steps that create a resource have corresponding workflow steps to reverse that action. To retrieve all resources currently created for a workflow, call the [Get Workflow Status API]({{site.url}}{{site.baseurl}}/automating-configurations/api/get-workflow-status/). When you call the Deprovision Workflow API, resources included in the `resources_created` field of the Get Workflow Status API response will be removed using a workflow step corresponding to the one that provisioned them.

The workflow executes the provisioning workflow steps in reverse order. If failures occur because of resource dependencies, such as preventing deletion of a registered model if it is still deployed, the workflow attempts retries.
The workflow executes the provisioning steps in reverse order. If a failure occurs because of a resource dependency, such as trying to delete a registered model that is still deployed, then the workflow retries the failing step as long as at least one resource was deleted.

To prevent data loss, resources created using the `create_index`, `create_search_pipeline`, and `create_ingest_pipeline` steps require the resource ID to be included in the `allow_delete` parameter.

## Path and HTTP methods

Expand All @@ -24,6 +26,7 @@ The following table lists the available path parameters.
| Parameter | Data type | Description |
| :--- | :--- | :--- |
| `workflow_id` | String | The ID of the workflow to be deprovisioned. Required. |
| `allow-delete` | String | A comma-separated list of resource IDs to be deprovisioned. Required if deleting resources of type `index_name` or `pipeline_id`. |

### Example request

Expand Down Expand Up @@ -53,6 +56,14 @@ If deprovisioning did not completely remove all resources, OpenSearch responds w
In some cases, the failure happens because of another dependent resource that took some time to be removed. In this case, you can attempt to send the same request again.
{: .tip}

If deprovisioning required the `allow_delete` parameter, then OpenSearch responds with a `403 (FORBIDDEN)` status and identifies the resources that were not deprovisioned:

```json
{
"error": "These resources require the allow_delete parameter to deprovision: [index_name my-index]."
}
```

To obtain a more detailed deprovisioning status than is provided by the summary in the error response, query the [Get Workflow Status API]({{site.url}}{{site.baseurl}}/automating-configurations/api/get-workflow-status/).

On success, the workflow returns to a `NOT_STARTED` state. If some resources have not yet been removed, they are provided in the response.
26 changes: 26 additions & 0 deletions _search-plugins/search-pipelines/deleting-search-pipeline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: default
title: Deleting search pipelines
nav_order: 30
has_children: false
parent: Search pipelines
grand_parent: Search
---

# Deleting search pipelines

Use the following request to delete a pipeline.

To delete a specific search pipeline, pass the pipeline ID as a parameter:

```json
DELETE /_search/pipeline/<pipeline-id>
```
{% include copy-curl.html %}

To delete all search pipelines in a cluster, use the wildcard character (`*`):

```json
DELETE /_search/pipeline/*
```
{% include copy-curl.html %}

0 comments on commit 47a3ba9

Please sign in to comment.