amazonka-iam-1.6.0: Amazon Identity and Access Management SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.IAM.DeletePolicy

Contents

Description

Deletes the specified managed policy.

Before you can delete a managed policy, you must first detach the policy from all users, groups, and roles that it is attached to. In addition you must delete all the policy's versions. The following steps describe the process for deleting a managed policy:

  • Detach the policy from all users, groups, and roles that the policy is attached to, using the DetachUserPolicy , DetachGroupPolicy , or DetachRolePolicy API operations. To list all the users, groups, and roles that a policy is attached to, use ListEntitiesForPolicy .
  • Delete all versions of the policy using DeletePolicyVersion . To list the policy's versions, use ListPolicyVersions . You cannot use DeletePolicyVersion to delete the version that is marked as the default version. You delete the policy's default version in the next step of the process.
  • Delete the policy (this automatically deletes the policy's default version) using this API.

For information about managed policies, see Managed Policies and Inline Policies in the IAM User Guide .

Synopsis

Creating a Request

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:

data DeletePolicy #

See: deletePolicy smart constructor.

Instances
Eq DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Data DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeletePolicy -> c DeletePolicy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeletePolicy #

toConstr :: DeletePolicy -> Constr #

dataTypeOf :: DeletePolicy -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DeletePolicy) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeletePolicy) #

gmapT :: (forall b. Data b => b -> b) -> DeletePolicy -> DeletePolicy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeletePolicy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeletePolicy -> r #

gmapQ :: (forall d. Data d => d -> u) -> DeletePolicy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DeletePolicy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeletePolicy -> m DeletePolicy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeletePolicy -> m DeletePolicy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeletePolicy -> m DeletePolicy #

Read DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Show DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Generic DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Associated Types

type Rep DeletePolicy :: * -> * #

Hashable DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

AWSRequest DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Associated Types

type Rs DeletePolicy :: * #

ToHeaders DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

ToPath DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

ToQuery DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

NFData DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Methods

rnf :: DeletePolicy -> () #

type Rep DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

type Rep DeletePolicy = D1 (MetaData "DeletePolicy" "Network.AWS.IAM.DeletePolicy" "amazonka-iam-1.6.0-KLHg33OPBsA2oss7MTCyZq" True) (C1 (MetaCons "DeletePolicy'" PrefixI True) (S1 (MetaSel (Just "_dpPolicyARN") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))
type Rs DeletePolicy # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Request Lenses

dpPolicyARN :: Lens' DeletePolicy Text #

The Amazon Resource Name (ARN) of the IAM policy you want to delete. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

Destructuring the Response

deletePolicyResponse :: DeletePolicyResponse #

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

data DeletePolicyResponse #

See: deletePolicyResponse smart constructor.

Instances
Eq DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Data DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeletePolicyResponse -> c DeletePolicyResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeletePolicyResponse #

toConstr :: DeletePolicyResponse -> Constr #

dataTypeOf :: DeletePolicyResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DeletePolicyResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeletePolicyResponse) #

gmapT :: (forall b. Data b => b -> b) -> DeletePolicyResponse -> DeletePolicyResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeletePolicyResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeletePolicyResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DeletePolicyResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DeletePolicyResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeletePolicyResponse -> m DeletePolicyResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeletePolicyResponse -> m DeletePolicyResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeletePolicyResponse -> m DeletePolicyResponse #

Read DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Show DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Generic DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Associated Types

type Rep DeletePolicyResponse :: * -> * #

NFData DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

Methods

rnf :: DeletePolicyResponse -> () #

type Rep DeletePolicyResponse # 
Instance details

Defined in Network.AWS.IAM.DeletePolicy

type Rep DeletePolicyResponse = D1 (MetaData "DeletePolicyResponse" "Network.AWS.IAM.DeletePolicy" "amazonka-iam-1.6.0-KLHg33OPBsA2oss7MTCyZq" False) (C1 (MetaCons "DeletePolicyResponse'" PrefixI False) (U1 :: * -> *))