amazonka-iam-2.0: Amazon Identity and Access Management SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.IAM.DetachUserPolicy

Description

Removes the specified managed policy from the specified user.

A user can also have inline policies embedded with it. To delete an inline policy, use DeleteUserPolicy. For information about policies, see Managed policies and inline policies in the IAM User Guide.

Synopsis

Creating a Request

data DetachUserPolicy Source #

See: newDetachUserPolicy smart constructor.

Constructors

DetachUserPolicy' 

Fields

  • userName :: Text

    The name (friendly name, not ARN) of the IAM user to detach the policy from.

    This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

  • policyArn :: Text

    The Amazon Resource Name (ARN) of the IAM policy you want to detach.

    For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Instances

Instances details
ToHeaders DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

ToPath DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

ToQuery DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

AWSRequest DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Associated Types

type AWSResponse DetachUserPolicy #

Generic DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Associated Types

type Rep DetachUserPolicy :: Type -> Type #

Read DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Show DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

NFData DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Methods

rnf :: DetachUserPolicy -> () #

Eq DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Hashable DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

type AWSResponse DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

type Rep DetachUserPolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

type Rep DetachUserPolicy = D1 ('MetaData "DetachUserPolicy" "Amazonka.IAM.DetachUserPolicy" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "DetachUserPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "userName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "policyArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newDetachUserPolicy Source #

Create a value of DetachUserPolicy 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:

DetachUserPolicy, detachUserPolicy_userName - The name (friendly name, not ARN) of the IAM user to detach the policy from.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

DetachUserPolicy, detachUserPolicy_policyArn - The Amazon Resource Name (ARN) of the IAM policy you want to detach.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Request Lenses

detachUserPolicy_userName :: Lens' DetachUserPolicy Text Source #

The name (friendly name, not ARN) of the IAM user to detach the policy from.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

detachUserPolicy_policyArn :: Lens' DetachUserPolicy Text Source #

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Destructuring the Response

data DetachUserPolicyResponse Source #

See: newDetachUserPolicyResponse smart constructor.

Instances

Instances details
Generic DetachUserPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Associated Types

type Rep DetachUserPolicyResponse :: Type -> Type #

Read DetachUserPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Show DetachUserPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

NFData DetachUserPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

Eq DetachUserPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

type Rep DetachUserPolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachUserPolicy

type Rep DetachUserPolicyResponse = D1 ('MetaData "DetachUserPolicyResponse" "Amazonka.IAM.DetachUserPolicy" "amazonka-iam-2.0-5DxkArXx9sD3CCYYGFyGET" 'False) (C1 ('MetaCons "DetachUserPolicyResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDetachUserPolicyResponse :: DetachUserPolicyResponse Source #

Create a value of DetachUserPolicyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.