# TopicRelativeDateFilterProperty

A structure that represents a relative date filter.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_quicksight as quicksight } from 'aws-cdk-lib';
const topicRelativeDateFilterProperty: quicksight.CfnTopic.TopicRelativeDateFilterProperty = {
  constant: {
    constantType: 'constantType',
    singularConstant: 'singularConstant',
  },
  relativeDateFilterFunction: 'relativeDateFilterFunction',
  timeGranularity: 'timeGranularity',
};
```

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_quicksight as quicksight

topic_relative_date_filter_property = quicksight.CfnTopic.TopicRelativeDateFilterProperty(
    constant=quicksight.CfnTopic.TopicSingularFilterConstantProperty(
        constant_type="constantType",
        singular_constant="singularConstant"
    ),
    relative_date_filter_function="relativeDateFilterFunction",
    time_granularity="timeGranularity"
)
```

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

TopicRelativeDateFilterProperty topicRelativeDateFilterProperty = TopicRelativeDateFilterProperty.builder()
        .constant(TopicSingularFilterConstantProperty.builder()
                .constantType("constantType")
                .singularConstant("singularConstant")
                .build())
        .relativeDateFilterFunction("relativeDateFilterFunction")
        .timeGranularity("timeGranularity")
        .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.QuickSight;

var topicRelativeDateFilterProperty = new TopicRelativeDateFilterProperty {
    Constant = new TopicSingularFilterConstantProperty {
        ConstantType = "constantType",
        SingularConstant = "singularConstant"
    },
    RelativeDateFilterFunction = "relativeDateFilterFunction",
    TimeGranularity = "timeGranularity"
};
```

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"

topicRelativeDateFilterProperty := &TopicRelativeDateFilterProperty{
	Constant: &TopicSingularFilterConstantProperty{
		ConstantType: jsii.String("constantType"),
		SingularConstant: jsii.String("singularConstant"),
	},
	RelativeDateFilterFunction: jsii.String("relativeDateFilterFunction"),
	TimeGranularity: jsii.String("timeGranularity"),
}
```

## Properties

- `constant`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTopic.TopicSingularFilterConstantProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnTopic.TopicSingularFilterConstantProperty.html) — The constant used in a relative date filter.

- `relativeDateFilterFunction`: string — The function to be used in a relative date filter to determine the range of dates to include in the results.

  Valid values for this structure are `BEFORE` , `AFTER` , and `BETWEEN` .

- `timeGranularity`: string — The level of time precision that is used to aggregate `DateTime` values.
