Class CfnCustomDetectionRuleAssociation

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.guardduty.CfnCustomDetectionRuleAssociation
All Implemented Interfaces:
IInspectable, ICustomDetectionRuleAssociationRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:11.359Z") @Stability(Stable) public class CfnCustomDetectionRuleAssociation extends CfnResource implements IInspectable, ICustomDetectionRuleAssociationRef, ITaggableV2
Resource Type definition for AWS::GuardDuty::CustomDetectionRuleAssociation.

Associates a GuardDuty custom detection rule with the caller's account, enabling the rule in either LIVE or DRY_RUN mode.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.guardduty.*;
 CfnCustomDetectionRuleAssociation cfnCustomDetectionRuleAssociation = CfnCustomDetectionRuleAssociation.Builder.create(this, "MyCfnCustomDetectionRuleAssociation")
         .mode("mode")
         .ruleId("ruleId")
         // the properties below are optional
         .tags(List.of(TagItemProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnCustomDetectionRuleAssociation

      protected CfnCustomDetectionRuleAssociation(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnCustomDetectionRuleAssociation

      protected CfnCustomDetectionRuleAssociation(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnCustomDetectionRuleAssociation

      @Stability(Stable) public CfnCustomDetectionRuleAssociation(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCustomDetectionRuleAssociationProps props)
      Create a new AWS::GuardDuty::CustomDetectionRuleAssociation.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForCustomDetectionRuleAssociation

      @Stability(Stable) @NotNull public static String arnForCustomDetectionRuleAssociation(@NotNull ICustomDetectionRuleAssociationRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnCustomDetectionRuleAssociation

      @Stability(Stable) @NotNull public static Boolean isCfnCustomDetectionRuleAssociation(@NotNull Object x)
      Checks whether the given object is a CfnCustomDetectionRuleAssociation.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAccountId

      @Stability(Stable) @NotNull public String getAttrAccountId()
      The AWS account ID the association applies to.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the association.
    • getAttrAssociationId

      @Stability(Stable) @NotNull public String getAttrAssociationId()
      The service-generated unique identifier of the association.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The time the association was created.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The time the association was last updated.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getCustomDetectionRuleAssociationRef

      @Stability(Stable) @NotNull public CustomDetectionRuleAssociationReference getCustomDetectionRuleAssociationRef()
      A reference to a CustomDetectionRuleAssociation resource.
      Specified by:
      getCustomDetectionRuleAssociationRef in interface ICustomDetectionRuleAssociationRef
    • getMode

      @Stability(Stable) @NotNull public String getMode()
      Whether the rule runs in LIVE mode (generates findings) or DRY_RUN mode (evaluates without generating findings).
    • setMode

      @Stability(Stable) public void setMode(@NotNull String value)
      Whether the rule runs in LIVE mode (generates findings) or DRY_RUN mode (evaluates without generating findings).
    • getRuleId

      @Stability(Stable) @NotNull public String getRuleId()
      The catalog identifier of the custom detection rule to associate.
    • setRuleId

      @Stability(Stable) public void setRuleId(@NotNull String value)
      The catalog identifier of the custom detection rule to associate.
    • getTags

      @Stability(Stable) @Nullable public List<CfnCustomDetectionRuleAssociation.TagItemProperty> getTags()
      The tags applied to the association.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnCustomDetectionRuleAssociation.TagItemProperty> value)
      The tags applied to the association.