@@ -182,6 +182,65 @@ async def admin_apps_uninstall(
182182 "admin.apps.uninstall" , http_verb = "POST" , params = kwargs
183183 )
184184
185+ async def admin_auth_policy_getEntities (
186+ self ,
187+ * ,
188+ policy_name : str ,
189+ cursor : Optional [str ] = None ,
190+ entity_type : Optional [str ] = None ,
191+ limit : Optional [int ] = None ,
192+ ** kwargs
193+ ) -> AsyncSlackResponse :
194+ """Fetch all the entities assigned to a particular authentication policy by name."""
195+ kwargs .update ({"policy_name" : policy_name })
196+ if cursor is not None :
197+ kwargs .update ({"cursor" : cursor })
198+ if entity_type is not None :
199+ kwargs .update ({"entity_type" : entity_type })
200+ if limit is not None :
201+ kwargs .update ({"limit" : limit })
202+ return await self .api_call (
203+ "admin.auth.policy.getEntities" , http_verb = "POST" , params = kwargs
204+ )
205+
206+ async def admin_auth_policy_assignEntities (
207+ self ,
208+ * ,
209+ entity_ids : Union [str , Sequence [str ]],
210+ policy_name : str ,
211+ entity_type : str ,
212+ ** kwargs
213+ ) -> AsyncSlackResponse :
214+ """Assign entities to a particular authentication policy."""
215+ if isinstance (entity_ids , (list , Tuple )):
216+ kwargs .update ({"entity_ids" : "," .join (entity_ids )})
217+ else :
218+ kwargs .update ({"entity_ids" : entity_ids })
219+ kwargs .update ({"policy_name" : policy_name })
220+ kwargs .update ({"entity_type" : entity_type })
221+ return await self .api_call (
222+ "admin.auth.policy.assignEntities" , http_verb = "POST" , params = kwargs
223+ )
224+
225+ async def admin_auth_policy_removeEntities (
226+ self ,
227+ * ,
228+ entity_ids : Union [str , Sequence [str ]],
229+ policy_name : str ,
230+ entity_type : str ,
231+ ** kwargs
232+ ) -> AsyncSlackResponse :
233+ """Remove specified entities from a specified authentication policy."""
234+ if isinstance (entity_ids , (list , Tuple )):
235+ kwargs .update ({"entity_ids" : "," .join (entity_ids )})
236+ else :
237+ kwargs .update ({"entity_ids" : entity_ids })
238+ kwargs .update ({"policy_name" : policy_name })
239+ kwargs .update ({"entity_type" : entity_type })
240+ return await self .api_call (
241+ "admin.auth.policy.removeEntities" , http_verb = "POST" , params = kwargs
242+ )
243+
185244 async def admin_barriers_create (
186245 self ,
187246 * ,
0 commit comments