---
title: "POST /target-policies/{policyName}"
method: POST
path: "/target-policies/{policyName}"
---

# POST /target-policies/{policyName}

`POST /target-policies/{policyName}`

Detaches a policy from the specified target.

Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before it's ready to be deleted.

Requires permission to access the [DetachPolicy](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Path parameters

- `policyName` string, required

## Request body

- object
  - `target` string, required — The target from which the policy will be detached.

## Response `200`

Success

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottlingException
- `482` — UnauthorizedException
- `483` — ServiceUnavailableException
- `484` — InternalFailureException
- `485` — LimitExceededException

---

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