AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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.

Inheritance Hierarchy

System.Object
  Amazon.ConfigService.Model.ConfigRule

Namespace: Amazon.ConfigService.Model
Assembly: AWSSDK.ConfigService.dll
Version: 3.x.y.z

Syntax

C#
public class ConfigRule

The ConfigRule type exposes the following members

Constructors

NameDescription
Public Method ConfigRule()

Properties

NameTypeDescription
Public Property ConfigRuleArn System.String

Gets and sets the property ConfigRuleArn.

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

Public Property ConfigRuleId System.String

Gets and sets the property ConfigRuleId.

The ID of the Config rule.

Public Property ConfigRuleName System.String

Gets and sets the property ConfigRuleName.

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

Public Property ConfigRuleState Amazon.ConfigService.ConfigRuleState

Gets and sets the property ConfigRuleState.

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.

Config sets the state of the rule to EVALUATING temporarily after you use the StartConfigRulesEvaluation request to evaluate your resources against the Config rule.

Config sets the state of the rule to DELETING_RESULTS temporarily after you use the DeleteEvaluationResults request to delete the current evaluation results for the Config rule.

Config temporarily sets the state of a rule to DELETING after you use the DeleteConfigRule request to delete the rule. After Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.

Public Property CreatedBy System.String

Gets and sets the property CreatedBy.

Service principal name of the service that created the rule.

The field is populated only if the service-linked rule is created by a service. The field is empty if you create your own rule.

Public Property Description System.String

Gets and sets the property Description.

The description that you provide for the Config rule.

Public Property EvaluationModes System.Collections.Generic.List<Amazon.ConfigService.Model.EvaluationModeConfiguration>

Gets and sets the property EvaluationModes.

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

Public Property InputParameters System.String

Gets and sets the property InputParameters.

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

Public Property MaximumExecutionFrequency Amazon.ConfigService.MaximumExecutionFrequency

Gets and sets the property MaximumExecutionFrequency.

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

  • This is for an Config managed rule that is triggered at a periodic frequency.

  • Your custom rule is triggered when Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.

By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the MaximumExecutionFrequency parameter.

Public Property Scope Amazon.ConfigService.Model.Scope

Gets and sets the property 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.

The scope can be empty.

Public Property Source Amazon.ConfigService.Model.Source

Gets and sets the property Source.

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.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5