| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Returns the Amazon Resource Name (ARN), the IDID, and the assume policy for the specified role. For more information about ARNs, go to ARNs in Using IAM.
iam-rolegetattributes -r
ROLENAME
| Name | Description | Required |
|---|---|---|
|
|
Name of the role you want to get information about. Type: String Default: None |
Yes |
The output lists the role's Amazon Resource Name (ARN), ID, and the associated assume policy.
The following example returns output for a role named myrole. The first line is the ARN, the second line is the role ID, and the last line is the policy that grants permission to Amazon EC2 to assume the role.
PROMPT> iam-rolegetattributes -r myrole
arn:aws:iam::123456789012:role/myrole
AROAJYXWUP72XVEXAMPLE
{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":["ec2.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}