---
title: "POST /#X-Amz-Target=AmazonForecast.DeleteResourceTree"
method: POST
path: "/#X-Amz-Target=AmazonForecast.DeleteResourceTree"
---

# POST /#X-Amz-Target=AmazonForecast.DeleteResourceTree

`POST /#X-Amz-Target=AmazonForecast.DeleteResourceTree`

Deletes an entire resource tree. This operation will delete the parent resource and its child resources.

Child resources are resources that were created from another resource. For example, when a forecast is generated from a predictor, the forecast is the child resource and the predictor is the parent resource.

Amazon Forecast resources possess the following parent-child resource hierarchies:

*   **Dataset**: dataset import jobs
    
*   **Dataset Group**: predictors, predictor backtest export jobs, forecasts, forecast export jobs
    
*   **Predictor**: predictor backtest export jobs, forecasts, forecast export jobs
    
*   **Forecast**: forecast export jobs
    

`DeleteResourceTree` will only delete Amazon Forecast resources, and will not delete datasets or exported files stored in Amazon S3.

## Headers

- `X-Amz-Target` 'AmazonForecast.DeleteResourceTree', required

## Request body

- DeleteResourceTreeRequest
  - `ResourceArn` string, required — The Amazon Resource Name (ARN) of the parent resource to delete. All child resources of the parent resource will also be deleted.

## Response `200`

Success

## Other responses

- `480` — InvalidInputException
- `481` — ResourceNotFoundException
- `482` — ResourceInUseException

---

[API](https://skmtc.net/aws/apis/forecast.md) · [All operations](https://skmtc.net/aws/apis/forecast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/forecast/versions/3d1c872d2ac9/schema)
