2018/06/14 - AWS IoT Analytics - 3 new4 updated api methods
Changes Update iotanalytics client to latest version
Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.
See also: AWS API Documentation
Request Syntax
client.tag_resource( resourceArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The ARN of the resource whose tags will be modified.
list
[REQUIRED]
The new or modified tags for the resource.
(dict) --
A set of key/value pairs which are used to manage the resource.
key (string) -- [REQUIRED]
The tag's key.
value (string) -- [REQUIRED]
The tag's value.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the tags (metadata) which you have assigned to the resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( resourceArn='string' )
string
[REQUIRED]
The ARN of the resource whose tags you want to list.
dict
Response Syntax
{ 'tags': [ { 'key': 'string', 'value': 'string' }, ] }
Response Structure
(dict) --
tags (list) --
The tags (metadata) which you have assigned to the resource.
(dict) --
A set of key/value pairs which are used to manage the resource.
key (string) --
The tag's key.
value (string) --
The tag's value.
Removes the given tags (metadata) from the resource.
See also: AWS API Documentation
Request Syntax
client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] )
string
[REQUIRED]
The ARN of the resource whose tags will be removed.
list
[REQUIRED]
The keys of those tags which will be removed.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
{'tags': [{'key': 'string', 'value': 'string'}]}
Creates a channel. A channel collects data from an MQTT topic and archives the raw, unprocessed messages before publishing the data to a pipeline.
See also: AWS API Documentation
Request Syntax
client.create_channel( channelName='string', retentionPeriod={ 'unlimited': True|False, 'numberOfDays': 123 }, tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The name of the channel.
dict
How long, in days, message data is kept for the channel.
unlimited (boolean) --
If true, message data is kept indefinitely.
numberOfDays (integer) --
The number of days that message data is kept. The "unlimited" parameter must be false.
list
Metadata which can be used to manage the channel.
(dict) --
A set of key/value pairs which are used to manage the resource.
key (string) -- [REQUIRED]
The tag's key.
value (string) -- [REQUIRED]
The tag's value.
dict
Response Syntax
{ 'channelName': 'string', 'channelArn': 'string', 'retentionPeriod': { 'unlimited': True|False, 'numberOfDays': 123 } }
Response Structure
(dict) --
channelName (string) --
The name of the channel.
channelArn (string) --
The ARN of the channel.
retentionPeriod (dict) --
How long, in days, message data is kept for the channel.
unlimited (boolean) --
If true, message data is kept indefinitely.
numberOfDays (integer) --
The number of days that message data is kept. The "unlimited" parameter must be false.
{'tags': [{'key': 'string', 'value': 'string'}]}
Creates a data set. A data set stores data retrieved from a data store by applying an SQL action.
See also: AWS API Documentation
Request Syntax
client.create_dataset( datasetName='string', actions=[ { 'actionName': 'string', 'queryAction': { 'sqlQuery': 'string' } }, ], triggers=[ { 'schedule': { 'expression': 'string' } }, ], tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The name of the data set.
list
[REQUIRED]
A list of actions that create the data set. Only one action is supported at this time.
(dict) --
A "DatasetAction" object specifying the query that creates the data set content.
actionName (string) --
The name of the data set action.
queryAction (dict) --
An "SqlQueryDatasetAction" object that contains the SQL query to modify the message.
sqlQuery (string) -- [REQUIRED]
An SQL query string.
list
A list of triggers. A trigger causes data set content to be populated at a specified time or time interval. The list of triggers can be empty or contain up to five DataSetTrigger objects.
(dict) --
The "DatasetTrigger" that specifies when the data set is automatically updated.
schedule (dict) --
The "Schedule" when the trigger is initiated.
expression (string) --
The expression that defines when to trigger an update. For more information, see Schedule Expressions for Rules in the Amazon CloudWatch documentation.
list
Metadata which can be used to manage the data set.
(dict) --
A set of key/value pairs which are used to manage the resource.
key (string) -- [REQUIRED]
The tag's key.
value (string) -- [REQUIRED]
The tag's value.
dict
Response Syntax
{ 'datasetName': 'string', 'datasetArn': 'string' }
Response Structure
(dict) --
datasetName (string) --
The name of the data set.
datasetArn (string) --
The ARN of the data set.
{'tags': [{'key': 'string', 'value': 'string'}]}
Creates a data store, which is a repository for messages.
See also: AWS API Documentation
Request Syntax
client.create_datastore( datastoreName='string', retentionPeriod={ 'unlimited': True|False, 'numberOfDays': 123 }, tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The name of the data store.
dict
How long, in days, message data is kept for the data store.
unlimited (boolean) --
If true, message data is kept indefinitely.
numberOfDays (integer) --
The number of days that message data is kept. The "unlimited" parameter must be false.
list
Metadata which can be used to manage the data store.
(dict) --
A set of key/value pairs which are used to manage the resource.
key (string) -- [REQUIRED]
The tag's key.
value (string) -- [REQUIRED]
The tag's value.
dict
Response Syntax
{ 'datastoreName': 'string', 'datastoreArn': 'string', 'retentionPeriod': { 'unlimited': True|False, 'numberOfDays': 123 } }
Response Structure
(dict) --
datastoreName (string) --
The name of the data store.
datastoreArn (string) --
The ARN of the data store.
retentionPeriod (dict) --
How long, in days, message data is kept for the data store.
unlimited (boolean) --
If true, message data is kept indefinitely.
numberOfDays (integer) --
The number of days that message data is kept. The "unlimited" parameter must be false.
{'tags': [{'key': 'string', 'value': 'string'}]}
Creates a pipeline. A pipeline consumes messages from one or more channels and allows you to process the messages before storing them in a data store.
See also: AWS API Documentation
Request Syntax
client.create_pipeline( pipelineName='string', pipelineActivities=[ { 'channel': { 'name': 'string', 'channelName': 'string', 'next': 'string' }, 'lambda': { 'name': 'string', 'lambdaName': 'string', 'batchSize': 123, 'next': 'string' }, 'datastore': { 'name': 'string', 'datastoreName': 'string' }, 'addAttributes': { 'name': 'string', 'attributes': { 'string': 'string' }, 'next': 'string' }, 'removeAttributes': { 'name': 'string', 'attributes': [ 'string', ], 'next': 'string' }, 'selectAttributes': { 'name': 'string', 'attributes': [ 'string', ], 'next': 'string' }, 'filter': { 'name': 'string', 'filter': 'string', 'next': 'string' }, 'math': { 'name': 'string', 'attribute': 'string', 'math': 'string', 'next': 'string' }, 'deviceRegistryEnrich': { 'name': 'string', 'attribute': 'string', 'thingName': 'string', 'roleArn': 'string', 'next': 'string' }, 'deviceShadowEnrich': { 'name': 'string', 'attribute': 'string', 'thingName': 'string', 'roleArn': 'string', 'next': 'string' } }, ], tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The name of the pipeline.
list
[REQUIRED]
A list of pipeline activities.
The list can be 1-25 PipelineActivity objects. Activities perform transformations on your messages, such as removing, renaming, or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.
(dict) --
An activity that performs a transformation on a message.
channel (dict) --
Determines the source of the messages to be processed.
name (string) -- [REQUIRED]
The name of the 'channel' activity.
channelName (string) -- [REQUIRED]
The name of the channel from which the messages are processed.
next (string) --
The next activity in the pipeline.
lambda (dict) --
Runs a Lambda function to modify the message.
name (string) -- [REQUIRED]
The name of the 'lambda' activity.
lambdaName (string) -- [REQUIRED]
The name of the Lambda function that is run on the message.
batchSize (integer) -- [REQUIRED]
The number of messages passed to the Lambda function for processing.
The AWS Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.
next (string) --
The next activity in the pipeline.
datastore (dict) --
Specifies where to store the processed message data.
name (string) -- [REQUIRED]
The name of the 'datastore' activity.
datastoreName (string) -- [REQUIRED]
The name of the data store where processed messages are stored.
addAttributes (dict) --
Adds other attributes based on existing attributes in the message.
name (string) -- [REQUIRED]
The name of the 'addAttributes' activity.
attributes (dict) -- [REQUIRED]
A list of 1-50 "AttributeNameMapping" objects that map an existing attribute to a new attribute.
(string) --
(string) --
next (string) --
The next activity in the pipeline.
removeAttributes (dict) --
Removes attributes from a message.
name (string) -- [REQUIRED]
The name of the 'removeAttributes' activity.
attributes (list) -- [REQUIRED]
A list of 1-50 attributes to remove from the message.
(string) --
next (string) --
The next activity in the pipeline.
selectAttributes (dict) --
Creates a new message using only the specified attributes from the original message.
name (string) -- [REQUIRED]
The name of the 'selectAttributes' activity.
attributes (list) -- [REQUIRED]
A list of the attributes to select from the message.
(string) --
next (string) --
The next activity in the pipeline.
filter (dict) --
Filters a message based on its attributes.
name (string) -- [REQUIRED]
The name of the 'filter' activity.
filter (string) -- [REQUIRED]
An expression that looks like an SQL WHERE clause that must return a Boolean value.
next (string) --
The next activity in the pipeline.
math (dict) --
Computes an arithmetic expression using the message's attributes and adds it to the message.
name (string) -- [REQUIRED]
The name of the 'math' activity.
attribute (string) -- [REQUIRED]
The name of the attribute that will contain the result of the math operation.
math (string) -- [REQUIRED]
An expression that uses one or more existing attributes and must return an integer value.
next (string) --
The next activity in the pipeline.
deviceRegistryEnrich (dict) --
Adds data from the AWS IoT device registry to your message.
name (string) -- [REQUIRED]
The name of the 'deviceRegistryEnrich' activity.
attribute (string) -- [REQUIRED]
The name of the attribute that is added to the message.
thingName (string) -- [REQUIRED]
The name of the IoT device whose registry information is added to the message.
roleArn (string) -- [REQUIRED]
The ARN of the role that allows access to the device's registry information.
next (string) --
The next activity in the pipeline.
deviceShadowEnrich (dict) --
Adds information from the AWS IoT Device Shadows service to a message.
name (string) -- [REQUIRED]
The name of the 'deviceShadowEnrich' activity.
attribute (string) -- [REQUIRED]
The name of the attribute that is added to the message.
thingName (string) -- [REQUIRED]
The name of the IoT device whose shadow information is added to the message.
roleArn (string) -- [REQUIRED]
The ARN of the role that allows access to the device's shadow.
next (string) --
The next activity in the pipeline.
list
Metadata which can be used to manage the pipeline.
(dict) --
A set of key/value pairs which are used to manage the resource.
key (string) -- [REQUIRED]
The tag's key.
value (string) -- [REQUIRED]
The tag's value.
dict
Response Syntax
{ 'pipelineName': 'string', 'pipelineArn': 'string' }
Response Structure
(dict) --
pipelineName (string) --
The name of the pipeline.
pipelineArn (string) --
The ARN of the pipeline.