list_group_members
¶
list_group_members(
directory_id: DirectoryId,
sam_account_name: GroupName,
*,
config_overrides: Optional[DirectoryServiceDataClientConfig] = None,
realm: Optional[Realm] = None,
member_realm: Optional[Realm] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
) -> ListGroupMembersResult
Returns member information for the specified group.
This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the ListGroupMembers.NextToken member contains a token that you pass in the next call to ListGroupMembers. This retrieves the next set of items.
You can also specify a maximum number of return results with the MaxResults parameter.
Parameters:
-
directory_id(DirectoryId) –The identifier (ID) of the directory that's associated with the group.
-
realm(Optional[Realm], default:None) –The domain name that's associated with the group.
This parameter is optional, so you can return members from a group outside of your Managed Microsoft AD domain. When no value is defined, only members of your Managed Microsoft AD groups are returned.
This value is case insensitive.
-
member_realm(Optional[Realm], default:None) –The domain name that's associated with the group member. This parameter defaults to the Managed Microsoft AD domain.
This parameter is optional and case insensitive.
-
sam_account_name(GroupName) –The name of the group.
-
next_token(Optional[NextToken], default:None) –An encoded paging token for paginated calls that can be passed back to retrieve the next page.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to be returned per request.
Raises:
-
AccessDeniedException–You don't have permission to perform the request or access the directory. It can also occur when the
DirectoryIddoesn't exist or the user, member, or group might be outside of your organizational unit (OU).Make sure that you have the authentication and authorization to perform the action. Review the directory information in the request, and make sure that the object isn't outside of your OU.
-
DirectoryUnavailableException–The request could not be completed due to a problem in the configuration or current state of the specified directory.
-
InternalServerException–The operation didn't succeed because an internal error occurred. Try again later.
-
ResourceNotFoundException–The resource couldn't be found.
-
ThrottlingException–The limit on the number of requests per second has been exceeded.
-
ValidationException–The request isn't valid. Review the details in the error message to update the invalid parameters or values in your request.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To list members of a group The following command lists Marketing users in the trusted domain example.local.
>>> client.list_group_members(directory_id='d-12233abcde', sam_account_name='marketing', member_realm='example.local', realm='examplecorp.com')
Source code in docs_src/capo_directory_service_data/_services/directory_service_data.py
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 | |