Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class GetAccountAuthorizationDetailsCommandProtected

Retrieves information about all IAM users, groups, roles, and policies in your Amazon Web Services account, including their relationships to one another. Use this operation to obtain a snapshot of the configuration of IAM permissions (users, groups, roles, and policies) in your account.

Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the decode method of the java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar functionality.

You can optionally filter the results using the Filter parameter. You can paginate the results using the MaxItems and Marker parameters.

Example

Use a bare-bones client and the command you need to make an API call.

import { IAMClient, GetAccountAuthorizationDetailsCommand } from "@aws-sdk/client-iam"; // ES Modules import
// const { IAMClient, GetAccountAuthorizationDetailsCommand } = require("@aws-sdk/client-iam"); // CommonJS import
const client = new IAMClient(config);
const input = { // GetAccountAuthorizationDetailsRequest
Filter: [ // entityListType
"User" || "Role" || "Group" || "LocalManagedPolicy" || "AWSManagedPolicy",
],
MaxItems: Number("int"),
Marker: "STRING_VALUE",
};
const command = new GetAccountAuthorizationDetailsCommand(input);
const response = await client.send(command);
// { // GetAccountAuthorizationDetailsResponse
// UserDetailList: [ // userDetailListType
// { // UserDetail
// Path: "STRING_VALUE",
// UserName: "STRING_VALUE",
// UserId: "STRING_VALUE",
// Arn: "STRING_VALUE",
// CreateDate: new Date("TIMESTAMP"),
// UserPolicyList: [ // policyDetailListType
// { // PolicyDetail
// PolicyName: "STRING_VALUE",
// PolicyDocument: "STRING_VALUE",
// },
// ],
// GroupList: [ // groupNameListType
// "STRING_VALUE",
// ],
// AttachedManagedPolicies: [ // attachedPoliciesListType
// { // AttachedPolicy
// PolicyName: "STRING_VALUE",
// PolicyArn: "STRING_VALUE",
// },
// ],
// PermissionsBoundary: { // AttachedPermissionsBoundary
// PermissionsBoundaryType: "PermissionsBoundaryPolicy",
// PermissionsBoundaryArn: "STRING_VALUE",
// },
// Tags: [ // tagListType
// { // Tag
// Key: "STRING_VALUE", // required
// Value: "STRING_VALUE", // required
// },
// ],
// },
// ],
// GroupDetailList: [ // groupDetailListType
// { // GroupDetail
// Path: "STRING_VALUE",
// GroupName: "STRING_VALUE",
// GroupId: "STRING_VALUE",
// Arn: "STRING_VALUE",
// CreateDate: new Date("TIMESTAMP"),
// GroupPolicyList: [
// {
// PolicyName: "STRING_VALUE",
// PolicyDocument: "STRING_VALUE",
// },
// ],
// AttachedManagedPolicies: [
// {
// PolicyName: "STRING_VALUE",
// PolicyArn: "STRING_VALUE",
// },
// ],
// },
// ],
// RoleDetailList: [ // roleDetailListType
// { // RoleDetail
// Path: "STRING_VALUE",
// RoleName: "STRING_VALUE",
// RoleId: "STRING_VALUE",
// Arn: "STRING_VALUE",
// CreateDate: new Date("TIMESTAMP"),
// AssumeRolePolicyDocument: "STRING_VALUE",
// InstanceProfileList: [ // instanceProfileListType
// { // InstanceProfile
// Path: "STRING_VALUE", // required
// InstanceProfileName: "STRING_VALUE", // required
// InstanceProfileId: "STRING_VALUE", // required
// Arn: "STRING_VALUE", // required
// CreateDate: new Date("TIMESTAMP"), // required
// Roles: [ // roleListType // required
// { // Role
// Path: "STRING_VALUE", // required
// RoleName: "STRING_VALUE", // required
// RoleId: "STRING_VALUE", // required
// Arn: "STRING_VALUE", // required
// CreateDate: new Date("TIMESTAMP"), // required
// AssumeRolePolicyDocument: "STRING_VALUE",
// Description: "STRING_VALUE",
// MaxSessionDuration: Number("int"),
// PermissionsBoundary: {
// PermissionsBoundaryType: "PermissionsBoundaryPolicy",
// PermissionsBoundaryArn: "STRING_VALUE",
// },
// Tags: [
// {
// Key: "STRING_VALUE", // required
// Value: "STRING_VALUE", // required
// },
// ],
// RoleLastUsed: { // RoleLastUsed
// LastUsedDate: new Date("TIMESTAMP"),
// Region: "STRING_VALUE",
// },
// },
// ],
// Tags: "<tagListType>",
// },
// ],
// RolePolicyList: [
// {
// PolicyName: "STRING_VALUE",
// PolicyDocument: "STRING_VALUE",
// },
// ],
// AttachedManagedPolicies: [
// {
// PolicyName: "STRING_VALUE",
// PolicyArn: "STRING_VALUE",
// },
// ],
// PermissionsBoundary: {
// PermissionsBoundaryType: "PermissionsBoundaryPolicy",
// PermissionsBoundaryArn: "STRING_VALUE",
// },
// Tags: "<tagListType>",
// RoleLastUsed: {
// LastUsedDate: new Date("TIMESTAMP"),
// Region: "STRING_VALUE",
// },
// },
// ],
// Policies: [ // ManagedPolicyDetailListType
// { // ManagedPolicyDetail
// PolicyName: "STRING_VALUE",
// PolicyId: "STRING_VALUE",
// Arn: "STRING_VALUE",
// Path: "STRING_VALUE",
// DefaultVersionId: "STRING_VALUE",
// AttachmentCount: Number("int"),
// PermissionsBoundaryUsageCount: Number("int"),
// IsAttachable: true || false,
// Description: "STRING_VALUE",
// CreateDate: new Date("TIMESTAMP"),
// UpdateDate: new Date("TIMESTAMP"),
// PolicyVersionList: [ // policyDocumentVersionListType
// { // PolicyVersion
// Document: "STRING_VALUE",
// VersionId: "STRING_VALUE",
// IsDefaultVersion: true || false,
// CreateDate: new Date("TIMESTAMP"),
// },
// ],
// },
// ],
// IsTruncated: true || false,
// Marker: "STRING_VALUE",
// };

Param

GetAccountAuthorizationDetailsCommandInput

Returns

GetAccountAuthorizationDetailsCommandOutput

See

Throws

ServiceFailureException (server fault)

The request processing has failed because of an unknown error, exception or failure.

Throws

IAMServiceException

Base exception class for all service exceptions from IAM service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods