Struct aws_sdk_config::model::ConfigRule
source · [−]#[non_exhaustive]pub struct ConfigRule {
pub config_rule_name: Option<String>,
pub config_rule_arn: Option<String>,
pub config_rule_id: Option<String>,
pub description: Option<String>,
pub scope: Option<Scope>,
pub source: Option<Source>,
pub input_parameters: Option<String>,
pub maximum_execution_frequency: Option<MaximumExecutionFrequency>,
pub config_rule_state: Option<ConfigRuleState>,
pub created_by: Option<String>,
}Expand description
An Config rule represents an Lambda function that you create for a custom rule or a predefined function for an Config managed rule. The function evaluates configuration items to assess whether your Amazon Web Services resources comply with your desired configurations. This function can run when Config detects a configuration change to an Amazon Web Services resource and at a periodic frequency that you choose (for example, every 24 hours).
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.
For more information about developing and using Config rules, see Evaluating Amazon Web Services resource Configurations with Config in the Config Developer Guide.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.config_rule_name: Option<String>The name that you assign to the Config rule. The name is required if you are adding a new rule.
config_rule_arn: Option<String>The Amazon Resource Name (ARN) of the Config rule.
config_rule_id: Option<String>The ID of the Config rule.
description: Option<String>The description that you provide for the Config rule.
scope: Option<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.
source: Option<Source>Provides the rule owner (Amazon Web Services or customer), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.
input_parameters: Option<String>A string, in JSON format, that is passed to the Config rule Lambda function.
maximum_execution_frequency: Option<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.
config_rule_state: Option<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.
created_by: Option<String>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.
Implementations
sourceimpl ConfigRule
impl ConfigRule
sourcepub fn config_rule_name(&self) -> Option<&str>
pub fn config_rule_name(&self) -> Option<&str>
The name that you assign to the Config rule. The name is required if you are adding a new rule.
sourcepub fn config_rule_arn(&self) -> Option<&str>
pub fn config_rule_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Config rule.
sourcepub fn config_rule_id(&self) -> Option<&str>
pub fn config_rule_id(&self) -> Option<&str>
The ID of the Config rule.
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The description that you provide for the Config rule.
sourcepub fn scope(&self) -> Option<&Scope>
pub fn scope(&self) -> Option<&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.
sourcepub fn source(&self) -> Option<&Source>
pub fn source(&self) -> Option<&Source>
Provides the rule owner (Amazon Web Services or customer), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.
sourcepub fn input_parameters(&self) -> Option<&str>
pub fn input_parameters(&self) -> Option<&str>
A string, in JSON format, that is passed to the Config rule Lambda function.
sourcepub fn maximum_execution_frequency(&self) -> Option<&MaximumExecutionFrequency>
pub fn maximum_execution_frequency(&self) -> Option<&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.
sourcepub fn config_rule_state(&self) -> Option<&ConfigRuleState>
pub fn config_rule_state(&self) -> Option<&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.
sourcepub fn created_by(&self) -> Option<&str>
pub fn created_by(&self) -> Option<&str>
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.
sourceimpl ConfigRule
impl ConfigRule
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ConfigRule.
Trait Implementations
sourceimpl Clone for ConfigRule
impl Clone for ConfigRule
sourcefn clone(&self) -> ConfigRule
fn clone(&self) -> ConfigRule
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ConfigRule
impl Debug for ConfigRule
sourceimpl PartialEq<ConfigRule> for ConfigRule
impl PartialEq<ConfigRule> for ConfigRule
sourcefn eq(&self, other: &ConfigRule) -> bool
fn eq(&self, other: &ConfigRule) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ConfigRule) -> bool
fn ne(&self, other: &ConfigRule) -> bool
This method tests for !=.
impl StructuralPartialEq for ConfigRule
Auto Trait Implementations
impl RefUnwindSafe for ConfigRule
impl Send for ConfigRule
impl Sync for ConfigRule
impl Unpin for ConfigRule
impl UnwindSafe for ConfigRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more