Cognito: support for partial UpdateUserPoolClient calls #5221
Labels
feature-request
A feature should be added or improved.
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Describe the feature
The
UpdateUserPoolClient
should support partial updates instead of having to provide every single parameter in the request.Use Case
Currently, the process to update a user pool client through the SDK is very cumbersome. For example, if we only want to update the
callbackURLs
on an existing user pool client, we have to pass every single property with the existing value to theUpdateUserPoolClientRequest
. This is because Cognito doesn't support partial updates:Proposed Solution
This probably will need updates on the Cognito service side. However, I do think it would be nice if the SDK could provide a convenience method in the meantime. I guess something like:
Note that
updateUserPoolClient
now takes a second parameter. This parameter could be named something likekeepExistingParameters
and default tofalse
, so it's not a breaking change. Iftrue
, it could get the existing user pool (either by doing adescribeUserPoolClient
under the hood or require an existingUserPoolClientType
to be passed).Other Information
Related Cognito docs: https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserPoolClient.html
Acknowledgements
AWS Java SDK version used
2.25.50
JDK version used
17.0.10
Operating System and version
macOS 14.4.1
The text was updated successfully, but these errors were encountered: