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.DetachRolePolicy

Description

Removes the specified managed policy from the specified role.

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

Synopsis

Creating a Request

data DetachRolePolicy Source #

See: newDetachRolePolicy smart constructor.

Constructors

DetachRolePolicy' 

Fields

  • roleName :: Text

    The name (friendly name, not ARN) of the IAM role 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 DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

ToPath DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

ToQuery DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

AWSRequest DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Associated Types

type AWSResponse DetachRolePolicy #

Generic DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Associated Types

type Rep DetachRolePolicy :: Type -> Type #

Read DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Show DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

NFData DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Methods

rnf :: DetachRolePolicy -> () #

Eq DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Hashable DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

type AWSResponse DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

type Rep DetachRolePolicy Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

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

newDetachRolePolicy Source #

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

DetachRolePolicy, detachRolePolicy_roleName - The name (friendly name, not ARN) of the IAM role 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: _+=,.@-

DetachRolePolicy, detachRolePolicy_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

detachRolePolicy_roleName :: Lens' DetachRolePolicy Text Source #

The name (friendly name, not ARN) of the IAM role 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: _+=,.@-

detachRolePolicy_policyArn :: Lens' DetachRolePolicy 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 DetachRolePolicyResponse Source #

See: newDetachRolePolicyResponse smart constructor.

Instances

Instances details
Generic DetachRolePolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Associated Types

type Rep DetachRolePolicyResponse :: Type -> Type #

Read DetachRolePolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Show DetachRolePolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

NFData DetachRolePolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

Eq DetachRolePolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

type Rep DetachRolePolicyResponse Source # 
Instance details

Defined in Amazonka.IAM.DetachRolePolicy

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

newDetachRolePolicyResponse :: DetachRolePolicyResponse Source #

Create a value of DetachRolePolicyResponse with all optional fields omitted.

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