@Generated(value="software.amazon.awssdk:codegen") public class ConfigRule extends Object implements StructuredPojo, ToCopyableBuilder<ConfigRule.Builder,ConfigRule>
An AWS Config rule represents an AWS Lambda function that you create for a custom rule or a predefined function for an AWS managed rule. The function evaluates configuration items to assess whether your AWS resources comply with your desired configurations. This function can run when AWS Config detects a configuration change to an AWS resource and at a periodic frequency that you choose (for example, every 24 hours).
You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.
For more information about developing and using AWS Config rules, see Evaluating AWS Resource Configurations with AWS Config in the AWS Config Developer Guide.
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigRule.Builder |
Modifier and Type | Method and Description |
---|---|
static ConfigRule.Builder |
builder() |
String |
configRuleArn()
The Amazon Resource Name (ARN) of the AWS Config rule.
|
String |
configRuleId()
The ID of the AWS Config rule.
|
String |
configRuleName()
The name that you assign to the AWS Config rule.
|
ConfigRuleState |
configRuleState()
Indicates whether the AWS Config rule is active or is currently being deleted by AWS Config.
|
String |
configRuleStateString()
Indicates whether the AWS Config rule is active or is currently being deleted by AWS Config.
|
String |
description()
The description that you provide for the AWS Config rule.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
String |
inputParameters()
A string in JSON format that is passed to the AWS Config rule Lambda function.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
MaximumExecutionFrequency |
maximumExecutionFrequency()
The maximum frequency with which AWS Config runs evaluations for a rule.
|
String |
maximumExecutionFrequencyString()
The maximum frequency with which AWS Config runs evaluations for a rule.
|
Scope |
scope()
Defines which resources can trigger an evaluation for the rule.
|
static Class<? extends ConfigRule.Builder> |
serializableBuilderClass() |
Source |
source()
Provides the rule owner (AWS or customer), the rule identifier, and the notifications that cause the function to
evaluate your AWS resources.
|
ConfigRule.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
copy
public String configRuleName()
The name that you assign to the AWS Config rule. The name is required if you are adding a new rule.
public String configRuleArn()
The Amazon Resource Name (ARN) of the AWS Config rule.
public String configRuleId()
The ID of the AWS Config rule.
public String description()
The description that you provide for the AWS Config rule.
public 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.
public Source source()
Provides the rule owner (AWS or customer), the rule identifier, and the notifications that cause the function to evaluate your AWS resources.
public String inputParameters()
A string in JSON format that is passed to the AWS Config rule Lambda function.
public MaximumExecutionFrequency maximumExecutionFrequency()
The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for
MaximumExecutionFrequency
when:
You are using an AWS managed rule that is triggered at a periodic frequency.
Your custom rule is triggered when AWS 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.
If the service returns an enum value that is not available in the current SDK version,
maximumExecutionFrequency
will return MaximumExecutionFrequency.UNKNOWN_TO_SDK_VERSION
. The raw
value returned by the service is available from maximumExecutionFrequencyString()
.
MaximumExecutionFrequency
when:
You are using an AWS managed rule that is triggered at a periodic frequency.
Your custom rule is triggered when AWS 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.
MaximumExecutionFrequency
public String maximumExecutionFrequencyString()
The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for
MaximumExecutionFrequency
when:
You are using an AWS managed rule that is triggered at a periodic frequency.
Your custom rule is triggered when AWS 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.
If the service returns an enum value that is not available in the current SDK version,
maximumExecutionFrequency
will return MaximumExecutionFrequency.UNKNOWN_TO_SDK_VERSION
. The raw
value returned by the service is available from maximumExecutionFrequencyString()
.
MaximumExecutionFrequency
when:
You are using an AWS managed rule that is triggered at a periodic frequency.
Your custom rule is triggered when AWS 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.
MaximumExecutionFrequency
public ConfigRuleState configRuleState()
Indicates whether the AWS Config rule is active or is currently being deleted by AWS Config. It can also indicate the evaluation status for the Config rule.
AWS Config sets the state of the rule to EVALUATING
temporarily after you use the
StartConfigRulesEvaluation
request to evaluate your resources against the Config rule.
AWS 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.
AWS Config sets the state of a rule to DELETING
temporarily after you use the
DeleteConfigRule
request to delete the rule. After AWS Config deletes the rule, the rule and all of
its evaluations are erased and are no longer available.
If the service returns an enum value that is not available in the current SDK version, configRuleState
will return ConfigRuleState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from configRuleStateString()
.
AWS Config sets the state of the rule to EVALUATING
temporarily after you use the
StartConfigRulesEvaluation
request to evaluate your resources against the Config rule.
AWS 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.
AWS Config sets the state of a rule to DELETING
temporarily after you use the
DeleteConfigRule
request to delete the rule. After AWS Config deletes the rule, the rule and
all of its evaluations are erased and are no longer available.
ConfigRuleState
public String configRuleStateString()
Indicates whether the AWS Config rule is active or is currently being deleted by AWS Config. It can also indicate the evaluation status for the Config rule.
AWS Config sets the state of the rule to EVALUATING
temporarily after you use the
StartConfigRulesEvaluation
request to evaluate your resources against the Config rule.
AWS 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.
AWS Config sets the state of a rule to DELETING
temporarily after you use the
DeleteConfigRule
request to delete the rule. After AWS Config deletes the rule, the rule and all of
its evaluations are erased and are no longer available.
If the service returns an enum value that is not available in the current SDK version, configRuleState
will return ConfigRuleState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from configRuleStateString()
.
AWS Config sets the state of the rule to EVALUATING
temporarily after you use the
StartConfigRulesEvaluation
request to evaluate your resources against the Config rule.
AWS 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.
AWS Config sets the state of a rule to DELETING
temporarily after you use the
DeleteConfigRule
request to delete the rule. After AWS Config deletes the rule, the rule and
all of its evaluations are erased and are no longer available.
ConfigRuleState
public ConfigRule.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<ConfigRule.Builder,ConfigRule>
public static ConfigRule.Builder builder()
public static Class<? extends ConfigRule.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.