- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetCampaignCommand
Retrieves information about a campaign.
Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTFleetWiseClient, GetCampaignCommand } from "@aws-sdk/client-iotfleetwise"; // ES Modules import
// const { IoTFleetWiseClient, GetCampaignCommand } = require("@aws-sdk/client-iotfleetwise"); // CommonJS import
const client = new IoTFleetWiseClient(config);
const input = { // GetCampaignRequest
name: "STRING_VALUE", // required
};
const command = new GetCampaignCommand(input);
const response = await client.send(command);
// { // GetCampaignResponse
// name: "STRING_VALUE",
// arn: "STRING_VALUE",
// description: "STRING_VALUE",
// signalCatalogArn: "STRING_VALUE",
// targetArn: "STRING_VALUE",
// status: "CREATING" || "WAITING_FOR_APPROVAL" || "RUNNING" || "SUSPENDED",
// startTime: new Date("TIMESTAMP"),
// expiryTime: new Date("TIMESTAMP"),
// postTriggerCollectionDuration: Number("long"),
// diagnosticsMode: "OFF" || "SEND_ACTIVE_DTCS",
// spoolingMode: "OFF" || "TO_DISK",
// compression: "OFF" || "SNAPPY",
// priority: Number("int"),
// signalsToCollect: [ // SignalInformationList
// { // SignalInformation
// name: "STRING_VALUE", // required
// maxSampleCount: Number("long"),
// minimumSamplingIntervalMs: Number("long"),
// dataPartitionId: "STRING_VALUE",
// },
// ],
// collectionScheme: { // CollectionScheme Union: only one key present
// timeBasedCollectionScheme: { // TimeBasedCollectionScheme
// periodMs: Number("long"), // required
// },
// conditionBasedCollectionScheme: { // ConditionBasedCollectionScheme
// expression: "STRING_VALUE", // required
// minimumTriggerIntervalMs: Number("long"),
// triggerMode: "ALWAYS" || "RISING_EDGE",
// conditionLanguageVersion: Number("int"),
// },
// },
// dataExtraDimensions: [ // DataExtraDimensionNodePathList
// "STRING_VALUE",
// ],
// creationTime: new Date("TIMESTAMP"),
// lastModificationTime: new Date("TIMESTAMP"),
// dataDestinationConfigs: [ // DataDestinationConfigs
// { // DataDestinationConfig Union: only one key present
// s3Config: { // S3Config
// bucketArn: "STRING_VALUE", // required
// dataFormat: "JSON" || "PARQUET",
// storageCompressionFormat: "NONE" || "GZIP",
// prefix: "STRING_VALUE",
// },
// timestreamConfig: { // TimestreamConfig
// timestreamTableArn: "STRING_VALUE", // required
// executionRoleArn: "STRING_VALUE", // required
// },
// mqttTopicConfig: { // MqttTopicConfig
// mqttTopicArn: "STRING_VALUE", // required
// executionRoleArn: "STRING_VALUE", // required
// },
// },
// ],
// dataPartitions: [ // DataPartitions
// { // DataPartition
// id: "STRING_VALUE", // required
// storageOptions: { // DataPartitionStorageOptions
// maximumSize: { // StorageMaximumSize
// unit: "MB" || "GB" || "TB", // required
// value: Number("int"), // required
// },
// storageLocation: "STRING_VALUE", // required
// minimumTimeToLive: { // StorageMinimumTimeToLive
// unit: "HOURS" || "DAYS" || "WEEKS", // required
// value: Number("int"), // required
// },
// },
// uploadOptions: { // DataPartitionUploadOptions
// expression: "STRING_VALUE", // required
// conditionLanguageVersion: Number("int"),
// },
// },
// ],
// signalsToFetch: [ // SignalFetchInformationList
// { // SignalFetchInformation
// fullyQualifiedName: "STRING_VALUE", // required
// signalFetchConfig: { // SignalFetchConfig Union: only one key present
// timeBased: { // TimeBasedSignalFetchConfig
// executionFrequencyMs: Number("long"), // required
// },
// conditionBased: { // ConditionBasedSignalFetchConfig
// conditionExpression: "STRING_VALUE", // required
// triggerMode: "ALWAYS" || "RISING_EDGE", // required
// },
// },
// conditionLanguageVersion: Number("int"),
// actions: [ // EventExpressionList // required
// "STRING_VALUE",
// ],
// },
// ],
// };
GetCampaignCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
name Required | string | undefined | The name of the campaign to retrieve information about. |
GetCampaignCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
arn | string | undefined | The Amazon Resource Name (ARN) of the campaign. |
collectionScheme | CollectionScheme | undefined | Information about the data collection scheme associated with the campaign. |
compression | Compression | undefined | Whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If |
creationTime | Date | undefined | The time the campaign was created in seconds since epoch (January 1, 1970 at midnight UTC time). |
dataDestinationConfigs | DataDestinationConfig[] | undefined | The destination where the campaign sends data. You can send data to an MQTT topic, or store it in Amazon S3 or Amazon Timestream. MQTT is the publish/subscribe messaging protocol used by Amazon Web Services IoT to communicate with your devices. 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. 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. |
dataExtraDimensions | string[] | undefined | A list of vehicle attributes associated with the campaign. |
dataPartitions | DataPartition[] | undefined | The data partitions associated with the signals collected from the vehicle. |
description | string | undefined | The description of the campaign. |
diagnosticsMode | DiagnosticsMode | undefined | Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise. |
expiryTime | Date | undefined | The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data won't be collected after the campaign expires. |
lastModificationTime | Date | undefined | The last time the campaign was modified. |
name | string | undefined | The name of the campaign. |
postTriggerCollectionDuration | number | undefined | How long (in seconds) to collect raw data after a triggering event initiates the collection. |
priority | number | undefined | 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. |
signalCatalogArn | string | undefined | The ARN of a signal catalog. |
signalsToCollect | SignalInformation[] | undefined | Information about a list of signals to collect data on. |
signalsToFetch | SignalFetchInformation[] | undefined | Information about a list of signals to fetch data from. |
spoolingMode | SpoolingMode | undefined | Whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise. |
startTime | Date | undefined | The time, in milliseconds, to deliver a campaign after it was approved. |
status | CampaignStatus | undefined | The state of the campaign. The status can be one of: |
targetArn | string | undefined | The ARN of the vehicle or the fleet targeted by the campaign. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have sufficient permission to perform this action. |
ResourceNotFoundException | client | The resource wasn't found. |
ThrottlingException | client | The request couldn't be completed due to throttling. |
ValidationException | client | The input fails to satisfy the constraints specified by an Amazon Web Services service. |
InternalServerException | server | The request couldn't be completed because the server temporarily failed. |
IoTFleetWiseServiceException | Base exception class for all service exceptions from IoTFleetWise service. |