Copyright | (c) 2013-2021 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 |
Amazonka.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 action to delete all non-default versions of the policy; use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy action to delete the policy.
When a policy is deleted using DeletePolicy, its default version is deleted with it.
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 DeletePolicy action.
Synopsis
Creating a Request
data DeletePolicy Source #
The input for the DeletePolicy operation.
See: newDeletePolicy
smart constructor.
Constructors
DeletePolicy' | |
Fields
|
Instances
Arguments
:: Text | |
-> DeletePolicy |
Create a value of DeletePolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:policyName:DeletePolicy'
, deletePolicy_policyName
- The name of the policy to delete.
Request Lenses
deletePolicy_policyName :: Lens' DeletePolicy Text Source #
The name of the policy to delete.
Destructuring the Response
data DeletePolicyResponse Source #
See: newDeletePolicyResponse
smart constructor.
Constructors
DeletePolicyResponse' | |
Instances
newDeletePolicyResponse :: DeletePolicyResponse Source #
Create a value of DeletePolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.