How to use list_resolver_query_log_configs method in localstack

Best Python code snippet using localstack_python

ALE_cleanup_single.py

Source:ALE_cleanup_single.py Github

copy

Full Screen

...30 QueryLogList: list = []31 QueryLogArnRemoveList: list = []32 QueryLogIdRemoveList: list = []33 logging.info("ListResolverQueryLogConfigs API Call")34 ale_r53_logs = route53resolver.list_resolver_query_log_configs() # Collecting Arn of all Query Logs35 for r53_arn in ale_r53_logs['ResolverQueryLogConfigs']:36 QueryLogList.append(r53_arn['Arn'])37 for r53_tag_info in QueryLogList:38 logging.info("Listing Tags for " + r53_tag_info)39 logging.info("ListTagsForResource API Call")40 r53_tags = route53resolver.list_tags_for_resource( # Looking at tags for each Arn collected41 ResourceArn=r53_tag_info42 )43 for value in r53_tags['Tags']:44 if (value['Key'] == 'Workflow' and value['Value'] == 'assisted-log-enabler'):45 logging.info("The following Route 53 Query Logger was created by Assisted Log Enabler for AWS, and will be removed within this function: " + r53_tag_info)46 QueryLogArnRemoveList.append(r53_tag_info)47 for Id in QueryLogArnRemoveList:48 logging.info("Gathering Resource ID for Route 53 Query Logging Resource to be removed.")49 logging.info("ListResolverQueryLogConfigs API Call")50 r53_resource_id = route53resolver.list_resolver_query_log_configs()['ResolverQueryLogConfigs'][QueryLogArnRemoveList.index(Id)]['Id'] # Collecting Resource ID for each Arn collected51 QueryLogIdRemoveList.append(r53_resource_id)52 logging.info(r53_resource_id + " added to removal list.")53 logging.info("The following Resource IDs were created by Assisted Log Enabler for AWS, and will be removed within this function.")54 print(QueryLogIdRemoveList)55 for r53_remove in QueryLogIdRemoveList:56 logging.info("Gathering Query Log Config Associations for " + r53_remove)57 logging.info("ListResolverQueryLogConfigAssociations API Call")58 associated_vpcs = route53resolver.list_resolver_query_log_config_associations(59 )60 if associated_vpcs['TotalCount'] > 0 and associated_vpcs['ResolverQueryLogConfigAssociations'][0]['ResolverQueryLogConfigId'] == r53_remove:61 logging.info("The following Route 53 Query Logger is associated with a VPC, and will be removed within this function: " + r53_remove)62 VPCRemovalList = []63 for vpc_info in associated_vpcs['ResolverQueryLogConfigAssociations']:64 VPCRemovalList.append(vpc_info['ResourceId'])...

Full Screen

Full Screen

__init__.pyi

Source:__init__.pyi Github

copy

Full Screen

1"""2Main interface for route53resolver service.3Usage::4 ```python5 import boto36 from mypy_boto3_route53resolver import (7 Client,8 ListFirewallConfigsPaginator,9 ListFirewallDomainListsPaginator,10 ListFirewallDomainsPaginator,11 ListFirewallRuleGroupAssociationsPaginator,12 ListFirewallRuleGroupsPaginator,13 ListFirewallRulesPaginator,14 ListResolverConfigsPaginator,15 ListResolverDnssecConfigsPaginator,16 ListResolverEndpointIpAddressesPaginator,17 ListResolverEndpointsPaginator,18 ListResolverQueryLogConfigAssociationsPaginator,19 ListResolverQueryLogConfigsPaginator,20 ListResolverRuleAssociationsPaginator,21 ListResolverRulesPaginator,22 ListTagsForResourcePaginator,23 Route53ResolverClient,24 )25 session = boto3.Session()26 client: Route53ResolverClient = boto3.client("route53resolver")27 session_client: Route53ResolverClient = session.client("route53resolver")28 list_firewall_configs_paginator: ListFirewallConfigsPaginator = client.get_paginator("list_firewall_configs")29 list_firewall_domain_lists_paginator: ListFirewallDomainListsPaginator = client.get_paginator("list_firewall_domain_lists")30 list_firewall_domains_paginator: ListFirewallDomainsPaginator = client.get_paginator("list_firewall_domains")31 list_firewall_rule_group_associations_paginator: ListFirewallRuleGroupAssociationsPaginator = client.get_paginator("list_firewall_rule_group_associations")32 list_firewall_rule_groups_paginator: ListFirewallRuleGroupsPaginator = client.get_paginator("list_firewall_rule_groups")33 list_firewall_rules_paginator: ListFirewallRulesPaginator = client.get_paginator("list_firewall_rules")34 list_resolver_configs_paginator: ListResolverConfigsPaginator = client.get_paginator("list_resolver_configs")35 list_resolver_dnssec_configs_paginator: ListResolverDnssecConfigsPaginator = client.get_paginator("list_resolver_dnssec_configs")36 list_resolver_endpoint_ip_addresses_paginator: ListResolverEndpointIpAddressesPaginator = client.get_paginator("list_resolver_endpoint_ip_addresses")37 list_resolver_endpoints_paginator: ListResolverEndpointsPaginator = client.get_paginator("list_resolver_endpoints")38 list_resolver_query_log_config_associations_paginator: ListResolverQueryLogConfigAssociationsPaginator = client.get_paginator("list_resolver_query_log_config_associations")39 list_resolver_query_log_configs_paginator: ListResolverQueryLogConfigsPaginator = client.get_paginator("list_resolver_query_log_configs")40 list_resolver_rule_associations_paginator: ListResolverRuleAssociationsPaginator = client.get_paginator("list_resolver_rule_associations")41 list_resolver_rules_paginator: ListResolverRulesPaginator = client.get_paginator("list_resolver_rules")42 list_tags_for_resource_paginator: ListTagsForResourcePaginator = client.get_paginator("list_tags_for_resource")43 ```44"""45from .client import Route53ResolverClient46from .paginator import (47 ListFirewallConfigsPaginator,48 ListFirewallDomainListsPaginator,49 ListFirewallDomainsPaginator,50 ListFirewallRuleGroupAssociationsPaginator,51 ListFirewallRuleGroupsPaginator,52 ListFirewallRulesPaginator,53 ListResolverConfigsPaginator,54 ListResolverDnssecConfigsPaginator,55 ListResolverEndpointIpAddressesPaginator,56 ListResolverEndpointsPaginator,57 ListResolverQueryLogConfigAssociationsPaginator,58 ListResolverQueryLogConfigsPaginator,59 ListResolverRuleAssociationsPaginator,60 ListResolverRulesPaginator,61 ListTagsForResourcePaginator,62)63Client = Route53ResolverClient64__all__ = (65 "Client",66 "ListFirewallConfigsPaginator",67 "ListFirewallDomainListsPaginator",68 "ListFirewallDomainsPaginator",69 "ListFirewallRuleGroupAssociationsPaginator",70 "ListFirewallRuleGroupsPaginator",71 "ListFirewallRulesPaginator",72 "ListResolverConfigsPaginator",73 "ListResolverDnssecConfigsPaginator",74 "ListResolverEndpointIpAddressesPaginator",75 "ListResolverEndpointsPaginator",76 "ListResolverQueryLogConfigAssociationsPaginator",77 "ListResolverQueryLogConfigsPaginator",78 "ListResolverRuleAssociationsPaginator",79 "ListResolverRulesPaginator",80 "ListTagsForResourcePaginator",81 "Route53ResolverClient",...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful