# RuleConditionProperty

Struct · External

Conditions for a routing rule.

All non-null fields must match (AND logic). At least one field must be set. HostHeader and HostHeaderWildcard are mutually exclusive. PathPrefix and PathExact are mutually exclusive.

- Source: Generated at build time
- Type last changed: v2.260.0 · 16 Jun 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_rtbfabric as rtbfabric } from 'aws-cdk-lib';
const ruleConditionProperty: rtbfabric.CfnLinkRoutingRule.RuleConditionProperty = {
  hostHeader: 'hostHeader',
  hostHeaderWildcard: 'hostHeaderWildcard',
  pathExact: 'pathExact',
  pathPrefix: 'pathPrefix',
  queryStringEquals: {
    key: 'key',
    value: 'value',
  },
  queryStringExists: 'queryStringExists',
};
```

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_rtbfabric as rtbfabric

rule_condition_property = rtbfabric.CfnLinkRoutingRule.RuleConditionProperty(
    host_header="hostHeader",
    host_header_wildcard="hostHeaderWildcard",
    path_exact="pathExact",
    path_prefix="pathPrefix",
    query_string_equals=rtbfabric.CfnLinkRoutingRule.QueryStringKeyValuePairProperty(
        key="key",
        value="value"
    ),
    query_string_exists="queryStringExists"
)
```

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.rtbfabric.*;

RuleConditionProperty ruleConditionProperty = RuleConditionProperty.builder()
        .hostHeader("hostHeader")
        .hostHeaderWildcard("hostHeaderWildcard")
        .pathExact("pathExact")
        .pathPrefix("pathPrefix")
        .queryStringEquals(QueryStringKeyValuePairProperty.builder()
                .key("key")
                .value("value")
                .build())
        .queryStringExists("queryStringExists")
        .build();
```

C#:

```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.RTBFabric;

var ruleConditionProperty = new RuleConditionProperty {
    HostHeader = "hostHeader",
    HostHeaderWildcard = "hostHeaderWildcard",
    PathExact = "pathExact",
    PathPrefix = "pathPrefix",
    QueryStringEquals = new QueryStringKeyValuePairProperty {
        Key = "key",
        Value = "value"
    },
    QueryStringExists = "queryStringExists"
};
```

Go:

```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"

ruleConditionProperty := &RuleConditionProperty{
	HostHeader: jsii.String("hostHeader"),
	HostHeaderWildcard: jsii.String("hostHeaderWildcard"),
	PathExact: jsii.String("pathExact"),
	PathPrefix: jsii.String("pathPrefix"),
	QueryStringEquals: &QueryStringKeyValuePairProperty{
		Key: jsii.String("key"),
		Value: jsii.String("value"),
	},
	QueryStringExists: jsii.String("queryStringExists"),
}
```

## Properties

- `hostHeader`: string — Exact host match — RFC 3986 unreserved characters.

  Mutually exclusive with HostHeaderWildcard.

- `hostHeaderWildcard`: string — Wildcard host pattern (e.g., *.example.com) — RFC 3986 unreserved characters plus *. Mutually exclusive with HostHeader.

- `pathExact`: string — Exact path match — must start with /.

  Mutually exclusive with PathPrefix.

- `pathPrefix`: string — Path prefix matching — strict starts-with, must start with /.

  Mutually exclusive with PathExact.

- `queryStringEquals`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLinkRoutingRule.QueryStringKeyValuePairProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rtbfabric.CfnLinkRoutingRule.QueryStringKeyValuePairProperty.html)

- `queryStringExists`: string — Query string key presence check (any value accepted).
