You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::IoTAnalytics::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



173
174
175
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 173

def initialize(*args)
  super
end

Instance Method Details

#batch_put_message(params = {}) ⇒ Types::BatchPutMessageResponse

Sends messages to a channel.

Examples:

Request syntax with placeholder values


resp = client.batch_put_message({
  channel_name: "ChannelName", # required
  messages: [ # required
    {
      message_id: "MessageId", # required
      payload: "data", # required
    },
  ],
})

Response structure


resp.batch_put_message_error_entries #=> Array
resp.batch_put_message_error_entries[0].message_id #=> String
resp.batch_put_message_error_entries[0].error_code #=> String
resp.batch_put_message_error_entries[0].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :channel_name (required, String)

    The name of the channel where the messages are sent.

  • :messages (required, Array<Types::Message>)

    The list of messages to be sent. Each message has format: '\{ "messageId": "string", "payload": "string"\}'.

Returns:



213
214
215
216
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 213

def batch_put_message(params = {}, options = {})
  req = build_request(:batch_put_message, params)
  req.send_request(options)
end

#cancel_pipeline_reprocessing(params = {}) ⇒ Struct

Cancels the reprocessing of data through the pipeline.

Examples:

Request syntax with placeholder values


resp = client.cancel_pipeline_reprocessing({
  pipeline_name: "PipelineName", # required
  reprocessing_id: "ReprocessingId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of pipeline for which data reprocessing is canceled.

  • :reprocessing_id (required, String)

    The ID of the reprocessing task (returned by "StartPipelineReprocessing").

Returns:

  • (Struct)

    Returns an empty response.



238
239
240
241
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 238

def cancel_pipeline_reprocessing(params = {}, options = {})
  req = build_request(:cancel_pipeline_reprocessing, params)
  req.send_request(options)
end

#create_channel(params = {}) ⇒ Types::CreateChannelResponse

Creates a channel. A channel collects data from an MQTT topic and archives the raw, unprocessed messages before publishing the data to a pipeline.

Examples:

Request syntax with placeholder values


resp = client.create_channel({
  channel_name: "ChannelName", # required
  retention_period: {
    unlimited: false,
    number_of_days: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.channel_name #=> String
resp.channel_arn #=> String
resp.retention_period.unlimited #=> Boolean
resp.retention_period.number_of_days #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :channel_name (required, String)

    The name of the channel.

  • :retention_period (Types::RetentionPeriod)

    How long, in days, message data is kept for the channel.

  • :tags (Array<Types::Tag>)

    Metadata which can be used to manage the channel.

Returns:



287
288
289
290
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 287

def create_channel(params = {}, options = {})
  req = build_request(:create_channel, params)
  req.send_request(options)
end

#create_dataset(params = {}) ⇒ Types::CreateDatasetResponse

Creates a data set. A data set stores data retrieved from a data store by applying a "queryAction" (a SQL query) or a "containerAction" (executing a containerized application). This operation creates the skeleton of a data set. The data set can be populated manually by calling "CreateDatasetContent" or automatically according to a "trigger" you specify.

Examples:

Request syntax with placeholder values


resp = client.create_dataset({
  dataset_name: "DatasetName", # required
  actions: [ # required
    {
      action_name: "DatasetActionName",
      query_action: {
        sql_query: "SqlQuery", # required
        filters: [
          {
            delta_time: {
              offset_seconds: 1, # required
              time_expression: "TimeExpression", # required
            },
          },
        ],
      },
      container_action: {
        image: "Image", # required
        execution_role_arn: "RoleArn", # required
        resource_configuration: { # required
          compute_type: "ACU_1", # required, accepts ACU_1, ACU_2
          volume_size_in_gb: 1, # required
        },
        variables: [
          {
            name: "VariableName", # required
            string_value: "StringValue",
            double_value: 1.0,
            dataset_content_version_value: {
              dataset_name: "DatasetName", # required
            },
            output_file_uri_value: {
              file_name: "OutputFileName", # required
            },
          },
        ],
      },
    },
  ],
  triggers: [
    {
      schedule: {
        expression: "ScheduleExpression",
      },
      dataset: {
        name: "DatasetName", # required
      },
    },
  ],
  retention_period: {
    unlimited: false,
    number_of_days: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.dataset_name #=> String
resp.dataset_arn #=> String
resp.retention_period.unlimited #=> Boolean
resp.retention_period.number_of_days #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set.

  • :actions (required, Array<Types::DatasetAction>)

    A list of actions that create the data set contents.

  • :triggers (Array<Types::DatasetTrigger>)

    A list of triggers. A trigger causes data set contents to be populated at a specified time interval or when another data set's contents are created. The list of triggers can be empty or contain up to five DataSetTrigger objects.

  • :retention_period (Types::RetentionPeriod)

    [Optional] How long, in days, message data is kept for the data set. If not given or set to null, the latest version of the dataset content plus the latest succeeded version (if they are different) are retained for at most 90 days.

  • :tags (Array<Types::Tag>)

    Metadata which can be used to manage the data set.

Returns:



398
399
400
401
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 398

def create_dataset(params = {}, options = {})
  req = build_request(:create_dataset, params)
  req.send_request(options)
end

#create_dataset_content(params = {}) ⇒ Types::CreateDatasetContentResponse

Creates the content of a data set by applying a SQL action.

Examples:

Request syntax with placeholder values


resp = client.create_dataset_content({
  dataset_name: "DatasetName", # required
})

Response structure


resp.version_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set.

Returns:



424
425
426
427
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 424

def create_dataset_content(params = {}, options = {})
  req = build_request(:create_dataset_content, params)
  req.send_request(options)
end

#create_datastore(params = {}) ⇒ Types::CreateDatastoreResponse

Creates a data store, which is a repository for messages.

Examples:

Request syntax with placeholder values


resp = client.create_datastore({
  datastore_name: "DatastoreName", # required
  retention_period: {
    unlimited: false,
    number_of_days: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.datastore_name #=> String
resp.datastore_arn #=> String
resp.retention_period.unlimited #=> Boolean
resp.retention_period.number_of_days #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :datastore_name (required, String)

    The name of the data store.

  • :retention_period (Types::RetentionPeriod)

    How long, in days, message data is kept for the data store.

  • :tags (Array<Types::Tag>)

    Metadata which can be used to manage the data store.

Returns:



471
472
473
474
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 471

def create_datastore(params = {}, options = {})
  req = build_request(:create_datastore, params)
  req.send_request(options)
end

#create_pipeline(params = {}) ⇒ Types::CreatePipelineResponse

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.

Examples:

Request syntax with placeholder values


resp = client.create_pipeline({
  pipeline_name: "PipelineName", # required
  pipeline_activities: [ # required
    {
      channel: {
        name: "ActivityName", # required
        channel_name: "ChannelName", # required
        next: "ActivityName",
      },
      lambda: {
        name: "ActivityName", # required
        lambda_name: "LambdaName", # required
        batch_size: 1, # required
        next: "ActivityName",
      },
      datastore: {
        name: "ActivityName", # required
        datastore_name: "DatastoreName", # required
      },
      add_attributes: {
        name: "ActivityName", # required
        attributes: { # required
          "AttributeName" => "AttributeName",
        },
        next: "ActivityName",
      },
      remove_attributes: {
        name: "ActivityName", # required
        attributes: ["AttributeName"], # required
        next: "ActivityName",
      },
      select_attributes: {
        name: "ActivityName", # required
        attributes: ["AttributeName"], # required
        next: "ActivityName",
      },
      filter: {
        name: "ActivityName", # required
        filter: "FilterExpression", # required
        next: "ActivityName",
      },
      math: {
        name: "ActivityName", # required
        attribute: "AttributeName", # required
        math: "MathExpression", # required
        next: "ActivityName",
      },
      device_registry_enrich: {
        name: "ActivityName", # required
        attribute: "AttributeName", # required
        thing_name: "AttributeName", # required
        role_arn: "RoleArn", # required
        next: "ActivityName",
      },
      device_shadow_enrich: {
        name: "ActivityName", # required
        attribute: "AttributeName", # required
        thing_name: "AttributeName", # required
        role_arn: "RoleArn", # required
        next: "ActivityName",
      },
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.pipeline_name #=> String
resp.pipeline_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of the pipeline.

  • :pipeline_activities (required, Array<Types::PipelineActivity>)

    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.

  • :tags (Array<Types::Tag>)

    Metadata which can be used to manage the pipeline.

Returns:



581
582
583
584
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 581

def create_pipeline(params = {}, options = {})
  req = build_request(:create_pipeline, params)
  req.send_request(options)
end

#delete_channel(params = {}) ⇒ Struct

Deletes the specified channel.

Examples:

Request syntax with placeholder values


resp = client.delete_channel({
  channel_name: "ChannelName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :channel_name (required, String)

    The name of the channel to delete.

Returns:

  • (Struct)

    Returns an empty response.



601
602
603
604
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 601

def delete_channel(params = {}, options = {})
  req = build_request(:delete_channel, params)
  req.send_request(options)
end

#delete_dataset(params = {}) ⇒ Struct

Deletes the specified data set.

You do not have to delete the content of the data set before you perform this operation.

Examples:

Request syntax with placeholder values


resp = client.delete_dataset({
  dataset_name: "DatasetName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set to delete.

Returns:

  • (Struct)

    Returns an empty response.



624
625
626
627
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 624

def delete_dataset(params = {}, options = {})
  req = build_request(:delete_dataset, params)
  req.send_request(options)
end

#delete_dataset_content(params = {}) ⇒ Struct

Deletes the content of the specified data set.

Examples:

Request syntax with placeholder values


resp = client.delete_dataset_content({
  dataset_name: "DatasetName", # required
  version_id: "DatasetContentVersion",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set whose content is deleted.

  • :version_id (String)

    The version of the data set whose content is deleted. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to delete the latest or latest successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is the default.

Returns:

  • (Struct)

    Returns an empty response.



651
652
653
654
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 651

def delete_dataset_content(params = {}, options = {})
  req = build_request(:delete_dataset_content, params)
  req.send_request(options)
end

#delete_datastore(params = {}) ⇒ Struct

Deletes the specified data store.

Examples:

Request syntax with placeholder values


resp = client.delete_datastore({
  datastore_name: "DatastoreName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :datastore_name (required, String)

    The name of the data store to delete.

Returns:

  • (Struct)

    Returns an empty response.



671
672
673
674
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 671

def delete_datastore(params = {}, options = {})
  req = build_request(:delete_datastore, params)
  req.send_request(options)
end

#delete_pipeline(params = {}) ⇒ Struct

Deletes the specified pipeline.

Examples:

Request syntax with placeholder values


resp = client.delete_pipeline({
  pipeline_name: "PipelineName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of the pipeline to delete.

Returns:

  • (Struct)

    Returns an empty response.



691
692
693
694
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 691

def delete_pipeline(params = {}, options = {})
  req = build_request(:delete_pipeline, params)
  req.send_request(options)
end

#describe_channel(params = {}) ⇒ Types::DescribeChannelResponse

Retrieves information about a channel.

Examples:

Request syntax with placeholder values


resp = client.describe_channel({
  channel_name: "ChannelName", # required
  include_statistics: false,
})

Response structure


resp.channel.name #=> String
resp.channel.arn #=> String
resp.channel.status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.channel.retention_period.unlimited #=> Boolean
resp.channel.retention_period.number_of_days #=> Integer
resp.channel.creation_time #=> Time
resp.channel.last_update_time #=> Time
resp.statistics.size.estimated_size_in_bytes #=> Float
resp.statistics.size.estimated_on #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :channel_name (required, String)

    The name of the channel whose information is retrieved.

  • :include_statistics (Boolean)

    If true, additional statistical information about the channel is included in the response.

Returns:



731
732
733
734
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 731

def describe_channel(params = {}, options = {})
  req = build_request(:describe_channel, params)
  req.send_request(options)
end

#describe_dataset(params = {}) ⇒ Types::DescribeDatasetResponse

Retrieves information about a data set.

Examples:

Request syntax with placeholder values


resp = client.describe_dataset({
  dataset_name: "DatasetName", # required
})

Response structure


resp.dataset.name #=> String
resp.dataset.arn #=> String
resp.dataset.actions #=> Array
resp.dataset.actions[0].action_name #=> String
resp.dataset.actions[0].query_action.sql_query #=> String
resp.dataset.actions[0].query_action.filters #=> Array
resp.dataset.actions[0].query_action.filters[0].delta_time.offset_seconds #=> Integer
resp.dataset.actions[0].query_action.filters[0].delta_time.time_expression #=> String
resp.dataset.actions[0].container_action.image #=> String
resp.dataset.actions[0].container_action.execution_role_arn #=> String
resp.dataset.actions[0].container_action.resource_configuration.compute_type #=> String, one of "ACU_1", "ACU_2"
resp.dataset.actions[0].container_action.resource_configuration.volume_size_in_gb #=> Integer
resp.dataset.actions[0].container_action.variables #=> Array
resp.dataset.actions[0].container_action.variables[0].name #=> String
resp.dataset.actions[0].container_action.variables[0].string_value #=> String
resp.dataset.actions[0].container_action.variables[0].double_value #=> Float
resp.dataset.actions[0].container_action.variables[0].dataset_content_version_value.dataset_name #=> String
resp.dataset.actions[0].container_action.variables[0].output_file_uri_value.file_name #=> String
resp.dataset.triggers #=> Array
resp.dataset.triggers[0].schedule.expression #=> String
resp.dataset.triggers[0].dataset.name #=> String
resp.dataset.status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.dataset.creation_time #=> Time
resp.dataset.last_update_time #=> Time
resp.dataset.retention_period.unlimited #=> Boolean
resp.dataset.retention_period.number_of_days #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set whose information is retrieved.

Returns:



782
783
784
785
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 782

def describe_dataset(params = {}, options = {})
  req = build_request(:describe_dataset, params)
  req.send_request(options)
end

#describe_datastore(params = {}) ⇒ Types::DescribeDatastoreResponse

Retrieves information about a data store.

Examples:

Request syntax with placeholder values


resp = client.describe_datastore({
  datastore_name: "DatastoreName", # required
  include_statistics: false,
})

Response structure


resp.datastore.name #=> String
resp.datastore.arn #=> String
resp.datastore.status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.datastore.retention_period.unlimited #=> Boolean
resp.datastore.retention_period.number_of_days #=> Integer
resp.datastore.creation_time #=> Time
resp.datastore.last_update_time #=> Time
resp.statistics.size.estimated_size_in_bytes #=> Float
resp.statistics.size.estimated_on #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :datastore_name (required, String)

    The name of the data store

  • :include_statistics (Boolean)

    If true, additional statistical information about the datastore is included in the response.

Returns:



822
823
824
825
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 822

def describe_datastore(params = {}, options = {})
  req = build_request(:describe_datastore, params)
  req.send_request(options)
end

#describe_logging_options(params = {}) ⇒ Types::DescribeLoggingOptionsResponse

Retrieves the current settings of the AWS IoT Analytics logging options.

Examples:

Response structure


resp.logging_options.role_arn #=> String
resp.logging_options.level #=> String, one of "ERROR"
resp.logging_options.enabled #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:



842
843
844
845
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 842

def describe_logging_options(params = {}, options = {})
  req = build_request(:describe_logging_options, params)
  req.send_request(options)
end

#describe_pipeline(params = {}) ⇒ Types::DescribePipelineResponse

Retrieves information about a pipeline.

Examples:

Request syntax with placeholder values


resp = client.describe_pipeline({
  pipeline_name: "PipelineName", # required
})

Response structure


resp.pipeline.name #=> String
resp.pipeline.arn #=> String
resp.pipeline.activities #=> Array
resp.pipeline.activities[0].channel.name #=> String
resp.pipeline.activities[0].channel.channel_name #=> String
resp.pipeline.activities[0].channel.next #=> String
resp.pipeline.activities[0].lambda.name #=> String
resp.pipeline.activities[0].lambda.lambda_name #=> String
resp.pipeline.activities[0].lambda.batch_size #=> Integer
resp.pipeline.activities[0].lambda.next #=> String
resp.pipeline.activities[0].datastore.name #=> String
resp.pipeline.activities[0].datastore.datastore_name #=> String
resp.pipeline.activities[0].add_attributes.name #=> String
resp.pipeline.activities[0].add_attributes.attributes #=> Hash
resp.pipeline.activities[0].add_attributes.attributes["AttributeName"] #=> String
resp.pipeline.activities[0].add_attributes.next #=> String
resp.pipeline.activities[0].remove_attributes.name #=> String
resp.pipeline.activities[0].remove_attributes.attributes #=> Array
resp.pipeline.activities[0].remove_attributes.attributes[0] #=> String
resp.pipeline.activities[0].remove_attributes.next #=> String
resp.pipeline.activities[0].select_attributes.name #=> String
resp.pipeline.activities[0].select_attributes.attributes #=> Array
resp.pipeline.activities[0].select_attributes.attributes[0] #=> String
resp.pipeline.activities[0].select_attributes.next #=> String
resp.pipeline.activities[0].filter.name #=> String
resp.pipeline.activities[0].filter.filter #=> String
resp.pipeline.activities[0].filter.next #=> String
resp.pipeline.activities[0].math.name #=> String
resp.pipeline.activities[0].math.attribute #=> String
resp.pipeline.activities[0].math.math #=> String
resp.pipeline.activities[0].math.next #=> String
resp.pipeline.activities[0].device_registry_enrich.name #=> String
resp.pipeline.activities[0].device_registry_enrich.attribute #=> String
resp.pipeline.activities[0].device_registry_enrich.thing_name #=> String
resp.pipeline.activities[0].device_registry_enrich.role_arn #=> String
resp.pipeline.activities[0].device_registry_enrich.next #=> String
resp.pipeline.activities[0].device_shadow_enrich.name #=> String
resp.pipeline.activities[0].device_shadow_enrich.attribute #=> String
resp.pipeline.activities[0].device_shadow_enrich.thing_name #=> String
resp.pipeline.activities[0].device_shadow_enrich.role_arn #=> String
resp.pipeline.activities[0].device_shadow_enrich.next #=> String
resp.pipeline.reprocessing_summaries #=> Array
resp.pipeline.reprocessing_summaries[0].id #=> String
resp.pipeline.reprocessing_summaries[0].status #=> String, one of "RUNNING", "SUCCEEDED", "CANCELLED", "FAILED"
resp.pipeline.reprocessing_summaries[0].creation_time #=> Time
resp.pipeline.creation_time #=> Time
resp.pipeline.last_update_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of the pipeline whose information is retrieved.

Returns:



914
915
916
917
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 914

def describe_pipeline(params = {}, options = {})
  req = build_request(:describe_pipeline, params)
  req.send_request(options)
end

#get_dataset_content(params = {}) ⇒ Types::GetDatasetContentResponse

Retrieves the contents of a data set as pre-signed URIs.

Examples:

Request syntax with placeholder values


resp = client.get_dataset_content({
  dataset_name: "DatasetName", # required
  version_id: "DatasetContentVersion",
})

Response structure


resp.entries #=> Array
resp.entries[0].entry_name #=> String
resp.entries[0].data_uri #=> String
resp.timestamp #=> Time
resp.status.state #=> String, one of "CREATING", "SUCCEEDED", "FAILED"
resp.status.reason #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set whose contents are retrieved.

  • :version_id (String)

    The version of the data set whose contents are retrieved. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to retrieve the contents of the latest or latest successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is the default.

Returns:



954
955
956
957
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 954

def get_dataset_content(params = {}, options = {})
  req = build_request(:get_dataset_content, params)
  req.send_request(options)
end

#list_channels(params = {}) ⇒ Types::ListChannelsResponse

Retrieves a list of channels.

Examples:

Request syntax with placeholder values


resp = client.list_channels({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.channel_summaries #=> Array
resp.channel_summaries[0].channel_name #=> String
resp.channel_summaries[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.channel_summaries[0].creation_time #=> Time
resp.channel_summaries[0].last_update_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in this request.

    The default value is 100.

Returns:



992
993
994
995
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 992

def list_channels(params = {}, options = {})
  req = build_request(:list_channels, params)
  req.send_request(options)
end

#list_dataset_contents(params = {}) ⇒ Types::ListDatasetContentsResponse

Lists information about data set contents that have been created.

Examples:

Request syntax with placeholder values


resp = client.list_dataset_contents({
  dataset_name: "DatasetName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.dataset_content_summaries #=> Array
resp.dataset_content_summaries[0].version #=> String
resp.dataset_content_summaries[0].status.state #=> String, one of "CREATING", "SUCCEEDED", "FAILED"
resp.dataset_content_summaries[0].status.reason #=> String
resp.dataset_content_summaries[0].creation_time #=> Time
resp.dataset_content_summaries[0].schedule_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set whose contents information you want to list.

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in this request.

Returns:



1033
1034
1035
1036
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1033

def list_dataset_contents(params = {}, options = {})
  req = build_request(:list_dataset_contents, params)
  req.send_request(options)
end

#list_datasets(params = {}) ⇒ Types::ListDatasetsResponse

Retrieves information about data sets.

Examples:

Request syntax with placeholder values


resp = client.list_datasets({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.dataset_summaries #=> Array
resp.dataset_summaries[0].dataset_name #=> String
resp.dataset_summaries[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.dataset_summaries[0].creation_time #=> Time
resp.dataset_summaries[0].last_update_time #=> Time
resp.dataset_summaries[0].triggers #=> Array
resp.dataset_summaries[0].triggers[0].schedule.expression #=> String
resp.dataset_summaries[0].triggers[0].dataset.name #=> String
resp.dataset_summaries[0].actions #=> Array
resp.dataset_summaries[0].actions[0].action_name #=> String
resp.dataset_summaries[0].actions[0].action_type #=> String, one of "QUERY", "CONTAINER"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in this request.

    The default value is 100.

Returns:



1077
1078
1079
1080
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1077

def list_datasets(params = {}, options = {})
  req = build_request(:list_datasets, params)
  req.send_request(options)
end

#list_datastores(params = {}) ⇒ Types::ListDatastoresResponse

Retrieves a list of data stores.

Examples:

Request syntax with placeholder values


resp = client.list_datastores({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.datastore_summaries #=> Array
resp.datastore_summaries[0].datastore_name #=> String
resp.datastore_summaries[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING"
resp.datastore_summaries[0].creation_time #=> Time
resp.datastore_summaries[0].last_update_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in this request.

    The default value is 100.

Returns:



1115
1116
1117
1118
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1115

def list_datastores(params = {}, options = {})
  req = build_request(:list_datastores, params)
  req.send_request(options)
end

#list_pipelines(params = {}) ⇒ Types::ListPipelinesResponse

Retrieves a list of pipelines.

Examples:

Request syntax with placeholder values


resp = client.list_pipelines({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.pipeline_summaries #=> Array
resp.pipeline_summaries[0].pipeline_name #=> String
resp.pipeline_summaries[0].reprocessing_summaries #=> Array
resp.pipeline_summaries[0].reprocessing_summaries[0].id #=> String
resp.pipeline_summaries[0].reprocessing_summaries[0].status #=> String, one of "RUNNING", "SUCCEEDED", "CANCELLED", "FAILED"
resp.pipeline_summaries[0].reprocessing_summaries[0].creation_time #=> Time
resp.pipeline_summaries[0].creation_time #=> Time
resp.pipeline_summaries[0].last_update_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (String)

    The token for the next set of results.

  • :max_results (Integer)

    The maximum number of results to return in this request.

    The default value is 100.

Returns:



1156
1157
1158
1159
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1156

def list_pipelines(params = {}, options = {})
  req = build_request(:list_pipelines, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags (metadata) which you have assigned to the resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceArn", # required
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource whose tags you want to list.

Returns:



1184
1185
1186
1187
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1184

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#put_logging_options(params = {}) ⇒ Struct

Sets or updates the AWS IoT Analytics logging options.

Note that if you update the value of any loggingOptions field, it takes up to one minute for the change to take effect. Also, if you change the policy attached to the role you specified in the roleArn field (for example, to correct an invalid policy) it takes up to 5 minutes for that change to take effect.

Examples:

Request syntax with placeholder values


resp = client.put_logging_options({
  logging_options: { # required
    role_arn: "RoleArn", # required
    level: "ERROR", # required, accepts ERROR
    enabled: false, # required
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :logging_options (required, Types::LoggingOptions)

    The new values of the AWS IoT Analytics logging options.

Returns:

  • (Struct)

    Returns an empty response.



1214
1215
1216
1217
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1214

def put_logging_options(params = {}, options = {})
  req = build_request(:put_logging_options, params)
  req.send_request(options)
end

#run_pipeline_activity(params = {}) ⇒ Types::RunPipelineActivityResponse

Simulates the results of running a pipeline activity on a message payload.

Examples:

Request syntax with placeholder values


resp = client.run_pipeline_activity({
  pipeline_activity: { # required
    channel: {
      name: "ActivityName", # required
      channel_name: "ChannelName", # required
      next: "ActivityName",
    },
    lambda: {
      name: "ActivityName", # required
      lambda_name: "LambdaName", # required
      batch_size: 1, # required
      next: "ActivityName",
    },
    datastore: {
      name: "ActivityName", # required
      datastore_name: "DatastoreName", # required
    },
    add_attributes: {
      name: "ActivityName", # required
      attributes: { # required
        "AttributeName" => "AttributeName",
      },
      next: "ActivityName",
    },
    remove_attributes: {
      name: "ActivityName", # required
      attributes: ["AttributeName"], # required
      next: "ActivityName",
    },
    select_attributes: {
      name: "ActivityName", # required
      attributes: ["AttributeName"], # required
      next: "ActivityName",
    },
    filter: {
      name: "ActivityName", # required
      filter: "FilterExpression", # required
      next: "ActivityName",
    },
    math: {
      name: "ActivityName", # required
      attribute: "AttributeName", # required
      math: "MathExpression", # required
      next: "ActivityName",
    },
    device_registry_enrich: {
      name: "ActivityName", # required
      attribute: "AttributeName", # required
      thing_name: "AttributeName", # required
      role_arn: "RoleArn", # required
      next: "ActivityName",
    },
    device_shadow_enrich: {
      name: "ActivityName", # required
      attribute: "AttributeName", # required
      thing_name: "AttributeName", # required
      role_arn: "RoleArn", # required
      next: "ActivityName",
    },
  },
  payloads: ["data"], # required
})

Response structure


resp.payloads #=> Array
resp.payloads[0] #=> String
resp.log_result #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_activity (required, Types::PipelineActivity)

    The pipeline activity that is run. This must not be a 'channel' activity or a 'datastore' activity because these activities are used in a pipeline only to load the original message and to store the (possibly) transformed message. If a 'lambda' activity is specified, only short-running Lambda functions (those with a timeout of less than 30 seconds or less) can be used.

  • :payloads (required, Array<String, IO>)

    The sample message payloads on which the pipeline activity is run.

Returns:



1311
1312
1313
1314
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1311

def run_pipeline_activity(params = {}, options = {})
  req = build_request(:run_pipeline_activity, params)
  req.send_request(options)
end

#sample_channel_data(params = {}) ⇒ Types::SampleChannelDataResponse

Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.

Examples:

Request syntax with placeholder values


resp = client.sample_channel_data({
  channel_name: "ChannelName", # required
  max_messages: 1,
  start_time: Time.now,
  end_time: Time.now,
})

Response structure


resp.payloads #=> Array
resp.payloads[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :channel_name (required, String)

    The name of the channel whose message samples are retrieved.

  • :max_messages (Integer)

    The number of sample messages to be retrieved. The limit is 10, the default is also 10.

  • :start_time (Time, DateTime, Date, Integer, String)

    The start of the time window from which sample messages are retrieved.

  • :end_time (Time, DateTime, Date, Integer, String)

    The end of the time window from which sample messages are retrieved.

Returns:



1352
1353
1354
1355
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1352

def sample_channel_data(params = {}, options = {})
  req = build_request(:sample_channel_data, params)
  req.send_request(options)
end

#start_pipeline_reprocessing(params = {}) ⇒ Types::StartPipelineReprocessingResponse

Starts the reprocessing of raw message data through the pipeline.

Examples:

Request syntax with placeholder values


resp = client.start_pipeline_reprocessing({
  pipeline_name: "PipelineName", # required
  start_time: Time.now,
  end_time: Time.now,
})

Response structure


resp.reprocessing_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of the pipeline on which to start reprocessing.

  • :start_time (Time, DateTime, Date, Integer, String)

    The start time (inclusive) of raw message data that is reprocessed.

  • :end_time (Time, DateTime, Date, Integer, String)

    The end time (exclusive) of raw message data that is reprocessed.

Returns:



1386
1387
1388
1389
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1386

def start_pipeline_reprocessing(params = {}, options = {})
  req = build_request(:start_pipeline_reprocessing, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource whose tags will be modified.

  • :tags (required, Array<Types::Tag>)

    The new or modified tags for the resource.

Returns:

  • (Struct)

    Returns an empty response.



1416
1417
1418
1419
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1416

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes the given tags (metadata) from the resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource whose tags will be removed.

  • :tag_keys (required, Array<String>)

    The keys of those tags which will be removed.

Returns:

  • (Struct)

    Returns an empty response.



1440
1441
1442
1443
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1440

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_channel(params = {}) ⇒ Struct

Updates the settings of a channel.

Examples:

Request syntax with placeholder values


resp = client.update_channel({
  channel_name: "ChannelName", # required
  retention_period: {
    unlimited: false,
    number_of_days: 1,
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :channel_name (required, String)

    The name of the channel to be updated.

  • :retention_period (Types::RetentionPeriod)

    How long, in days, message data is kept for the channel.

Returns:

  • (Struct)

    Returns an empty response.



1467
1468
1469
1470
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1467

def update_channel(params = {}, options = {})
  req = build_request(:update_channel, params)
  req.send_request(options)
end

#update_dataset(params = {}) ⇒ Struct

Updates the settings of a data set.

Examples:

Request syntax with placeholder values


resp = client.update_dataset({
  dataset_name: "DatasetName", # required
  actions: [ # required
    {
      action_name: "DatasetActionName",
      query_action: {
        sql_query: "SqlQuery", # required
        filters: [
          {
            delta_time: {
              offset_seconds: 1, # required
              time_expression: "TimeExpression", # required
            },
          },
        ],
      },
      container_action: {
        image: "Image", # required
        execution_role_arn: "RoleArn", # required
        resource_configuration: { # required
          compute_type: "ACU_1", # required, accepts ACU_1, ACU_2
          volume_size_in_gb: 1, # required
        },
        variables: [
          {
            name: "VariableName", # required
            string_value: "StringValue",
            double_value: 1.0,
            dataset_content_version_value: {
              dataset_name: "DatasetName", # required
            },
            output_file_uri_value: {
              file_name: "OutputFileName", # required
            },
          },
        ],
      },
    },
  ],
  triggers: [
    {
      schedule: {
        expression: "ScheduleExpression",
      },
      dataset: {
        name: "DatasetName", # required
      },
    },
  ],
  retention_period: {
    unlimited: false,
    number_of_days: 1,
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :dataset_name (required, String)

    The name of the data set to update.

  • :actions (required, Array<Types::DatasetAction>)

    A list of "DatasetAction" objects.

  • :triggers (Array<Types::DatasetTrigger>)

    A list of "DatasetTrigger" objects. The list can be empty or can contain up to five DataSetTrigger objects.

  • :retention_period (Types::RetentionPeriod)

    How long, in days, message data is kept for the data set.

Returns:

  • (Struct)

    Returns an empty response.



1548
1549
1550
1551
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1548

def update_dataset(params = {}, options = {})
  req = build_request(:update_dataset, params)
  req.send_request(options)
end

#update_datastore(params = {}) ⇒ Struct

Updates the settings of a data store.

Examples:

Request syntax with placeholder values


resp = client.update_datastore({
  datastore_name: "DatastoreName", # required
  retention_period: {
    unlimited: false,
    number_of_days: 1,
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :datastore_name (required, String)

    The name of the data store to be updated.

  • :retention_period (Types::RetentionPeriod)

    How long, in days, message data is kept for the data store.

Returns:

  • (Struct)

    Returns an empty response.



1575
1576
1577
1578
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1575

def update_datastore(params = {}, options = {})
  req = build_request(:update_datastore, params)
  req.send_request(options)
end

#update_pipeline(params = {}) ⇒ Struct

Updates the settings of a pipeline.

Examples:

Request syntax with placeholder values


resp = client.update_pipeline({
  pipeline_name: "PipelineName", # required
  pipeline_activities: [ # required
    {
      channel: {
        name: "ActivityName", # required
        channel_name: "ChannelName", # required
        next: "ActivityName",
      },
      lambda: {
        name: "ActivityName", # required
        lambda_name: "LambdaName", # required
        batch_size: 1, # required
        next: "ActivityName",
      },
      datastore: {
        name: "ActivityName", # required
        datastore_name: "DatastoreName", # required
      },
      add_attributes: {
        name: "ActivityName", # required
        attributes: { # required
          "AttributeName" => "AttributeName",
        },
        next: "ActivityName",
      },
      remove_attributes: {
        name: "ActivityName", # required
        attributes: ["AttributeName"], # required
        next: "ActivityName",
      },
      select_attributes: {
        name: "ActivityName", # required
        attributes: ["AttributeName"], # required
        next: "ActivityName",
      },
      filter: {
        name: "ActivityName", # required
        filter: "FilterExpression", # required
        next: "ActivityName",
      },
      math: {
        name: "ActivityName", # required
        attribute: "AttributeName", # required
        math: "MathExpression", # required
        next: "ActivityName",
      },
      device_registry_enrich: {
        name: "ActivityName", # required
        attribute: "AttributeName", # required
        thing_name: "AttributeName", # required
        role_arn: "RoleArn", # required
        next: "ActivityName",
      },
      device_shadow_enrich: {
        name: "ActivityName", # required
        attribute: "AttributeName", # required
        thing_name: "AttributeName", # required
        role_arn: "RoleArn", # required
        next: "ActivityName",
      },
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :pipeline_name (required, String)

    The name of the pipeline to update.

  • :pipeline_activities (required, Array<Types::PipelineActivity>)

    A list of "PipelineActivity" objects.

    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.

Returns:

  • (Struct)

    Returns an empty response.



1665
1666
1667
1668
# File 'gems/aws-sdk-iotanalytics/lib/aws-sdk-iotanalytics/client.rb', line 1665

def update_pipeline(params = {}, options = {})
  req = build_request(:update_pipeline, params)
  req.send_request(options)
end