Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data DetachUserPolicy = DetachUserPolicy' {}
- newDetachUserPolicy :: Text -> Text -> DetachUserPolicy
- detachUserPolicy_userName :: Lens' DetachUserPolicy Text
- detachUserPolicy_policyArn :: Lens' DetachUserPolicy Text
- data DetachUserPolicyResponse = DetachUserPolicyResponse' {
- newDetachUserPolicyResponse :: DetachUserPolicyResponse
Creating a Request
data DetachUserPolicy Source #
See: newDetachUserPolicy
smart constructor.
Constructors
DetachUserPolicy' | |
Fields
|
Instances
Arguments
:: Text | |
-> Text | |
-> DetachUserPolicy |
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.
Constructors
DetachUserPolicyResponse' | |
Instances
newDetachUserPolicyResponse :: DetachUserPolicyResponse Source #
Create a value of DetachUserPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.