Class CfnRule

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-21T06:34:14.601Z") @Stability(Stable) public class CfnRule extends CfnResource implements IInspectable, ITaggableV2
Resource Type definition for AWS::Rbin::Rule.

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.rbin.*;
 CfnRule cfnRule = CfnRule.Builder.create(this, "MyCfnRule")
         .resourceType("resourceType")
         .retentionPeriod(RetentionPeriodProperty.builder()
                 .retentionPeriodUnit("retentionPeriodUnit")
                 .retentionPeriodValue(123)
                 .build())
         // the properties below are optional
         .description("description")
         .excludeResourceTags(List.of(ResourceTagProperty.builder()
                 .resourceTagKey("resourceTagKey")
                 .resourceTagValue("resourceTagValue")
                 .build()))
         .lockConfiguration(UnlockDelayProperty.builder()
                 .unlockDelayUnit("unlockDelayUnit")
                 .unlockDelayValue(123)
                 .build())
         .resourceTags(List.of(ResourceTagProperty.builder()
                 .resourceTagKey("resourceTagKey")
                 .resourceTagValue("resourceTagValue")
                 .build()))
         .status("status")
         .tags(List.of(CfnTag.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

    • CfnRule

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

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

      @Stability(Stable) public CfnRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRuleProps props)
      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

    • 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.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Rule Arn is unique for each rule.
    • getAttrIdentifier

      @Stability(Stable) @NotNull public String getAttrIdentifier()
      The unique ID of the retention rule.
    • getAttrLockState

      @Stability(Stable) @NotNull public String getAttrLockState()
      The lock state for the retention rule.
    • 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
    • getResourceType

      @Stability(Stable) @NotNull public String getResourceType()
      The resource type retained by the retention rule.
    • setResourceType

      @Stability(Stable) public void setResourceType(@NotNull String value)
      The resource type retained by the retention rule.
    • getRetentionPeriod

      @Stability(Stable) @NotNull public Object getRetentionPeriod()
      The retention period of the rule.
    • setRetentionPeriod

      @Stability(Stable) public void setRetentionPeriod(@NotNull IResolvable value)
      The retention period of the rule.
    • setRetentionPeriod

      @Stability(Stable) public void setRetentionPeriod(@NotNull CfnRule.RetentionPeriodProperty value)
      The retention period of the rule.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the retention rule.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the retention rule.
    • getExcludeResourceTags

      @Stability(Stable) @Nullable public Object getExcludeResourceTags()
      Information about the exclude resource tags used to identify resources that are excluded by the retention rule.
    • setExcludeResourceTags

      @Stability(Stable) public void setExcludeResourceTags(@Nullable IResolvable value)
      Information about the exclude resource tags used to identify resources that are excluded by the retention rule.
    • setExcludeResourceTags

      @Stability(Stable) public void setExcludeResourceTags(@Nullable List<Object> value)
      Information about the exclude resource tags used to identify resources that are excluded by the retention rule.
    • getLockConfiguration

      @Stability(Stable) @Nullable public Object getLockConfiguration()
    • setLockConfiguration

      @Stability(Stable) public void setLockConfiguration(@Nullable IResolvable value)
    • setLockConfiguration

      @Stability(Stable) public void setLockConfiguration(@Nullable CfnRule.UnlockDelayProperty value)
    • getResourceTags

      @Stability(Stable) @Nullable public Object getResourceTags()
      Information about the resource tags used to identify resources that are retained by the retention rule.
    • setResourceTags

      @Stability(Stable) public void setResourceTags(@Nullable IResolvable value)
      Information about the resource tags used to identify resources that are retained by the retention rule.
    • setResourceTags

      @Stability(Stable) public void setResourceTags(@Nullable List<Object> value)
      Information about the resource tags used to identify resources that are retained by the retention rule.
    • getStatus

      @Stability(Stable) @Nullable public String getStatus()
      The state of the retention rule.
    • setStatus

      @Stability(Stable) public void setStatus(@Nullable String value)
      The state of the retention rule.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Information about the tags assigned to the retention rule.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Information about the tags assigned to the retention rule.