list_groups_for_member
async
¶
list_groups_for_member(
directory_id: DirectoryId,
sam_account_name: MemberName,
*,
config_overrides: Optional[AsyncDirectoryServiceDataClientConfig] = None,
realm: Optional[Realm] = None,
member_realm: Optional[Realm] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
) -> ListGroupsForMemberResult
Returns group information for the specified member.
This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the ListGroupsForMember.NextToken member contains a token that you pass in the next call to ListGroupsForMember. 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 member.
-
realm(Optional[Realm], default:None) –The domain name that's associated with the group.
This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.
This value is case insensitive and defaults to your Managed Microsoft AD domain.
-
member_realm(Optional[Realm], default:None) –The domain name that's associated with the group member.
This parameter is optional, so you can limit your results to the group members in a specific domain.
This parameter is case insensitive and defaults to
Realm -
sam_account_name(MemberName) –The
SAMAccountNameof the user, group, or computer that's a member 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 groups for a member The following command
>>> await client.list_groups_for_member(directory_id='d-12233abcde', sam_account_name='twhitlock', member_realm='example.local', realm='examplecorp.com')
Source code in docs_src/capo_directory_service_data/_services/async_directory_service_data.py
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 | |