AmazonCognitoIdentityProviderClient.ListUsersInGroupAsync returns a set of 25 users max when there is no limit specified

0

Hi,

Within our Asp.Net MVC Core application, we are using the AWSSDK.CognitoIdentityProvider (version 3.7.101.74).

For one of our use cases, we want to have a list of all users which belong to a certain role/group. Therefore, we use the AmazonCognitoIdentifyProviderClient.ListUsersInGroupAsync method. When calling this method without setting the limit property on the ListUsersInGroupRequest , we expect it will return a list of users belonging to that role/group with a max count of 60 users. Why 60? Because there is a max on the limit property of 60 defined in the api which makes us implicitly think it will not return more then 60 users per request.

However, when we do not set the limit property on the ListUsersInGroupRequest, we always get a list with max 25 users returned. This default of 25 is not documented anywhere which makes it confusing/unclear, what the expected behaviour of the api is when not specifying the limit properety on ListUsersInGroupRequest.

Is it correct to assume the default for limit is 25? If so, can this be documented correctly in the api documentation so expected behaviour is clear?

Thanks in advance

This request will return a list of max 25 users

var usersInGroup = await this.adminAmazonCognitoIdentityProviderClient.ListUsersInGroupAsync(new ListUsersInGroupRequest()
{
   GroupName = "SomeUserGroup",
   UserPoolId = "SomeUserPool"
);

This request will return a list of max 60 users

var usersInGroup = await this.adminAmazonCognitoIdentityProviderClient.ListUsersInGroupAsync(new ListUsersInGroupRequest()
{
   GroupName = "SomeUserGroup",
   UserPoolId = "SomeUserPool",
   Limit = 60
);
Tom B
已提問 1 年前檢視次數 44 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南