Best Python code snippet using localstack_python
__init__.pyi
Source:__init__.pyi
1"""2Main interface for config service.3Usage::4 ```python5 import boto36 from mypy_boto3_config import (7 Client,8 ConfigServiceClient,9 DescribeAggregateComplianceByConfigRulesPaginator,10 DescribeAggregateComplianceByConformancePacksPaginator,11 DescribeAggregationAuthorizationsPaginator,12 DescribeComplianceByConfigRulePaginator,13 DescribeComplianceByResourcePaginator,14 DescribeConfigRuleEvaluationStatusPaginator,15 DescribeConfigRulesPaginator,16 DescribeConfigurationAggregatorSourcesStatusPaginator,17 DescribeConfigurationAggregatorsPaginator,18 DescribeConformancePackStatusPaginator,19 DescribeConformancePacksPaginator,20 DescribeOrganizationConfigRuleStatusesPaginator,21 DescribeOrganizationConfigRulesPaginator,22 DescribeOrganizationConformancePackStatusesPaginator,23 DescribeOrganizationConformancePacksPaginator,24 DescribePendingAggregationRequestsPaginator,25 DescribeRemediationExecutionStatusPaginator,26 DescribeRetentionConfigurationsPaginator,27 GetAggregateComplianceDetailsByConfigRulePaginator,28 GetComplianceDetailsByConfigRulePaginator,29 GetComplianceDetailsByResourcePaginator,30 GetConformancePackComplianceSummaryPaginator,31 GetOrganizationConfigRuleDetailedStatusPaginator,32 GetOrganizationConformancePackDetailedStatusPaginator,33 GetResourceConfigHistoryPaginator,34 ListAggregateDiscoveredResourcesPaginator,35 ListDiscoveredResourcesPaginator,36 ListTagsForResourcePaginator,37 SelectAggregateResourceConfigPaginator,38 SelectResourceConfigPaginator,39 )40 session = boto3.Session()41 client: ConfigServiceClient = boto3.client("config")42 session_client: ConfigServiceClient = session.client("config")43 describe_aggregate_compliance_by_config_rules_paginator: DescribeAggregateComplianceByConfigRulesPaginator = client.get_paginator("describe_aggregate_compliance_by_config_rules")44 describe_aggregate_compliance_by_conformance_packs_paginator: DescribeAggregateComplianceByConformancePacksPaginator = client.get_paginator("describe_aggregate_compliance_by_conformance_packs")45 describe_aggregation_authorizations_paginator: DescribeAggregationAuthorizationsPaginator = client.get_paginator("describe_aggregation_authorizations")46 describe_compliance_by_config_rule_paginator: DescribeComplianceByConfigRulePaginator = client.get_paginator("describe_compliance_by_config_rule")47 describe_compliance_by_resource_paginator: DescribeComplianceByResourcePaginator = client.get_paginator("describe_compliance_by_resource")48 describe_config_rule_evaluation_status_paginator: DescribeConfigRuleEvaluationStatusPaginator = client.get_paginator("describe_config_rule_evaluation_status")49 describe_config_rules_paginator: DescribeConfigRulesPaginator = client.get_paginator("describe_config_rules")50 describe_configuration_aggregator_sources_status_paginator: DescribeConfigurationAggregatorSourcesStatusPaginator = client.get_paginator("describe_configuration_aggregator_sources_status")51 describe_configuration_aggregators_paginator: DescribeConfigurationAggregatorsPaginator = client.get_paginator("describe_configuration_aggregators")52 describe_conformance_pack_status_paginator: DescribeConformancePackStatusPaginator = client.get_paginator("describe_conformance_pack_status")53 describe_conformance_packs_paginator: DescribeConformancePacksPaginator = client.get_paginator("describe_conformance_packs")54 describe_organization_config_rule_statuses_paginator: DescribeOrganizationConfigRuleStatusesPaginator = client.get_paginator("describe_organization_config_rule_statuses")55 describe_organization_config_rules_paginator: DescribeOrganizationConfigRulesPaginator = client.get_paginator("describe_organization_config_rules")56 describe_organization_conformance_pack_statuses_paginator: DescribeOrganizationConformancePackStatusesPaginator = client.get_paginator("describe_organization_conformance_pack_statuses")57 describe_organization_conformance_packs_paginator: DescribeOrganizationConformancePacksPaginator = client.get_paginator("describe_organization_conformance_packs")58 describe_pending_aggregation_requests_paginator: DescribePendingAggregationRequestsPaginator = client.get_paginator("describe_pending_aggregation_requests")59 describe_remediation_execution_status_paginator: DescribeRemediationExecutionStatusPaginator = client.get_paginator("describe_remediation_execution_status")60 describe_retention_configurations_paginator: DescribeRetentionConfigurationsPaginator = client.get_paginator("describe_retention_configurations")61 get_aggregate_compliance_details_by_config_rule_paginator: GetAggregateComplianceDetailsByConfigRulePaginator = client.get_paginator("get_aggregate_compliance_details_by_config_rule")62 get_compliance_details_by_config_rule_paginator: GetComplianceDetailsByConfigRulePaginator = client.get_paginator("get_compliance_details_by_config_rule")63 get_compliance_details_by_resource_paginator: GetComplianceDetailsByResourcePaginator = client.get_paginator("get_compliance_details_by_resource")64 get_conformance_pack_compliance_summary_paginator: GetConformancePackComplianceSummaryPaginator = client.get_paginator("get_conformance_pack_compliance_summary")65 get_organization_config_rule_detailed_status_paginator: GetOrganizationConfigRuleDetailedStatusPaginator = client.get_paginator("get_organization_config_rule_detailed_status")66 get_organization_conformance_pack_detailed_status_paginator: GetOrganizationConformancePackDetailedStatusPaginator = client.get_paginator("get_organization_conformance_pack_detailed_status")67 get_resource_config_history_paginator: GetResourceConfigHistoryPaginator = client.get_paginator("get_resource_config_history")68 list_aggregate_discovered_resources_paginator: ListAggregateDiscoveredResourcesPaginator = client.get_paginator("list_aggregate_discovered_resources")69 list_discovered_resources_paginator: ListDiscoveredResourcesPaginator = client.get_paginator("list_discovered_resources")70 list_tags_for_resource_paginator: ListTagsForResourcePaginator = client.get_paginator("list_tags_for_resource")71 select_aggregate_resource_config_paginator: SelectAggregateResourceConfigPaginator = client.get_paginator("select_aggregate_resource_config")72 select_resource_config_paginator: SelectResourceConfigPaginator = client.get_paginator("select_resource_config")73 ```74"""75from .client import ConfigServiceClient76from .paginator import (77 DescribeAggregateComplianceByConfigRulesPaginator,78 DescribeAggregateComplianceByConformancePacksPaginator,79 DescribeAggregationAuthorizationsPaginator,80 DescribeComplianceByConfigRulePaginator,81 DescribeComplianceByResourcePaginator,82 DescribeConfigRuleEvaluationStatusPaginator,83 DescribeConfigRulesPaginator,84 DescribeConfigurationAggregatorSourcesStatusPaginator,85 DescribeConfigurationAggregatorsPaginator,86 DescribeConformancePacksPaginator,87 DescribeConformancePackStatusPaginator,88 DescribeOrganizationConfigRulesPaginator,89 DescribeOrganizationConfigRuleStatusesPaginator,90 DescribeOrganizationConformancePacksPaginator,91 DescribeOrganizationConformancePackStatusesPaginator,92 DescribePendingAggregationRequestsPaginator,93 DescribeRemediationExecutionStatusPaginator,94 DescribeRetentionConfigurationsPaginator,95 GetAggregateComplianceDetailsByConfigRulePaginator,96 GetComplianceDetailsByConfigRulePaginator,97 GetComplianceDetailsByResourcePaginator,98 GetConformancePackComplianceSummaryPaginator,99 GetOrganizationConfigRuleDetailedStatusPaginator,100 GetOrganizationConformancePackDetailedStatusPaginator,101 GetResourceConfigHistoryPaginator,102 ListAggregateDiscoveredResourcesPaginator,103 ListDiscoveredResourcesPaginator,104 ListTagsForResourcePaginator,105 SelectAggregateResourceConfigPaginator,106 SelectResourceConfigPaginator,107)108Client = ConfigServiceClient109__all__ = (110 "Client",111 "ConfigServiceClient",112 "DescribeAggregateComplianceByConfigRulesPaginator",113 "DescribeAggregateComplianceByConformancePacksPaginator",114 "DescribeAggregationAuthorizationsPaginator",115 "DescribeComplianceByConfigRulePaginator",116 "DescribeComplianceByResourcePaginator",117 "DescribeConfigRuleEvaluationStatusPaginator",118 "DescribeConfigRulesPaginator",119 "DescribeConfigurationAggregatorSourcesStatusPaginator",120 "DescribeConfigurationAggregatorsPaginator",121 "DescribeConformancePackStatusPaginator",122 "DescribeConformancePacksPaginator",123 "DescribeOrganizationConfigRuleStatusesPaginator",124 "DescribeOrganizationConfigRulesPaginator",125 "DescribeOrganizationConformancePackStatusesPaginator",126 "DescribeOrganizationConformancePacksPaginator",127 "DescribePendingAggregationRequestsPaginator",128 "DescribeRemediationExecutionStatusPaginator",129 "DescribeRetentionConfigurationsPaginator",130 "GetAggregateComplianceDetailsByConfigRulePaginator",131 "GetComplianceDetailsByConfigRulePaginator",132 "GetComplianceDetailsByResourcePaginator",133 "GetConformancePackComplianceSummaryPaginator",134 "GetOrganizationConfigRuleDetailedStatusPaginator",135 "GetOrganizationConformancePackDetailedStatusPaginator",136 "GetResourceConfigHistoryPaginator",137 "ListAggregateDiscoveredResourcesPaginator",138 "ListDiscoveredResourcesPaginator",139 "ListTagsForResourcePaginator",140 "SelectAggregateResourceConfigPaginator",141 "SelectResourceConfigPaginator",...
config.py
Source:config.py
...25 req_info = []26 req_info.append(res)27 delivery_channels.append(req_info)28 # returing a error29 # response = client.describe_organization_config_rules()30 #31 # for res in response:32 # req_info = []33 # req_info.append(res)34 # org_config_rules.append(req_info)35 # covertt the config rules and delivery channels to dictionary36 dict_config_rules = {"Configuration Rules": config_rules}37 dict_delivery_channels = {"Delivery Channels": delivery_channels}38 # dict_organization_rules = {"Organization Rules ": org_config_rules}39 # convert the dictionaries into json40 json_config_rules = json.dumps(dict_config_rules, indent=4, default=str)41 json_delivery_channels = json.dumps(dict_delivery_channels, indent=4, default=str)42 # json_org_rules = json.dumps(dict_organization_rules, indent=4, default=str)43 print(json_config_rules)...
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!!