MCPcopy Create free account
hub / github.com/awsdocs/aws-doc-sdk-examples / usage_demo

Function usage_demo

python/example_code/config/config_rules.py:107–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106
107def usage_demo():
108 print("-" * 88)
109 print("Welcome to the AWS Config demo!")
110 print("-" * 88)
111
112 logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
113
114 config = ConfigWrapper(boto3.client("config"))
115 rule_name = "DemoS3BucketRule"
116 print(f"Creating AWS Config rule '{rule_name}'...")
117 config.put_config_rule(rule_name)
118 print(f"Describing AWS Config rule '{rule_name}'...")
119 rule = config.describe_config_rule(rule_name)
120 pprint(rule)
121 print(f"Deleting AWS Config rule '{rule_name}'...")
122 config.delete_config_rule(rule_name)
123
124 print("Thanks for watching!")
125 print("-" * 88)
126
127
128if __name__ == "__main__":

Callers 1

config_rules.pyFile · 0.70

Calls 4

put_config_ruleMethod · 0.95
describe_config_ruleMethod · 0.95
delete_config_ruleMethod · 0.95
ConfigWrapperClass · 0.85

Tested by

no test coverage detected