- 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.
ListCampaignsCommand
Lists information about created campaigns.
This API operation uses pagination. Specify the nextToken
parameter in the request to return more results.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTFleetWiseClient, ListCampaignsCommand } from "@aws-sdk/client-iotfleetwise"; // ES Modules import
// const { IoTFleetWiseClient, ListCampaignsCommand } = require("@aws-sdk/client-iotfleetwise"); // CommonJS import
const client = new IoTFleetWiseClient(config);
const input = { // ListCampaignsRequest
nextToken: "STRING_VALUE",
maxResults: Number("int"),
status: "STRING_VALUE",
listResponseScope: "METADATA_ONLY",
};
const command = new ListCampaignsCommand(input);
const response = await client.send(command);
// { // ListCampaignsResponse
// campaignSummaries: [ // campaignSummaries
// { // CampaignSummary
// arn: "STRING_VALUE",
// name: "STRING_VALUE",
// description: "STRING_VALUE",
// signalCatalogArn: "STRING_VALUE",
// targetArn: "STRING_VALUE",
// status: "CREATING" || "WAITING_FOR_APPROVAL" || "RUNNING" || "SUSPENDED",
// creationTime: new Date("TIMESTAMP"), // required
// lastModificationTime: new Date("TIMESTAMP"), // required
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListCampaignsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
listResponseScope | ListResponseScope | undefined | When you set the |
maxResults | number | undefined | The maximum number of items to return, between 1 and 100, inclusive. |
nextToken | string | undefined | A pagination token for the next set of results. If the results of a search are large, only a portion of the results are returned, and a |
status | string | undefined | An optional parameter to filter the results by the status of each created campaign in your account. The status can be one of: |
ListCampaignsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
campaignSummaries | CampaignSummary[] | undefined | A summary of information about each campaign. |
nextToken | string | undefined | The token to retrieve the next set of results, or |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have sufficient permission to perform this action. |
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. |