# CollectionSchemeProperty

Specifies what data to collect and how often or when to collect it.

- 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_iotfleetwise as iotfleetwise } from 'aws-cdk-lib';
const collectionSchemeProperty: iotfleetwise.CfnCampaign.CollectionSchemeProperty = {
  conditionBasedCollectionScheme: {
    expression: 'expression',

    // the properties below are optional
    conditionLanguageVersion: 123,
    minimumTriggerIntervalMs: 123,
    triggerMode: 'triggerMode',
  },
  timeBasedCollectionScheme: {
    periodMs: 123,
  },
};
```

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_iotfleetwise as iotfleetwise

collection_scheme_property = iotfleetwise.CfnCampaign.CollectionSchemeProperty(
    condition_based_collection_scheme=iotfleetwise.CfnCampaign.ConditionBasedCollectionSchemeProperty(
        expression="expression",

        # the properties below are optional
        condition_language_version=123,
        minimum_trigger_interval_ms=123,
        trigger_mode="triggerMode"
    ),
    time_based_collection_scheme=iotfleetwise.CfnCampaign.TimeBasedCollectionSchemeProperty(
        period_ms=123
    )
)
```

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

CollectionSchemeProperty collectionSchemeProperty = CollectionSchemeProperty.builder()
        .conditionBasedCollectionScheme(ConditionBasedCollectionSchemeProperty.builder()
                .expression("expression")

                // the properties below are optional
                .conditionLanguageVersion(123)
                .minimumTriggerIntervalMs(123)
                .triggerMode("triggerMode")
                .build())
        .timeBasedCollectionScheme(TimeBasedCollectionSchemeProperty.builder()
                .periodMs(123)
                .build())
        .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.IoTFleetWise;

var collectionSchemeProperty = new CollectionSchemeProperty {
    ConditionBasedCollectionScheme = new ConditionBasedCollectionSchemeProperty {
        Expression = "expression",

        // the properties below are optional
        ConditionLanguageVersion = 123,
        MinimumTriggerIntervalMs = 123,
        TriggerMode = "triggerMode"
    },
    TimeBasedCollectionScheme = new TimeBasedCollectionSchemeProperty {
        PeriodMs = 123
    }
};
```

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"

collectionSchemeProperty := &CollectionSchemeProperty{
	ConditionBasedCollectionScheme: &ConditionBasedCollectionSchemeProperty{
		Expression: jsii.String("expression"),

		// the properties below are optional
		ConditionLanguageVersion: jsii.Number(123),
		MinimumTriggerIntervalMs: jsii.Number(123),
		TriggerMode: jsii.String("triggerMode"),
	},
	TimeBasedCollectionScheme: &TimeBasedCollectionSchemeProperty{
		PeriodMs: jsii.Number(123),
	},
}
```

## Properties

- `conditionBasedCollectionScheme`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCampaign.ConditionBasedCollectionSchemeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotfleetwise.CfnCampaign.ConditionBasedCollectionSchemeProperty.html) — Information about a collection scheme that uses a simple logical expression to recognize what data to collect.

- `timeBasedCollectionScheme`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCampaign.TimeBasedCollectionSchemeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotfleetwise.CfnCampaign.TimeBasedCollectionSchemeProperty.html) — Information about a collection scheme that uses a time period to decide how often to collect data.
