Skip to content
v2.274.0

CfnCampaign L1 construct ​

Creates an orchestration of data collection rules.

The AWS IoT FleetWise Edge Agent software running in vehicles uses campaigns to decide how to collect and transfer data to the cloud. You create campaigns in the cloud. After you or your team approve campaigns, AWS IoT FleetWise automatically deploys them to vehicles.

For more information, see Campaigns in the AWS IoT FleetWise Developer Guide .

Access to certain AWS IoT FleetWise features is currently gated. For more information, see AWS Region and feature availability in the AWS IoT FleetWise Developer Guide .

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 cfnCampaign = new iotfleetwise.CfnCampaign(this, 'MyCfnCampaign', {
  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 = iotfleetwise.CfnCampaign(self, "MyCfnCampaign",
    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.*;

CfnCampaign cfnCampaign = CfnCampaign.Builder.create(this, "MyCfnCampaign")
        .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 cfnCampaign = new CfnCampaign(this, "MyCfnCampaign", 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"

cfnCampaign := awscdk.Aws_iotfleetwise.NewCfnCampaign(this, jsii.String("MyCfnCampaign"), &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"),
		},
	},
})

Initializer ​

ts
new CfnCampaign(scope: Construct, id: string, props: CfnCampaignProps)
python
CfnCampaign(scope: Construct, id: str, props: CfnCampaignProps)
java
new CfnCampaign(Construct scope, String id, CfnCampaignProps props)
csharp
new CfnCampaign(Construct scope, string id, CfnCampaignProps props)
go
NewCfnCampaign(Scope Construct, Id *string, Props CfnCampaignProps)

Construct Props ​

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*stringrequired#
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*stringrequired#
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*stringrequired#
The Amazon Resource Name (ARN) of a vehicle or fleet to which the campaign is deployed.

Properties ​

actionmay be undefinedstringactionmay be undefinedstractionmay be undefinedStringActionmay be undefinedstringActionmay be undefined*string#
Specifies how to update a campaign.

The action can be one of the following:.

attrArnstringattr_arnstrattrArnStringAttrArnstringAttrArn*string#
The Amazon Resource Name (ARN) of the campaign.
attrCreationTimestringattr_creation_timestrattrCreationTimeStringAttrCreationTimestringAttrCreationTime*string#
The time the campaign was created in seconds since epoch (January 1, 1970 at midnight UTC time).
attrLastModificationTimestringattr_last_modification_timestrattrLastModificationTimeStringAttrLastModificationTimestringAttrLastModificationTime*string#
The last time the campaign was modified.
attrStatusstringattr_statusstrattrStatusStringAttrStatusstringAttrStatus*string#
The state of the campaign.

The status can be one of: CREATING , WAITING_FOR_APPROVAL , RUNNING , and SUSPENDED .

A reference to a Campaign resource.
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#
AWS resource type.
collectionSchemeIResolvable | CfnCampaign.CollectionSchemePropertycollection_schemetyping.Union[IResolvable, CollectionSchemeProperty]collectionSchemeIResolvableCollectionSchemeIResolvableCollectionSchemeinterface{}#
The data collection scheme associated with the campaign.
compressionmay be undefinedstringcompressionmay be undefinedstrcompressionmay be undefinedStringCompressionmay be undefinedstringCompressionmay be undefined*string#
Whether to compress signals before transmitting data to AWS IoT FleetWise .
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#
dataDestinationConfigsmay be undefinedIResolvable | IResolvable | CfnCampaign.DataDestinationConfigProperty[]data_destination_configsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataDestinationConfigProperty]]]dataDestinationConfigsmay be undefinedIResolvableDataDestinationConfigsmay be undefinedIResolvableDataDestinationConfigsmay be undefinedinterface{}#
The destination where the campaign sends data.
dataExtraDimensionsmay be undefinedstring[]data_extra_dimensionsmay be undefinedtyping.List[str]dataExtraDimensionsmay be undefinedList<String>DataExtraDimensionsmay be undefinedstring[]DataExtraDimensionsmay be undefined*[]*string#
A list of vehicle attributes to associate with a campaign.
dataPartitionsmay be undefinedIResolvable | IResolvable | CfnCampaign.DataPartitionProperty[]data_partitionsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataPartitionProperty]]]dataPartitionsmay be undefinedIResolvableDataPartitionsmay be undefinedIResolvableDataPartitionsmay be undefinedinterface{}#
The data partitions associated with the signals collected from the vehicle.
descriptionmay be undefinedstringdescriptionmay be undefinedstrdescriptionmay be undefinedStringDescriptionmay be undefinedstringDescriptionmay be undefined*string#
The description of the campaign.
diagnosticsModemay be undefinedstringdiagnostics_modemay be undefinedstrdiagnosticsModemay be undefinedStringDiagnosticsModemay be undefinedstringDiagnosticsModemay be undefined*string#
Option for a vehicle to send diagnostic trouble codes to AWS IoT FleetWise .
expiryTimemay be undefinedstringexpiry_timemay be undefinedstrexpiryTimemay be undefinedStringExpiryTimemay be undefinedstringExpiryTimemay be undefined*string#
The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time).
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string#
The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

namestringnamestrnameStringNamestringName*string#
The name of a campaign.
nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
postTriggerCollectionDurationmay be undefinednumberpost_trigger_collection_durationmay be undefinedint | floatpostTriggerCollectionDurationmay be undefinedNumberPostTriggerCollectionDurationmay be undefineddoublePostTriggerCollectionDurationmay be undefined*float64#
How long (in milliseconds) to collect raw data after a triggering event initiates the collection.
prioritymay be undefinednumberprioritymay be undefinedint | floatprioritymay be undefinedNumberPrioritymay be undefineddoublePrioritymay be undefined*float64#
A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet.
refstringrefstrrefStringRefstringRef*string#
Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

signalCatalogArnstringsignal_catalog_arnstrsignalCatalogArnStringSignalCatalogArnstringSignalCatalogArn*string#
The Amazon Resource Name (ARN) of the signal catalog associated with the campaign.
signalsToCollectmay be undefinedIResolvable | IResolvable | CfnCampaign.SignalInformationProperty[]signals_to_collectmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SignalInformationProperty]]]signalsToCollectmay be undefinedIResolvableSignalsToCollectmay be undefinedIResolvableSignalsToCollectmay be undefinedinterface{}#
A list of information about signals to collect.
signalsToFetchmay be undefinedIResolvable | IResolvable | CfnCampaign.SignalFetchInformationProperty[]signals_to_fetchmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SignalFetchInformationProperty]]]signalsToFetchmay be undefinedIResolvableSignalsToFetchmay be undefinedIResolvableSignalsToFetchmay be undefinedinterface{}#
A list of information about signals to fetch.
spoolingModemay be undefinedstringspooling_modemay be undefinedstrspoolingModemay be undefinedStringSpoolingModemay be undefinedstringSpoolingModemay be undefined*string#
Whether to store collected data after a vehicle lost a connection with the cloud.
stackStackstackStackstackStackStackStackStackStack#
The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

startTimemay be undefinedstringstart_timemay be undefinedstrstartTimemay be undefinedStringStartTimemay be undefinedstringStartTimemay be undefined*string#
The time, in milliseconds, to deliver a campaign after it was approved.

If it's not specified, 0 is used.

Tag Manager which manages the tags for this resource.
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#
Metadata that can be used to manage the campaign.
targetArnstringtarget_arnstrtargetArnStringTargetArnstringTargetArn*string#
The Amazon Resource Name (ARN) of a vehicle or fleet to which the campaign is deployed.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

arnForCampaign(resource: ICampaignRef): string@staticmethod def arn_for_campaign(resource: ICampaignRef) -> strpublic static String arnForCampaign(ICampaignRef resource)public static string ArnForCampaign(ICampaignRef resource)func ArnForCampaign(Resource ICampaignRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
fromCampaignArn(scope: Construct, id: string, arn: string): ICampaignRef@staticmethod def from_campaign_arn(scope: Construct, id: str, arn: str) -> ICampaignRefpublic static ICampaignRef fromCampaignArn(Construct scope, String id, String arn)public static ICampaignRef FromCampaignArn(Construct scope, string id, string arn)func FromCampaignArn(Scope Construct, Id *string, Arn *string) ICampaignRefstatic#
Creates a new ICampaignRef from an ARN.
fromCampaignName(scope: Construct, id: string, campaignName: string): ICampaignRef@staticmethod def from_campaign_name(scope: Construct, id: str, campaign_name: str) -> ICampaignRefpublic static ICampaignRef fromCampaignName(Construct scope, String id, String campaignName)public static ICampaignRef FromCampaignName(Construct scope, string id, string campaignName)func FromCampaignName(Scope Construct, Id *string, CampaignName *string) ICampaignRefstatic#
Creates a new ICampaignRef from a campaignName.
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnCampaign(x: any): boolean@staticmethod def is_cfn_campaign(x: Any) -> boolpublic static Boolean isCfnCampaign(Object x)public static bool IsCfnCampaign(object x)func IsCfnCampaign(X interface{}) *boolstatic#
Checks whether the given object is a CfnCampaign.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

returns

Returns: The construct as a stack element or undefined if it is not a stack element.

isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.