@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:05.255Z") @Stability(value=Experimental) public interface CustomRuleProps extends software.amazon.jsii.JsiiSerializable, RuleProps
Example:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.core.*;
ManagedRule sshRule = ManagedRule.Builder.create(this, "SSH")
.identifier(ManagedRuleIdentifiers.EC2_SECURITY_GROUPS_INCOMING_SSH_DISABLED)
.ruleScope(RuleScope.fromResource(ResourceType.EC2_SECURITY_GROUP, "sg-1234567890abcdefgh"))
.build();
CustomRule customRule = CustomRule.Builder.create(this, "Lambda")
.lambdaFunction(evalComplianceFn)
.configurationChanges(true)
.ruleScope(RuleScope.fromResources(List.of(ResourceType.CLOUDFORMATION_STACK, ResourceType.S3_BUCKET)))
.build();
CustomRule tagRule = CustomRule.Builder.create(this, "CostCenterTagRule")
.lambdaFunction(evalComplianceFn)
.configurationChanges(true)
.ruleScope(RuleScope.fromTag("Cost Center", "MyApp"))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CustomRuleProps.Builder
A builder for
CustomRuleProps |
static class |
CustomRuleProps.Jsii$Proxy
An implementation for
CustomRuleProps |
| Modifier and Type | Method and Description |
|---|---|
static CustomRuleProps.Builder |
builder() |
default Boolean |
getConfigurationChanges()
(experimental) Whether to run the rule on configuration changes.
|
IFunction |
getLambdaFunction()
(experimental) The Lambda function to run.
|
default Boolean |
getPeriodic()
(experimental) Whether to run the rule on a fixed frequency.
|
getConfigRuleName, getDescription, getInputParameters, getMaximumExecutionFrequency, getRuleScope@Stability(value=Experimental) @NotNull IFunction getLambdaFunction()
@Stability(value=Experimental) @Nullable default Boolean getConfigurationChanges()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getPeriodic()
Default: false
@Stability(value=Experimental) static CustomRuleProps.Builder builder()
builder in interface RulePropsCustomRuleProps.Builder of CustomRulePropsCopyright © 2022. All rights reserved.