Class CfnCaseRule

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

@Generated(value="jsii-pacmak/1.125.0 (build fdbe357)", date="2026-01-09T10:20:13.538Z") @Stability(Stable) public class CfnCaseRule extends CfnResource implements IInspectable, ICaseRuleRef, ITaggableV2
Creates a new case rule.

In the Amazon Connect admin website, case rules are known as case field conditions . For more information about case field conditions, see Add case field conditions to a case template .

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.cases.*;
 Object emptyValue;
 CfnCaseRule cfnCaseRule = CfnCaseRule.Builder.create(this, "MyCfnCaseRule")
         .name("name")
         .rule(CaseRuleDetailsProperty.builder()
                 .hidden(HiddenCaseRuleProperty.builder()
                         .conditions(List.of(BooleanConditionProperty.builder()
                                 .equalTo(BooleanOperandsProperty.builder()
                                         .operandOne(OperandOneProperty.builder()
                                                 .fieldId("fieldId")
                                                 .build())
                                         .operandTwo(OperandTwoProperty.builder()
                                                 .booleanValue(false)
                                                 .doubleValue(123)
                                                 .emptyValue(emptyValue)
                                                 .stringValue("stringValue")
                                                 .build())
                                         .result(false)
                                         .build())
                                 .notEqualTo(BooleanOperandsProperty.builder()
                                         .operandOne(OperandOneProperty.builder()
                                                 .fieldId("fieldId")
                                                 .build())
                                         .operandTwo(OperandTwoProperty.builder()
                                                 .booleanValue(false)
                                                 .doubleValue(123)
                                                 .emptyValue(emptyValue)
                                                 .stringValue("stringValue")
                                                 .build())
                                         .result(false)
                                         .build())
                                 .build()))
                         .defaultValue(false)
                         .build())
                 .required(RequiredCaseRuleProperty.builder()
                         .conditions(List.of(BooleanConditionProperty.builder()
                                 .equalTo(BooleanOperandsProperty.builder()
                                         .operandOne(OperandOneProperty.builder()
                                                 .fieldId("fieldId")
                                                 .build())
                                         .operandTwo(OperandTwoProperty.builder()
                                                 .booleanValue(false)
                                                 .doubleValue(123)
                                                 .emptyValue(emptyValue)
                                                 .stringValue("stringValue")
                                                 .build())
                                         .result(false)
                                         .build())
                                 .notEqualTo(BooleanOperandsProperty.builder()
                                         .operandOne(OperandOneProperty.builder()
                                                 .fieldId("fieldId")
                                                 .build())
                                         .operandTwo(OperandTwoProperty.builder()
                                                 .booleanValue(false)
                                                 .doubleValue(123)
                                                 .emptyValue(emptyValue)
                                                 .stringValue("stringValue")
                                                 .build())
                                         .result(false)
                                         .build())
                                 .build()))
                         .defaultValue(false)
                         .build())
                 .build())
         // the properties below are optional
         .description("description")
         .domainId("domainId")
         .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

    • CfnCaseRule

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

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

      @Stability(Stable) public CfnCaseRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCaseRuleProps props)
      Create a new AWS::Cases::CaseRule.

      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

    • arnForCaseRule

      @Stability(Stable) @NotNull public static String arnForCaseRule(@NotNull ICaseRuleRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnCaseRule

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

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

      @Stability(Stable) @NotNull public String getAttrCaseRuleArn()
      The Amazon Resource Name (ARN) of the case rule.
    • getAttrCaseRuleId

      @Stability(Stable) @NotNull public String getAttrCaseRuleId()
      Unique identifier of a case rule.
    • getAttrCreatedTime

      @Stability(Stable) @NotNull public String getAttrCreatedTime()
      Timestamp when the resource was created.
    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      Timestamp when the resource was created or last modified.
    • getCaseRuleRef

      @Stability(Stable) @NotNull public CaseRuleReference getCaseRuleRef()
      A reference to a CaseRule resource.
      Specified by:
      getCaseRuleRef in interface ICaseRuleRef
    • 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
    • getName

      @Stability(Stable) @NotNull public String getName()
      Name of the case rule.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      Name of the case rule.
    • getRule

      @Stability(Stable) @NotNull public Object getRule()
      Represents what rule type should take place, under what conditions.

      Returns union: either IResolvable or CfnCaseRule.CaseRuleDetailsProperty

    • setRule

      @Stability(Stable) public void setRule(@NotNull IResolvable value)
      Represents what rule type should take place, under what conditions.
    • setRule

      @Stability(Stable) public void setRule(@NotNull CfnCaseRule.CaseRuleDetailsProperty value)
      Represents what rule type should take place, under what conditions.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      Description of a case rule.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      Description of a case rule.
    • getDomainId

      @Stability(Stable) @Nullable public String getDomainId()
      Unique identifier of a Cases domain.
    • setDomainId

      @Stability(Stable) public void setDomainId(@Nullable String value)
      Unique identifier of a Cases domain.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.