Best Python code snippet using localstack_python
client.py
Source:client.py  
...68    def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None):69        pass70    def get_aggregate_compliance_details_by_config_rule(self, ConfigurationAggregatorName: str, ConfigRuleName: str, AccountId: str, AwsRegion: str, ComplianceType: str = None, Limit: int = None, NextToken: str = None) -> Dict:71        pass72    def get_aggregate_config_rule_compliance_summary(self, ConfigurationAggregatorName: str, Filters: Dict = None, GroupByKey: str = None, Limit: int = None, NextToken: str = None) -> Dict:73        pass74    def get_aggregate_discovered_resource_counts(self, ConfigurationAggregatorName: str, Filters: Dict = None, GroupByKey: str = None, Limit: int = None, NextToken: str = None) -> Dict:75        pass76    def get_aggregate_resource_config(self, ConfigurationAggregatorName: str, ResourceIdentifier: Dict) -> Dict:77        pass78    def get_compliance_details_by_config_rule(self, ConfigRuleName: str, ComplianceTypes: List = None, Limit: int = None, NextToken: str = None) -> Dict:79        pass80    def get_compliance_details_by_resource(self, ResourceType: str, ResourceId: str, ComplianceTypes: List = None, NextToken: str = None) -> Dict:81        pass82    def get_compliance_summary_by_config_rule(self) -> Dict:83        pass84    def get_compliance_summary_by_resource_type(self, ResourceTypes: List = None) -> Dict:85        pass86    def get_discovered_resource_counts(self, resourceTypes: List = None, limit: int = None, nextToken: str = None) -> Dict:...aws_config_report.py
Source:aws_config_report.py  
1import boto32client = boto3.client('config')3region_name = {'us-west-2','ap-south-1','ap-southeast-1'}4for region in region_name:5    response = client.get_aggregate_config_rule_compliance_summary(6        ConfigurationAggregatorName='aws_config_alert',7        Filters={8            'AccountId': '4******5',9            'AwsRegion': region10        },11        Limit=123,12    )13    print "Total Non-compliant rule in region ", region,": ",response['AggregateComplianceCounts'][0]['ComplianceSummary']['NonCompliantResourceCount']['CappedCount']14config_rules = {'s3-bucket-public-read-prohibited','s3-account-level-public-access-blocks','rds-snapshots-public-prohibited','redshift-cluster-public-access-check','root-account-mfa-enabled','multi-region-cloudtrail-enabled','db-instance-backup-enabled','s3-bucket-public-read-prohibited','s3-bucket-public-write-prohibited','rds-instance-public-access-check','multi-region-cloudtrail-enabled','s3-bucket-public-read-prohibited','db-instance-backup-enabled','rds-instance-public-access-check'}15for region in region_name:16    client = boto3.client('config',region_name=region)17    print "Region: ", region18    for id in  config_rules:19        response = client.get_compliance_details_by_config_rule(...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!!
