From 181fef77904c13669548af16106ed7f35b1da8bb Mon Sep 17 00:00:00 2001 From: Daniel Ballard Date: Tue, 30 Jul 2024 12:12:44 -0400 Subject: [PATCH 1/2] Add delete_user_pool_client functionality --- pycognito/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pycognito/__init__.py b/pycognito/__init__.py index bd28318a..40206061 100644 --- a/pycognito/__init__.py +++ b/pycognito/__init__.py @@ -934,6 +934,18 @@ def admin_update_identity_provider(self, pool_id, provider_name, **kwargs): **kwargs, ) + def delete_user_pool_client(self, pool_id=None, client_id=None): + """ + Deletes a user pool client + :param pool_id: The user pool ID (defaults to self.user_pool_id) + :param client_id: The client ID (defaults to self.client_id) + :return: + """ + self.client.delete_user_pool_client( + UserPoolId=pool_id, + ClientId=client_id, + ) + def describe_user_pool_client(self, pool_id: str, client_id: str): """ Returns configuration information of a specified user pool app client From 74d89b74b71790f8e9aa6dbf286a8c5904a3c814 Mon Sep 17 00:00:00 2001 From: Daniel Ballard Date: Tue, 30 Jul 2024 20:16:35 -0400 Subject: [PATCH 2/2] added missing conditionals for delete_user_pool_client --- pycognito/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pycognito/__init__.py b/pycognito/__init__.py index 40206061..00613367 100644 --- a/pycognito/__init__.py +++ b/pycognito/__init__.py @@ -941,6 +941,11 @@ def delete_user_pool_client(self, pool_id=None, client_id=None): :param client_id: The client ID (defaults to self.client_id) :return: """ + if pool_id is None: + pool_id = self.user_pool_id + if client_id is None: + client_id = self.client_id + self.client.delete_user_pool_client( UserPoolId=pool_id, ClientId=client_id,