Best Python code snippet using localstack_python
app.py
Source:app.py
...35 client_id_list)36 added_client_ids = set(client_id_list) - set(37 response['ClientIDList'])38 if set(thumbprint_list) ^ set(response['ThumbprintList']):39 iam.update_open_id_connect_provider_thumbprint(40 OpenIDConnectProviderArn=arn,41 ThumbprintList=thumbprint_list)42 for client_id in added_client_ids:43 iam.add_client_id_to_open_id_connect_provider(44 OpenIDConnectProviderArn=arn, ClientID=client_id)45 for client_id in deleted_client_ids:46 iam.remove_client_id_from_open_id_connect_provider(47 OpenIDConnectProviderArn=arn, ClientID=client_id)48 return arn49def create_provider(aws_account_id, url, client_id_list, thumbprint_list):50 try:51 response = iam.create_open_id_connect_provider(52 Url=url,53 ClientIDList=client_id_list,...
oidc_provider_creator.py
Source:oidc_provider_creator.py
...16 ClientID=client17 )18 return arn, "Created provider " + arn19def update_provider(arn, thumbprints, audiences):20 iam.update_open_id_connect_provider_thumbprint(21 OpenIDConnectProviderArn=arn,22 ThumbprintList=thumbprints23 )24 current_provider = iam.get_open_id_connect_provider(25 OpenIDConnectProviderArn=arn26 )27 for client in current_provider['ClientIDList']:28 if not client in audiences:29 print("Removing client " + client + " from ClientIDList of " + arn)30 iam.remove_client_id_from_open_id_connect_provider(31 OpenIDConnectProviderArn=arn,32 ClientID=client33 )34 # this is idempotent, so no issue if client ID already exists...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!