Class CfnConfigRuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.config.CfnConfigRuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnConfigRuleProps>
- Enclosing interface:
CfnConfigRuleProps
@Stability(Stable)
public static final class CfnConfigRuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnConfigRuleProps>
A builder for
CfnConfigRuleProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.compliance
(IResolvable compliance) Sets the value ofCfnConfigRuleProps.getCompliance()
compliance
(CfnConfigRule.ComplianceProperty compliance) Sets the value ofCfnConfigRuleProps.getCompliance()
configRuleName
(String configRuleName) Sets the value ofCfnConfigRuleProps.getConfigRuleName()
description
(String description) Sets the value ofCfnConfigRuleProps.getDescription()
evaluationModes
(List<? extends Object> evaluationModes) Sets the value ofCfnConfigRuleProps.getEvaluationModes()
evaluationModes
(IResolvable evaluationModes) Sets the value ofCfnConfigRuleProps.getEvaluationModes()
inputParameters
(Object inputParameters) Sets the value ofCfnConfigRuleProps.getInputParameters()
maximumExecutionFrequency
(String maximumExecutionFrequency) Sets the value ofCfnConfigRuleProps.getMaximumExecutionFrequency()
scope
(IResolvable scope) Sets the value ofCfnConfigRuleProps.getScope()
scope
(CfnConfigRule.ScopeProperty scope) Sets the value ofCfnConfigRuleProps.getScope()
source
(IResolvable source) Sets the value ofCfnConfigRuleProps.getSource()
source
(CfnConfigRule.SourceProperty source) Sets the value ofCfnConfigRuleProps.getSource()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
Sets the value ofCfnConfigRuleProps.getSource()
- Parameters:
source
- Provides the rule owner (AWS
for managed rules,CUSTOM_POLICY
for Custom Policy rules, andCUSTOM_LAMBDA
for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your AWS resources. This parameter is required.- Returns:
this
-
source
Sets the value ofCfnConfigRuleProps.getSource()
- Parameters:
source
- Provides the rule owner (AWS
for managed rules,CUSTOM_POLICY
for Custom Policy rules, andCUSTOM_LAMBDA
for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your AWS resources. This parameter is required.- Returns:
this
-
compliance
Sets the value ofCfnConfigRuleProps.getCompliance()
- Parameters:
compliance
- Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.- Returns:
this
-
compliance
@Stability(Stable) public CfnConfigRuleProps.Builder compliance(CfnConfigRule.ComplianceProperty compliance) Sets the value ofCfnConfigRuleProps.getCompliance()
- Parameters:
compliance
- Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.- Returns:
this
-
configRuleName
Sets the value ofCfnConfigRuleProps.getConfigRuleName()
- Parameters:
configRuleName
- A name for the AWS Config rule. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see Name Type .- Returns:
this
-
description
Sets the value ofCfnConfigRuleProps.getDescription()
- Parameters:
description
- The description that you provide for the AWS Config rule.- Returns:
this
-
evaluationModes
Sets the value ofCfnConfigRuleProps.getEvaluationModes()
- Parameters:
evaluationModes
- The modes the AWS Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.- Returns:
this
-
evaluationModes
@Stability(Stable) public CfnConfigRuleProps.Builder evaluationModes(List<? extends Object> evaluationModes) Sets the value ofCfnConfigRuleProps.getEvaluationModes()
- Parameters:
evaluationModes
- The modes the AWS Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.- Returns:
this
-
inputParameters
Sets the value ofCfnConfigRuleProps.getInputParameters()
- Parameters:
inputParameters
- A string, in JSON format, that is passed to the AWS Config rule Lambda function.- Returns:
this
-
maximumExecutionFrequency
@Stability(Stable) public CfnConfigRuleProps.Builder maximumExecutionFrequency(String maximumExecutionFrequency) Sets the value ofCfnConfigRuleProps.getMaximumExecutionFrequency()
- Parameters:
maximumExecutionFrequency
- The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value forMaximumExecutionFrequency
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.- Returns:
this
-
scope
Sets the value ofCfnConfigRuleProps.getScope()
- Parameters:
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.
- Returns:
this
-
scope
Sets the value ofCfnConfigRuleProps.getScope()
- Parameters:
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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnConfigRuleProps>
- Returns:
- a new instance of
CfnConfigRuleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-