amazonka-iot- Amazon IoT SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <>
Portabilitynon-portable (GHC extensions)
Safe HaskellNone




Deletes the specified policy.

A policy cannot be deleted if:

  • it has non-default versions
  • it is attached to any certificate

To delete a policy:

  • First delete all the non-default versions of the policy using the DeletePolicyVersion API.
  • Detach it from any certificate using the DetachPrincipalPolicy API.

When a policy is deleted, its default version is deleted with it.

See: AWS API Reference for DeletePolicy.


Creating a Request

deletePolicy Source

Creates a value of DeletePolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

dpPolicyName :: Lens' DeletePolicy Text Source

The name of the policy to delete.

Destructuring the Response

deletePolicyResponse :: DeletePolicyResponse Source

Creates a value of DeletePolicyResponse with the minimum fields required to make a request.