| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.IoT.DeletePolicy
Description
Deletes the specified policy.
A policy cannot be deleted if it has non-default versions or it is attached to any certificate.
To delete a policy, use the DeletePolicyVersion API to delete all non-default versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete the policy.
When a policy is deleted using DeletePolicy, its default version is deleted with it.
Synopsis
Creating a Request
Arguments
| :: Text | |
| -> DeletePolicy |
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:
dpPolicyName- The name of the policy to delete.
data DeletePolicy Source #
The input for the DeletePolicy operation.
See: deletePolicy smart constructor.
Instances
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.
data DeletePolicyResponse Source #
See: deletePolicyResponse smart constructor.