Skip to content
v2.278.0

CfnCampaignProps ​

Struct External

Properties for defining a CfnCampaign.

Example ​

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 cfnCampaignProps: iotfleetwise.CfnCampaignProps = {
  collectionScheme: {
    conditionBasedCollectionScheme: {
      expression: 'expression',

      // the properties below are optional
      conditionLanguageVersion: 123,
      minimumTriggerIntervalMs: 123,
      triggerMode: 'triggerMode',
    },
    timeBasedCollectionScheme: {
      periodMs: 123,
    },
  },
  name: 'name',
  signalCatalogArn: 'signalCatalogArn',
  targetArn: 'targetArn',

  // the properties below are optional
  action: 'action',
  compression: 'compression',
  dataDestinationConfigs: [{
    mqttTopicConfig: {
      executionRoleArn: 'executionRoleArn',
      mqttTopicArn: 'mqttTopicArn',
    },
    s3Config: {
      bucketArn: 'bucketArn',

      // the properties below are optional
      dataFormat: 'dataFormat',
      prefix: 'prefix',
      storageCompressionFormat: 'storageCompressionFormat',
    },
    timestreamConfig: {
      executionRoleArn: 'executionRoleArn',
      timestreamTableArn: 'timestreamTableArn',
    },
  }],
  dataExtraDimensions: ['dataExtraDimensions'],
  dataPartitions: [{
    id: 'id',
    storageOptions: {
      maximumSize: {
        unit: 'unit',
        value: 123,
      },
      minimumTimeToLive: {
        unit: 'unit',
        value: 123,
      },
      storageLocation: 'storageLocation',
    },

    // the properties below are optional
    uploadOptions: {
      expression: 'expression',

      // the properties below are optional
      conditionLanguageVersion: 123,
    },
  }],
  description: 'description',
  diagnosticsMode: 'diagnosticsMode',
  expiryTime: 'expiryTime',
  postTriggerCollectionDuration: 123,
  priority: 123,
  signalsToCollect: [{
    name: 'name',

    // the properties below are optional
    dataPartitionId: 'dataPartitionId',
    maxSampleCount: 123,
    minimumSamplingIntervalMs: 123,
  }],
  signalsToFetch: [{
    actions: ['actions'],
    fullyQualifiedName: 'fullyQualifiedName',
    signalFetchConfig: {
      conditionBased: {
        conditionExpression: 'conditionExpression',
        triggerMode: 'triggerMode',
      },
      timeBased: {
        executionFrequencyMs: 123,
      },
    },

    // the properties below are optional
    conditionLanguageVersion: 123,
  }],
  spoolingMode: 'spoolingMode',
  startTime: 'startTime',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# 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

cfn_campaign_props = iotfleetwise.CfnCampaignProps(
    collection_scheme=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
        )
    ),
    name="name",
    signal_catalog_arn="signalCatalogArn",
    target_arn="targetArn",

    # the properties below are optional
    action="action",
    compression="compression",
    data_destination_configs=[iotfleetwise.CfnCampaign.DataDestinationConfigProperty(
        mqtt_topic_config=iotfleetwise.CfnCampaign.MqttTopicConfigProperty(
            execution_role_arn="executionRoleArn",
            mqtt_topic_arn="mqttTopicArn"
        ),
        s3_config=iotfleetwise.CfnCampaign.S3ConfigProperty(
            bucket_arn="bucketArn",

            # the properties below are optional
            data_format="dataFormat",
            prefix="prefix",
            storage_compression_format="storageCompressionFormat"
        ),
        timestream_config=iotfleetwise.CfnCampaign.TimestreamConfigProperty(
            execution_role_arn="executionRoleArn",
            timestream_table_arn="timestreamTableArn"
        )
    )],
    data_extra_dimensions=["dataExtraDimensions"],
    data_partitions=[iotfleetwise.CfnCampaign.DataPartitionProperty(
        id="id",
        storage_options=iotfleetwise.CfnCampaign.DataPartitionStorageOptionsProperty(
            maximum_size=iotfleetwise.CfnCampaign.StorageMaximumSizeProperty(
                unit="unit",
                value=123
            ),
            minimum_time_to_live=iotfleetwise.CfnCampaign.StorageMinimumTimeToLiveProperty(
                unit="unit",
                value=123
            ),
            storage_location="storageLocation"
        ),

        # the properties below are optional
        upload_options=iotfleetwise.CfnCampaign.DataPartitionUploadOptionsProperty(
            expression="expression",

            # the properties below are optional
            condition_language_version=123
        )
    )],
    description="description",
    diagnostics_mode="diagnosticsMode",
    expiry_time="expiryTime",
    post_trigger_collection_duration=123,
    priority=123,
    signals_to_collect=[iotfleetwise.CfnCampaign.SignalInformationProperty(
        name="name",

        # the properties below are optional
        data_partition_id="dataPartitionId",
        max_sample_count=123,
        minimum_sampling_interval_ms=123
    )],
    signals_to_fetch=[iotfleetwise.CfnCampaign.SignalFetchInformationProperty(
        actions=["actions"],
        fully_qualified_name="fullyQualifiedName",
        signal_fetch_config=iotfleetwise.CfnCampaign.SignalFetchConfigProperty(
            condition_based=iotfleetwise.CfnCampaign.ConditionBasedSignalFetchConfigProperty(
                condition_expression="conditionExpression",
                trigger_mode="triggerMode"
            ),
            time_based=iotfleetwise.CfnCampaign.TimeBasedSignalFetchConfigProperty(
                execution_frequency_ms=123
            )
        ),

        # the properties below are optional
        condition_language_version=123
    )],
    spooling_mode="spoolingMode",
    start_time="startTime",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.*;

CfnCampaignProps cfnCampaignProps = CfnCampaignProps.builder()
        .collectionScheme(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())
        .name("name")
        .signalCatalogArn("signalCatalogArn")
        .targetArn("targetArn")

        // the properties below are optional
        .action("action")
        .compression("compression")
        .dataDestinationConfigs(List.of(DataDestinationConfigProperty.builder()
                .mqttTopicConfig(MqttTopicConfigProperty.builder()
                        .executionRoleArn("executionRoleArn")
                        .mqttTopicArn("mqttTopicArn")
                        .build())
                .s3Config(S3ConfigProperty.builder()
                        .bucketArn("bucketArn")

                        // the properties below are optional
                        .dataFormat("dataFormat")
                        .prefix("prefix")
                        .storageCompressionFormat("storageCompressionFormat")
                        .build())
                .timestreamConfig(TimestreamConfigProperty.builder()
                        .executionRoleArn("executionRoleArn")
                        .timestreamTableArn("timestreamTableArn")
                        .build())
                .build()))
        .dataExtraDimensions(List.of("dataExtraDimensions"))
        .dataPartitions(List.of(DataPartitionProperty.builder()
                .id("id")
                .storageOptions(DataPartitionStorageOptionsProperty.builder()
                        .maximumSize(StorageMaximumSizeProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .minimumTimeToLive(StorageMinimumTimeToLiveProperty.builder()
                                .unit("unit")
                                .value(123)
                                .build())
                        .storageLocation("storageLocation")
                        .build())

                // the properties below are optional
                .uploadOptions(DataPartitionUploadOptionsProperty.builder()
                        .expression("expression")

                        // the properties below are optional
                        .conditionLanguageVersion(123)
                        .build())
                .build()))
        .description("description")
        .diagnosticsMode("diagnosticsMode")
        .expiryTime("expiryTime")
        .postTriggerCollectionDuration(123)
        .priority(123)
        .signalsToCollect(List.of(SignalInformationProperty.builder()
                .name("name")

                // the properties below are optional
                .dataPartitionId("dataPartitionId")
                .maxSampleCount(123)
                .minimumSamplingIntervalMs(123)
                .build()))
        .signalsToFetch(List.of(SignalFetchInformationProperty.builder()
                .actions(List.of("actions"))
                .fullyQualifiedName("fullyQualifiedName")
                .signalFetchConfig(SignalFetchConfigProperty.builder()
                        .conditionBased(ConditionBasedSignalFetchConfigProperty.builder()
                                .conditionExpression("conditionExpression")
                                .triggerMode("triggerMode")
                                .build())
                        .timeBased(TimeBasedSignalFetchConfigProperty.builder()
                                .executionFrequencyMs(123)
                                .build())
                        .build())

                // the properties below are optional
                .conditionLanguageVersion(123)
                .build()))
        .spoolingMode("spoolingMode")
        .startTime("startTime")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
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 cfnCampaignProps = new CfnCampaignProps {
    CollectionScheme = new CollectionSchemeProperty {
        ConditionBasedCollectionScheme = new ConditionBasedCollectionSchemeProperty {
            Expression = "expression",

            // the properties below are optional
            ConditionLanguageVersion = 123,
            MinimumTriggerIntervalMs = 123,
            TriggerMode = "triggerMode"
        },
        TimeBasedCollectionScheme = new TimeBasedCollectionSchemeProperty {
            PeriodMs = 123
        }
    },
    Name = "name",
    SignalCatalogArn = "signalCatalogArn",
    TargetArn = "targetArn",

    // the properties below are optional
    Action = "action",
    Compression = "compression",
    DataDestinationConfigs = new [] { new DataDestinationConfigProperty {
        MqttTopicConfig = new MqttTopicConfigProperty {
            ExecutionRoleArn = "executionRoleArn",
            MqttTopicArn = "mqttTopicArn"
        },
        S3Config = new S3ConfigProperty {
            BucketArn = "bucketArn",

            // the properties below are optional
            DataFormat = "dataFormat",
            Prefix = "prefix",
            StorageCompressionFormat = "storageCompressionFormat"
        },
        TimestreamConfig = new TimestreamConfigProperty {
            ExecutionRoleArn = "executionRoleArn",
            TimestreamTableArn = "timestreamTableArn"
        }
    } },
    DataExtraDimensions = new [] { "dataExtraDimensions" },
    DataPartitions = new [] { new DataPartitionProperty {
        Id = "id",
        StorageOptions = new DataPartitionStorageOptionsProperty {
            MaximumSize = new StorageMaximumSizeProperty {
                Unit = "unit",
                Value = 123
            },
            MinimumTimeToLive = new StorageMinimumTimeToLiveProperty {
                Unit = "unit",
                Value = 123
            },
            StorageLocation = "storageLocation"
        },

        // the properties below are optional
        UploadOptions = new DataPartitionUploadOptionsProperty {
            Expression = "expression",

            // the properties below are optional
            ConditionLanguageVersion = 123
        }
    } },
    Description = "description",
    DiagnosticsMode = "diagnosticsMode",
    ExpiryTime = "expiryTime",
    PostTriggerCollectionDuration = 123,
    Priority = 123,
    SignalsToCollect = new [] { new SignalInformationProperty {
        Name = "name",

        // the properties below are optional
        DataPartitionId = "dataPartitionId",
        MaxSampleCount = 123,
        MinimumSamplingIntervalMs = 123
    } },
    SignalsToFetch = new [] { new SignalFetchInformationProperty {
        Actions = new [] { "actions" },
        FullyQualifiedName = "fullyQualifiedName",
        SignalFetchConfig = new SignalFetchConfigProperty {
            ConditionBased = new ConditionBasedSignalFetchConfigProperty {
                ConditionExpression = "conditionExpression",
                TriggerMode = "triggerMode"
            },
            TimeBased = new TimeBasedSignalFetchConfigProperty {
                ExecutionFrequencyMs = 123
            }
        },

        // the properties below are optional
        ConditionLanguageVersion = 123
    } },
    SpoolingMode = "spoolingMode",
    StartTime = "startTime",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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"

cfnCampaignProps := &CfnCampaignProps{
	CollectionScheme: &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),
		},
	},
	Name: jsii.String("name"),
	SignalCatalogArn: jsii.String("signalCatalogArn"),
	TargetArn: jsii.String("targetArn"),

	// the properties below are optional
	Action: jsii.String("action"),
	Compression: jsii.String("compression"),
	DataDestinationConfigs: []interface{}{
		&DataDestinationConfigProperty{
			MqttTopicConfig: &MqttTopicConfigProperty{
				ExecutionRoleArn: jsii.String("executionRoleArn"),
				MqttTopicArn: jsii.String("mqttTopicArn"),
			},
			S3Config: &S3ConfigProperty{
				BucketArn: jsii.String("bucketArn"),

				// the properties below are optional
				DataFormat: jsii.String("dataFormat"),
				Prefix: jsii.String("prefix"),
				StorageCompressionFormat: jsii.String("storageCompressionFormat"),
			},
			TimestreamConfig: &TimestreamConfigProperty{
				ExecutionRoleArn: jsii.String("executionRoleArn"),
				TimestreamTableArn: jsii.String("timestreamTableArn"),
			},
		},
	},
	DataExtraDimensions: []*string{
		jsii.String("dataExtraDimensions"),
	},
	DataPartitions: []interface{}{
		&DataPartitionProperty{
			Id: jsii.String("id"),
			StorageOptions: &DataPartitionStorageOptionsProperty{
				MaximumSize: &StorageMaximumSizeProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				MinimumTimeToLive: &StorageMinimumTimeToLiveProperty{
					Unit: jsii.String("unit"),
					Value: jsii.Number(123),
				},
				StorageLocation: jsii.String("storageLocation"),
			},

			// the properties below are optional
			UploadOptions: &DataPartitionUploadOptionsProperty{
				Expression: jsii.String("expression"),

				// the properties below are optional
				ConditionLanguageVersion: jsii.Number(123),
			},
		},
	},
	Description: jsii.String("description"),
	DiagnosticsMode: jsii.String("diagnosticsMode"),
	ExpiryTime: jsii.String("expiryTime"),
	PostTriggerCollectionDuration: jsii.Number(123),
	Priority: jsii.Number(123),
	SignalsToCollect: []interface{}{
		&SignalInformationProperty{
			Name: jsii.String("name"),

			// the properties below are optional
			DataPartitionId: jsii.String("dataPartitionId"),
			MaxSampleCount: jsii.Number(123),
			MinimumSamplingIntervalMs: jsii.Number(123),
		},
	},
	SignalsToFetch: []interface{}{
		&SignalFetchInformationProperty{
			Actions: []*string{
				jsii.String("actions"),
			},
			FullyQualifiedName: jsii.String("fullyQualifiedName"),
			SignalFetchConfig: &SignalFetchConfigProperty{
				ConditionBased: &ConditionBasedSignalFetchConfigProperty{
					ConditionExpression: jsii.String("conditionExpression"),
					TriggerMode: jsii.String("triggerMode"),
				},
				TimeBased: &TimeBasedSignalFetchConfigProperty{
					ExecutionFrequencyMs: jsii.Number(123),
				},
			},

			// the properties below are optional
			ConditionLanguageVersion: jsii.Number(123),
		},
	},
	SpoolingMode: jsii.String("spoolingMode"),
	StartTime: jsii.String("startTime"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

actionoptionalstringactionoptionalstractionoptionalStringActionoptionalstringActionoptional*string #
Specifies how to update a campaign. The action can be one of the following:.
notes
  • APPROVE - To approve delivering a data collection scheme to vehicles.
  • SUSPEND - To suspend collecting signal data. The campaign is deleted from vehicles and all vehicles in the suspended campaign will stop sending data.
  • RESUME - To reactivate the SUSPEND campaign. The campaign is redeployed to all vehicles and the vehicles will resume sending data.
  • UPDATE - To update a campaign.
collectionSchemeIResolvable | CfnCampaign.CollectionSchemePropertycollection_schemetyping.Union[IResolvable, CollectionSchemeProperty]collectionSchemeIResolvableCollectionSchemeIResolvableCollectionSchemeinterface{} required #
The data collection scheme associated with the campaign.

You can specify a scheme that collects data based on time or an event.

compressionoptionalstringcompressionoptionalstrcompressionoptionalStringCompressionoptionalstringCompressionoptional*string = "OFF" #
Whether to compress signals before transmitting data to AWS IoT FleetWise .

If you don't want to compress the signals, use OFF . If it's not specified, SNAPPY is used.

Default: SNAPPY

dataDestinationConfigsoptionalIResolvable | IResolvable | CfnCampaign.DataDestinationConfigProperty[]data_destination_configsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataDestinationConfigProperty]]]dataDestinationConfigsoptionalIResolvableDataDestinationConfigsoptionalIResolvableDataDestinationConfigsoptionalinterface{} #
The destination where the campaign sends data.
notes

You can choose to send data to be stored in Amazon S3 or Amazon Timestream .

Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. AWS IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple AWS IoT FleetWise servers for redundancy and high availability.

You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.

dataExtraDimensionsoptionalstring[]data_extra_dimensionsoptionaltyping.List[str]dataExtraDimensionsoptionalList<String>DataExtraDimensionsoptionalstring[]DataExtraDimensionsoptional*[]*string #
A list of vehicle attributes to associate with a campaign.
notes

Enrich the data with specified vehicle attributes. For example, add make and model to the campaign, and AWS IoT FleetWise will associate the data with those attributes as dimensions in Amazon Timestream . You can then query the data against make and model .

Default: An empty array

dataPartitionsoptionalIResolvable | IResolvable | CfnCampaign.DataPartitionProperty[]data_partitionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataPartitionProperty]]]dataPartitionsoptionalIResolvableDataPartitionsoptionalIResolvableDataPartitionsoptionalinterface{} #
The data partitions associated with the signals collected from the vehicle.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description of the campaign.
diagnosticsModeoptionalstringdiagnostics_modeoptionalstrdiagnosticsModeoptionalStringDiagnosticsModeoptionalstringDiagnosticsModeoptional*string = "OFF" #
Option for a vehicle to send diagnostic trouble codes to AWS IoT FleetWise .

If you want to send diagnostic trouble codes, use SEND_ACTIVE_DTCS . If it's not specified, OFF is used.

Default: OFF

expiryTimeoptionalstringexpiry_timeoptionalstrexpiryTimeoptionalStringExpiryTimeoptionalstringExpiryTimeoptional*string = "253402214400" #
The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time).

Vehicle data isn't collected after the campaign expires.

Default: 253402214400 (December 31, 9999, 00:00:00 UTC)

namestringnamestrnameStringNamestringName*string required #
The name of a campaign.
postTriggerCollectionDurationoptionalnumberpost_trigger_collection_durationoptionalint | floatpostTriggerCollectionDurationoptionalNumberPostTriggerCollectionDurationoptionaldoublePostTriggerCollectionDurationoptional*float64 = 0 #
How long (in milliseconds) to collect raw data after a triggering event initiates the collection.

If it's not specified, 0 is used.

Default: 0

priorityoptionalnumberpriorityoptionalint | floatpriorityoptionalNumberPriorityoptionaldoublePriorityoptional*float64 = 0 #
A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet.

A campaign with the lowest value is deployed to vehicles before any other campaigns. If it's not specified, 0 is used.

Default: 0

signalCatalogArnstringsignal_catalog_arnstrsignalCatalogArnStringSignalCatalogArnstringSignalCatalogArn*string required #
The Amazon Resource Name (ARN) of the signal catalog associated with the campaign.
signalsToCollectoptionalIResolvable | IResolvable | CfnCampaign.SignalInformationProperty[]signals_to_collectoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SignalInformationProperty]]]signalsToCollectoptionalIResolvableSignalsToCollectoptionalIResolvableSignalsToCollectoptionalinterface{} #
A list of information about signals to collect.
signalsToFetchoptionalIResolvable | IResolvable | CfnCampaign.SignalFetchInformationProperty[]signals_to_fetchoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SignalFetchInformationProperty]]]signalsToFetchoptionalIResolvableSignalsToFetchoptionalIResolvableSignalsToFetchoptionalinterface{} #
A list of information about signals to fetch.
spoolingModeoptionalstringspooling_modeoptionalstrspoolingModeoptionalStringSpoolingModeoptionalstringSpoolingModeoptional*string = "OFF" #
Whether to store collected data after a vehicle lost a connection with the cloud.
notes

After a connection is re-established, the data is automatically forwarded to AWS IoT FleetWise . If you want to store collected data when a vehicle loses connection with the cloud, use TO_DISK . If it's not specified, OFF is used.

Default: OFF

startTimeoptionalstringstart_timeoptionalstrstartTimeoptionalStringStartTimeoptionalstringStartTimeoptional*string = "0" #
The time, in milliseconds, to deliver a campaign after it was approved. If it's not specified, `0` is used.

Default: 0

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Metadata that can be used to manage the campaign.
targetArnstringtarget_arnstrtargetArnStringTargetArnstringTargetArn*string required #
The Amazon Resource Name (ARN) of a vehicle or fleet to which the campaign is deployed.