Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.ListUsers C# (CSharp) Method

ListUsers() public method

Lists the IAM users that have the specified path prefix. If no path prefix is specified, the action returns all users in the AWS account. If there are none, the action returns an empty list.

You can paginate the results using the MaxItems and Marker parameters.

/// The request processing has failed because of an unknown error, exception or failure. ///
public ListUsers ( ) : ListUsersResponse
return ListUsersResponse
        public ListUsersResponse ListUsers()
        {
            return ListUsers(new ListUsersRequest());
        }

Same methods

AmazonIdentityManagementServiceClient::ListUsers ( ListUsersRequest request ) : ListUsersResponse

Usage Example

示例#1
0
        public static void DeleteUsersAndGroupsInTestNameSpace(AmazonIdentityManagementServiceClient client)
        {
            ListGroupsResponse lgRes = client.ListGroups(new ListGroupsRequest() { PathPrefix = TEST_PATH });
            foreach (Group g in lgRes.Groups)
            {
                GetGroupResponse ggRes = client.GetGroup(new GetGroupRequest() { GroupName = g.GroupName });
                foreach (User u in ggRes.Users)
                {
                    client.RemoveUserFromGroup(new RemoveUserFromGroupRequest() { GroupName = g.GroupName, UserName = u.UserName });
                }
                client.DeleteGroup(new DeleteGroupRequest() { GroupName = g.GroupName });
            }

            ListUsersResponse luRes = client.ListUsers(new ListUsersRequest() { PathPrefix = TEST_PATH });
            foreach (User u in luRes.Users)
            {
                DeleteTestUsers(client, u.UserName);
            }
        }
All Usage Examples Of Amazon.IdentityManagement.AmazonIdentityManagementServiceClient::ListUsers
AmazonIdentityManagementServiceClient