campaigns
Creates, updates, deletes or gets a campaign resource or lists campaigns in a region
Overview
| Name | campaigns |
| Type | Resource |
| Description | Definition of AWS::IoTFleetWise::Campaign Resource Type |
| Id | awscc.iotfleetwise.campaigns |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
status | string | |
action | string | |
creation_time | string | |
compression | string | |
description | string | |
priority | integer | |
signals_to_collect | array | |
signals_to_fetch | array | |
data_destination_configs | array | |
start_time | string | |
name | string | |
expiry_time | string | |
last_modification_time | string | |
spooling_mode | string | |
signal_catalog_arn | string | |
post_trigger_collection_duration | number | |
data_extra_dimensions | array | |
diagnostics_mode | string | |
target_arn | string | |
arn | string | |
collection_scheme | object | |
data_partitions | array | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | |
region | string | AWS region. |
For more information, see AWS::IoTFleetWise::Campaign.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | campaigns | INSERT | Name, CollectionScheme, SignalCatalogArn, TargetArn, region |
delete_resource | campaigns | DELETE | Identifier, region |
update_resource | campaigns | UPDATE | Identifier, PatchDocument, region |
list_resources | campaigns_list_only | SELECT | region |
get_resource | campaigns | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual campaign.
SELECT
region,
status,
action,
creation_time,
compression,
description,
priority,
signals_to_collect,
signals_to_fetch,
data_destination_configs,
start_time,
name,
expiry_time,
last_modification_time,
spooling_mode,
signal_catalog_arn,
post_trigger_collection_duration,
data_extra_dimensions,
diagnostics_mode,
target_arn,
arn,
collection_scheme,
data_partitions,
tags
FROM awscc.iotfleetwise.campaigns
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';
Lists all campaigns in a region.
SELECT
region,
name
FROM awscc.iotfleetwise.campaigns_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new campaign resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotfleetwise.campaigns (
Name,
SignalCatalogArn,
TargetArn,
CollectionScheme,
region
)
SELECT
'{{ name }}',
'{{ signal_catalog_arn }}',
'{{ target_arn }}',
'{{ collection_scheme }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotfleetwise.campaigns (
Action,
Compression,
Description,
Priority,
SignalsToCollect,
SignalsToFetch,
DataDestinationConfigs,
StartTime,
Name,
ExpiryTime,
SpoolingMode,
SignalCatalogArn,
PostTriggerCollectionDuration,
DataExtraDimensions,
DiagnosticsMode,
TargetArn,
CollectionScheme,
DataPartitions,
Tags,
region
)
SELECT
'{{ action }}',
'{{ compression }}',
'{{ description }}',
'{{ priority }}',
'{{ signals_to_collect }}',
'{{ signals_to_fetch }}',
'{{ data_destination_configs }}',
'{{ start_time }}',
'{{ name }}',
'{{ expiry_time }}',
'{{ spooling_mode }}',
'{{ signal_catalog_arn }}',
'{{ post_trigger_collection_duration }}',
'{{ data_extra_dimensions }}',
'{{ diagnostics_mode }}',
'{{ target_arn }}',
'{{ collection_scheme }}',
'{{ data_partitions }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: campaign
props:
- name: action
value: '{{ action }}'
- name: compression
value: '{{ compression }}'
- name: description
value: '{{ description }}'
- name: priority
value: '{{ priority }}'
- name: signals_to_collect
value:
- max_sample_count: null
name: '{{ name }}'
minimum_sampling_interval_ms: null
data_partition_id: '{{ data_partition_id }}'
- name: signals_to_fetch
value:
- fully_qualified_name: '{{ fully_qualified_name }}'
signal_fetch_config: null
condition_language_version: null
actions:
- '{{ actions[0] }}'
- name: data_destination_configs
value:
- null
- name: start_time
value: '{{ start_time }}'
- name: name
value: '{{ name }}'
- name: expiry_time
value: '{{ expiry_time }}'
- name: spooling_mode
value: '{{ spooling_mode }}'
- name: signal_catalog_arn
value: '{{ signal_catalog_arn }}'
- name: post_trigger_collection_duration
value: null
- name: data_extra_dimensions
value:
- '{{ data_extra_dimensions[0] }}'
- name: diagnostics_mode
value: '{{ diagnostics_mode }}'
- name: target_arn
value: '{{ target_arn }}'
- name: collection_scheme
value: null
- name: data_partitions
value:
- id: null
storage_options:
maximum_size:
unit: '{{ unit }}'
value: '{{ value }}'
minimum_time_to_live:
unit: '{{ unit }}'
value: '{{ value }}'
storage_location: '{{ storage_location }}'
upload_options:
expression: '{{ expression }}'
condition_language_version: '{{ condition_language_version }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a campaign resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotfleetwise.campaigns
SET PatchDocument = string('{{ {
"Action": action,
"Description": description,
"DataExtraDimensions": data_extra_dimensions,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotfleetwise.campaigns
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';
Permissions
To operate on the campaigns resource, the following permissions are required:
- Read
- Create
- Update
- List
- Delete
iotfleetwise:GetCampaign,
iotfleetwise:ListTagsForResource
iotfleetwise:CreateCampaign,
iotfleetwise:GetCampaign,
iotfleetwise:ListTagsForResource,
iotfleetwise:TagResource,
iam:PassRole,
timestream:DescribeEndpoints,
timestream:DescribeTable
iotfleetwise:GetCampaign,
iotfleetwise:ListTagsForResource,
iotfleetwise:UpdateCampaign,
iotfleetwise:TagResource,
iotfleetwise:UntagResource
iotfleetwise:ListCampaigns,
iotfleetwise:GetCampaign
iotfleetwise:DeleteCampaign,
iotfleetwise:GetCampaign