Class RuleScope
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.config.RuleScope
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:59.327Z")
@Stability(Stable)
public class RuleScope
extends software.amazon.jsii.JsiiObject
Determines which resources trigger an evaluation of an AWS Config rule.
Example:
// Lambda function containing logic that evaluates compliance with the rule. Function evalComplianceFn = Function.Builder.create(this, "CustomFunction") .code(AssetCode.fromInline("exports.handler = (event) => console.log(event);")) .handler("index.handler") .runtime(Runtime.NODEJS_18_X) .build(); // A custom rule that runs on configuration changes of EC2 instances CustomRule customRule = CustomRule.Builder.create(this, "Custom") .configurationChanges(true) .lambdaFunction(evalComplianceFn) .ruleScope(RuleScope.fromResource(ResourceType.EC2_INSTANCE)) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RuleScope
fromResource
(ResourceType resourceType) restricts scope of changes to a specific resource type or resource identifier.static RuleScope
fromResource
(ResourceType resourceType, String resourceId) restricts scope of changes to a specific resource type or resource identifier.static RuleScope
fromResources
(List<? extends ResourceType> resourceTypes) restricts scope of changes to specific resource types.static RuleScope
restricts scope of changes to a specific tag.static RuleScope
restricts scope of changes to a specific tag.getKey()
tag key applied to resources that will trigger evaluation of a rule.ID of the only AWS resource that will trigger evaluation of a rule.Resource types that will trigger evaluation of a rule.getValue()
tag value applied to resources that will trigger evaluation of a rule.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
RuleScope
protected RuleScope(software.amazon.jsii.JsiiObjectRef objRef) -
RuleScope
protected RuleScope(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromResource
@Stability(Stable) @NotNull public static RuleScope fromResource(@NotNull ResourceType resourceType, @Nullable String resourceId) restricts scope of changes to a specific resource type or resource identifier.- Parameters:
resourceType
- This parameter is required.resourceId
-
-
fromResource
@Stability(Stable) @NotNull public static RuleScope fromResource(@NotNull ResourceType resourceType) restricts scope of changes to a specific resource type or resource identifier.- Parameters:
resourceType
- This parameter is required.
-
fromResources
@Stability(Stable) @NotNull public static RuleScope fromResources(@NotNull List<? extends ResourceType> resourceTypes) restricts scope of changes to specific resource types.- Parameters:
resourceTypes
- This parameter is required.
-
fromTag
@Stability(Stable) @NotNull public static RuleScope fromTag(@NotNull String key, @Nullable String value) restricts scope of changes to a specific tag.- Parameters:
key
- This parameter is required.value
-
-
fromTag
restricts scope of changes to a specific tag.- Parameters:
key
- This parameter is required.
-
getKey
tag key applied to resources that will trigger evaluation of a rule. -
getResourceId
ID of the only AWS resource that will trigger evaluation of a rule. -
getResourceTypes
Resource types that will trigger evaluation of a rule. -
getValue
tag value applied to resources that will trigger evaluation of a rule.
-