ConfigRule

Config rules evaluate the configuration settings of your Amazon Web Services resources. A rule can run when Config detects a configuration change to an Amazon Web Services resource or at a periodic frequency that you choose (for example, every 24 hours). There are two types of rules: Config Managed Rules and Config Custom Rules.

Config Managed Rules are predefined, customizable rules created by Config. For a list of managed rules, see List of Config Managed Rules.

Config Custom Rules are rules that you create from scratch. There are two ways to create Config custom rules: with Lambda functions ( Lambda Developer Guide) and with Guard (Guard GitHub Repository), a policy-as-code language. Config custom rules created with Lambda are called Config Custom Lambda Rules and Config custom rules created with Guard are called Config Custom Policy Rules.

For more information about developing and using Config rules, see Evaluating Resource with Config Rules in the Config Developer Guide.

You can use the Amazon Web Services CLI and Amazon Web Services SDKs if you want to create a rule that triggers evaluations for your resources when Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The Amazon Resource Name (ARN) of the Config rule.

Link copied to clipboard

The ID of the Config rule.

Link copied to clipboard

The name that you assign to the Config rule. The name is required if you are adding a new rule.

Link copied to clipboard

Indicates whether the Config rule is active or is currently being deleted by Config. It can also indicate the evaluation status for the Config rule.

Link copied to clipboard

Service principal name of the service that created the rule.

Link copied to clipboard

The description that you provide for the Config rule.

Link copied to clipboard

The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.

Link copied to clipboard

A string, in JSON format, that is passed to the Config rule Lambda function.

Link copied to clipboard

The maximum frequency with which Config runs evaluations for a rule. You can specify a value for MaximumExecutionFrequency when:

Link copied to clipboard
val scope: Scope?

Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.

Link copied to clipboard

Provides the rule owner (Amazon Web Services for managed rules, CUSTOM_POLICY for Custom Policy rules, and CUSTOM_LAMBDA for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.

Functions

Link copied to clipboard
inline fun copy(block: ConfigRule.Builder.() -> Unit = {}): ConfigRule
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String