Use DeleteConfigRule with an Amazon SDK or command line tool - Amazon Config
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use DeleteConfigRule with an Amazon SDK or command line tool

The following code examples show how to use DeleteConfigRule.

CLI
Amazon CLI

To delete an Amazon Config rule

The following command deletes an Amazon Config rule named MyConfigRule:

aws configservice delete-config-rule --config-rule-name MyConfigRule
Python
SDK for Python (Boto3)
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

class ConfigWrapper: """ Encapsulates AWS Config functions. """ def __init__(self, config_client): """ :param config_client: A Boto3 AWS Config client. """ self.config_client = config_client def delete_config_rule(self, rule_name): """ Delete the specified rule. :param rule_name: The name of the rule to delete. """ try: self.config_client.delete_config_rule(ConfigRuleName=rule_name) logger.info("Deleted rule %s.", rule_name) except ClientError: logger.exception("Couldn't delete rule %s.", rule_name) raise
  • For API details, see DeleteConfigRule in Amazon SDK for Python (Boto3) API Reference.

For a complete list of Amazon SDK developer guides and code examples, see Using Amazon Config with an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.