Mega S4 icon

Mega S4

Interact with Mega.nz S4 object storage (S3-compatible)

IAM → Detach User Policy

AI-generated

Summary

Detach an IAM policy from a specified user by providing the user's name and the policy's ARN.

Inputs

  • User Name (required) — The name of the IAM user from whom you want to detach the policy.
  • Policy ARN (required) — The Amazon Resource Name (ARN) of the IAM policy to detach from the user.

Output shape

a single record confirming the detach operation's success or containing an error message

The output indicates the result of attempting to detach the specified policy from the given user. No pagination applies.

Examples

Example 1: Detach the policy 'MyPolicy' from user 'JohnDoe'

Set 'User Name' to 'JohnDoe' and 'Policy ARN' to 'arn:aws:iam::123456789012:policy/MyPolicy'

Discussion