# TemplateRuleProperty

An association representing a case rule acting upon a field.

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](https://docs.aws.amazon.com/connect/latest/adminguide/case-field-conditions.html) .

- Source: Generated at build time
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cases as cases } from 'aws-cdk-lib';
const templateRuleProperty: cases.CfnTemplate.TemplateRuleProperty = {
  caseRuleId: 'caseRuleId',

  // the properties below are optional
  fieldId: 'fieldId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cases as cases

template_rule_property = cases.CfnTemplate.TemplateRuleProperty(
    case_rule_id="caseRuleId",

    # the properties below are optional
    field_id="fieldId"
)
```

Java:

```java
// 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.*;

TemplateRuleProperty templateRuleProperty = TemplateRuleProperty.builder()
        .caseRuleId("caseRuleId")

        // the properties below are optional
        .fieldId("fieldId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Cases;

var templateRuleProperty = new TemplateRuleProperty {
    CaseRuleId = "caseRuleId",

    // the properties below are optional
    FieldId = "fieldId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

templateRuleProperty := &TemplateRuleProperty{
	CaseRuleId: jsii.String("caseRuleId"),

	// the properties below are optional
	FieldId: jsii.String("fieldId"),
}
```

## Properties

- `caseRuleId`: string (required) — Unique identifier of a case rule.

- `fieldId`: string — Unique identifier of a field.
