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 |
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.
DeletePolicy' | |
|
Instances
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.
Instances
Eq DeletePolicyResponse Source # | |
Defined in Amazonka.IoT.DeletePolicy (==) :: DeletePolicyResponse -> DeletePolicyResponse -> Bool # (/=) :: DeletePolicyResponse -> DeletePolicyResponse -> Bool # | |
Read DeletePolicyResponse Source # | |
Defined in Amazonka.IoT.DeletePolicy | |
Show DeletePolicyResponse Source # | |
Defined in Amazonka.IoT.DeletePolicy showsPrec :: Int -> DeletePolicyResponse -> ShowS # show :: DeletePolicyResponse -> String # showList :: [DeletePolicyResponse] -> ShowS # | |
Generic DeletePolicyResponse Source # | |
Defined in Amazonka.IoT.DeletePolicy type Rep DeletePolicyResponse :: Type -> Type # from :: DeletePolicyResponse -> Rep DeletePolicyResponse x # to :: Rep DeletePolicyResponse x -> DeletePolicyResponse # | |
NFData DeletePolicyResponse Source # | |
Defined in Amazonka.IoT.DeletePolicy rnf :: DeletePolicyResponse -> () # | |
type Rep DeletePolicyResponse Source # | |
newDeletePolicyResponse :: DeletePolicyResponse Source #
Create a value of DeletePolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.