greengrasssdk.stream_manager.data package

class greengrasssdk.stream_manager.data.VersionInfo[source]

Bases: enum.Enum

(Internal Only) Version information.

PROTOCOL_VERSION = '1.1.0'
from_dict = <function VersionInfo.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ConnectRequest(request_id: str = None, protocol_version: str = None, other_supported_protocol_versions: List[str] = None, sdk_version: str = None, auth_token: str = None)[source]

Bases: object

(Internal Only) Request object to connect to the service.

request_id
protocol_version
other_supported_protocol_versions
sdk_version
auth_token
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ResponseStatusCode[source]

Bases: enum.Enum

(Internal Only) Enum defining possible response status codes from StreamManager server. Success: Request succeeded. UnknownFailure: Encountered unknown StreamManager server failure. Unauthorized: Client is not authorized to perform this request. InvalidRequest: Client request is invalid. RequestPayloadTooLarge: Request payload is too large. ResourceNotFound: The requested resource does not exist. ServerTimeout: Server took too long and timed out. ResponsePayloadTooLarge: Server response exceeded the max allowed response payload size by the protocol. UnsupportedConnectVersion: Server does not support the Connect version presented by the Client. UnexpectedOperation: Operation presented was not expected by the Server. UnsupportedProtocolVersion: Protocol version presented by the Client is not compatible with the Server. InvalidProtocolVersion: Protocol version presented by the Client is not valid. FailedToConnect: Client failed to connect to the Server. NotEnoughMessages: There is not enough messages to return. MessageStoreReadError: Read messages encountered an error. OutOfMemoryError: Server ran out of memory. UpdateFailed: Update operation failed. UpdateNotAllowed: One or more fields are not allowed to be updated. UnknownOperation: Client request is not recognized by the server.

Success = 0
UnknownFailure = 1
Unauthorized = 2
InvalidRequest = 3
RequestPayloadTooLarge = 4
ResourceNotFound = 5
ServerTimeout = 6
ResponsePayloadTooLarge = 7
UnsupportedConnectVersion = 8
UnexpectedOperation = 9
UnsupportedProtocolVersion = 10
InvalidProtocolVersion = 11
FailedToConnect = 12
NotEnoughMessages = 13
MessageStoreReadError = 14
OutOfMemoryError = 15
UpdateFailed = 16
UpdateNotAllowed = 17
UnknownOperation = 18
from_dict = <function ResponseStatusCode.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ConnectResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None, protocol_version: str = None, supported_protocol_versions: List[str] = None, server_version: str = None, client_identifier: str = None)[source]

Bases: object

Internal Only.

request_id
status
error_message
protocol_version
supported_protocol_versions
server_version
client_identifier
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.Operation[source]

Bases: enum.Enum

Internal Only.

Unknown = 0
Connect = 1
CreateMessageStream = 2
DeleteMessageStream = 3
AppendMessage = 4
ReadMessages = 5
ConnectResponse = 6
CreateMessageStreamResponse = 7
DeleteMessageStreamResponse = 8
AppendMessageResponse = 9
ReadMessagesResponse = 10
ListStreams = 11
ListStreamsResponse = 12
DescribeMessageStream = 13
DescribeMessageStreamResponse = 14
UpdateMessageStream = 15
UpdateMessageStreamResponse = 16
UnknownOperationError = 17
from_dict = <function Operation.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.MessageFrame(operation: greengrasssdk.stream_manager.data.Operation = None, payload: bytes = None)[source]

Bases: object

Internal Only.

operation
payload
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.Status[source]

Bases: enum.Enum

The status of the event.

Success = 0
Failure = 1
InProgress = 2
Warning = 3
Canceled = 4
from_dict = <function Status.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.StatusLevel[source]

Bases: enum.Enum

Defines the verbosity of status messages in a status-stream.

ERROR = 0
WARN = 1
INFO = 2
DEBUG = 3
TRACE = 4
from_dict = <function StatusLevel.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.S3ExportTaskDefinition(input_url: str = None, bucket: str = None, key: str = None, user_metadata: dict = None)[source]

Bases: object

S3 Task definition containing all the information necessary to export the data to S3. This will contain the S3 bucket and key as well as the file’s URL where the data is stored.

input_url

The URL of the file that contains the data to upload. The file should be local on the disk.

bucket

The name of the S3 bucket that this file should be uploaded to.

key

The key for the S3 object that this file should be uploaded to. The string can have placeholder expressions which are resolved at upload time. Valid expressions are strings that are valid Java DateTimeFormatter strings. See https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html Example: myKeyNamePrefix/!{timestamp:yyyy/MM/dd}/myKeyNameSuffix.

user_metadata

User metadata. For key of a user metadata, callers should not include the internal “x-amz-meta-” prefix. Keys are case insensitive and will appear as lowercase strings on S3, even if they were originally specified with uppercase strings. Reserved key names start with “$aws-gg-” prefix.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.StatusContext(s3_export_task_definition: greengrasssdk.stream_manager.data.S3ExportTaskDefinition = None, export_identifier: str = None, stream_name: str = None, sequence_number: int = None)[source]

Bases: object

Context associated with a status message. Describes which stream, export config, message, the status is associated with.

s3_export_task_definition

The task definition of an S3 upload task if the status is associated with it, ie, if the eventType = S3Task.

export_identifier

The export identifier the status is associated with.

stream_name

The name of the stream the status is associated with.

sequence_number

The sequence number of the message the status is associated with.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.EventType[source]

Bases: enum.Enum

The type of event, which determines how to interpret the status payload.

S3Task = 0
from_dict = <function EventType.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.StatusMessage(event_type: greengrasssdk.stream_manager.data.EventType = None, status_level: greengrasssdk.stream_manager.data.StatusLevel = None, status: greengrasssdk.stream_manager.data.Status = None, status_context: greengrasssdk.stream_manager.data.StatusContext = None, message: str = None, timestamp_epoch_ms: int = None)[source]

Bases: object

Status object appended to a status-stream.

event_type
status_level
status
status_context
message

String describing the status message.

timestamp_epoch_ms

The time this status was added to the status-stream (in milliseconds since epoch).

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.TraceableRequest(request_id: str = None)[source]

Bases: object

(Internal Only) TraceableRequest that contains only requestId.

request_id
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.UnknownOperationError(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None)[source]

Bases: object

(Internal Only) Response for UnknownOperationError.

request_id
status
error_message
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.KinesisConfig(identifier: str = None, kinesis_stream_name: str = None, batch_size: int = None, batch_interval_millis: int = None, priority: int = None, start_sequence_number: int = None, disabled: bool = None)[source]

Bases: object

Configuration object for Kinesis data streams export destination.

identifier

A unique identifier to identify this individual upload stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.

kinesis_stream_name

The name of the Kinesis data stream that this exporter should upload to.

batch_size

The maximum size of a batch to send to Kinesis. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 500. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The batch size must be between 1 and 500.

batch_interval_millis

The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.

priority

Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.

start_sequence_number

The sequence number of the message to use as the starting message in the export. Default is 0. The sequence number provided should be less than the newest sequence number in the stream, i.e., sequence number of the last messaged appended. To find the newest sequence number, describe the stream and then check the storage status of the returned MessageStreamInfo object.

disabled

Enable or disable this export. Default is false.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.IoTSiteWiseConfig(identifier: str = None, batch_size: int = None, batch_interval_millis: int = None, priority: int = None, start_sequence_number: int = None, disabled: bool = None)[source]

Bases: object

Configuration object for IotSiteWise data streams export destination. Minimum version requirements: StreamManager server version 1.1 (or AWS IoT Greengrass Core 1.11.0)

identifier

A unique identifier to identify this individual upload stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.

batch_size

The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 10. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The minimum batch size is 1 and the maximum is 10.

batch_interval_millis

The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.

priority

Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.

start_sequence_number

The sequence number of the message to use as the starting message in the export. Default is 0. The sequence number provided should be less than the newest sequence number in the stream, i.e., sequence number of the last messaged appended. To find the newest sequence number, describe the stream and then check the storage status of the returned MessageStreamInfo object.

disabled

Enable or disable this export. Default is false.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ExportFormat[source]

Bases: enum.Enum

ExportFormat is used to define how messages are batched and formatted in the export payload. RAW_NOT_BATCHED: Each message in a batch will be sent as an individual HTTP POST with the payload as the body (even if batchSize is set). JSON_BATCHED: Each batch of messages will be sent as a JSON list of Message objects as the body.

RAW_NOT_BATCHED = 0
JSON_BATCHED = 1
from_dict = <function ExportFormat.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.HTTPConfig(identifier: str = None, uri: str = None, batch_size: int = None, batch_interval_millis: int = None, priority: int = None, start_sequence_number: int = None, disabled: bool = None, export_format: greengrasssdk.stream_manager.data.ExportFormat = None)[source]

Bases: object

This export destination is not supported! The interface may change at any time without notice and should not be relied on for any production use. There are no guarantees around its correctness. This configures an HTTP endpoint which sends a POST request to the provided URI. Each request contains a single message in the body of the request.

identifier

A unique identifier to identify this individual upload stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.

uri

URL for HTTP endpoint which should receive the POST requests for export.

batch_size

The maximum size of a batch to send to the destination. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 500. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The minimum batch size is 1 and the maximum is 500.

batch_interval_millis

The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.

priority

Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.

start_sequence_number

The sequence number of the message to use as the starting message in the export. Default is 0. The sequence number provided should be less than the newest sequence number in the stream, i.e., sequence number of the last messaged appended. To find the newest sequence number, describe the stream and then check the storage status of the returned MessageStreamInfo object.

disabled

Enable or disable this export. Default is false.

export_format

Defines how messages are batched and formatted in the export payload.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.StatusConfig(status_level: greengrasssdk.stream_manager.data.StatusLevel = None, status_stream_name: str = None)[source]

Bases: object

Configuration for status in a status-stream.

status_level

Defines the verbosity of status messages in a status-stream.

status_stream_name

The name of the stream to which status messages are appended. The status-stream should be created before associating it with another stream.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.S3ExportTaskExecutorConfig(identifier: str = None, size_threshold_for_multipart_upload_bytes: int = None, priority: int = None, disabled: bool = None, status_config: greengrasssdk.stream_manager.data.StatusConfig = None)[source]

Bases: object

Configuration object for S3 export tasks executor. Minimum version requirements: StreamManager server version 1.1 (or AWS IoT Greengrass Core 1.11.0)

identifier

A unique identifier to identify this individual upload task. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.

size_threshold_for_multipart_upload_bytes

The size threshold in bytes for when to use multipart uploads. Uploads over this size will automatically use a multipart upload strategy, while uploads equal or smaller than this threshold will use a single connection to upload the whole object.

priority

Priority for this upload task. Lower values are higher priority. If not specified it will have the lowest priority.

disabled

Enable or disable this export. Default is false.

status_config

Event status configuration that specifies the target status stream and verbosity.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.IoTAnalyticsConfig(identifier: str = None, iot_channel: str = None, iot_msg_id_prefix: str = None, batch_size: int = None, batch_interval_millis: int = None, priority: int = None, start_sequence_number: int = None, disabled: bool = None)[source]

Bases: object

Configuration object for IoT Analytics export destination.

identifier

A unique identifier to identify this individual upload stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.

iot_channel

The name of the IoT Analytics Channel that this exporter should upload to.

iot_msg_id_prefix

A string prefixed to each unique message id. After this prefix, StreamManager may append more data to make the message ID unique. This prefix must be less than 32 characters.

batch_size

The maximum size of a batch to send to IoT Analytics. Messages will be queued until the batch size is reached, after which they will then be uploaded. If unspecified the default will be 100. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The batch size must be between 1 and 100.

batch_interval_millis

The time in milliseconds between the earliest un-uploaded message and the current time. If this time is exceeded, messages will be uploaded in the next batch. If unspecified messages will be eligible for upload immediately. If both batchSize and batchIntervalMillis are specified, then messages will be eligible for upload when either condition is met. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.

priority

Priority for this upload stream. Lower values are higher priority. If not specified it will have the lowest priority.

start_sequence_number

The sequence number of the message to use as the starting message in the export. Default is 0. The sequence number provided should be less than the newest sequence number in the stream, i.e., sequence number of the last messaged appended. To find the newest sequence number, describe the stream and then check the storage status of the returned MessageStreamInfo object.

disabled

Enable or disable this export. Default is false.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ExportDefinition(http: List[greengrasssdk.stream_manager.data.HTTPConfig] = None, iot_analytics: List[greengrasssdk.stream_manager.data.IoTAnalyticsConfig] = None, kinesis: List[greengrasssdk.stream_manager.data.KinesisConfig] = None, iot_sitewise: List[greengrasssdk.stream_manager.data.IoTSiteWiseConfig] = None, s3_task_executor: List[greengrasssdk.stream_manager.data.S3ExportTaskExecutorConfig] = None)[source]

Bases: object

Defines how and where the stream is uploaded.

http

Defines how the stream is uploaded to an HTTP endpoint.

iot_analytics

Defines how the stream is uploaded to IoT Analytics.

kinesis

Defines how the stream is uploaded to Kinesis.

iot_sitewise

Defines how the stream is uploaded to IoT SiteWise.

s3_task_executor

Defines the list of configs for S3 task executors.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.StrategyOnFull[source]

Bases: enum.Enum

StrategyOnFull is used in the MessageStreamDefinition when creating a stream. It defines the behavior when the stream has reached the maximum size. RejectNewData: any append message request after the stream is full will be rejected with an exception. OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.

RejectNewData = 0
OverwriteOldestData = 1
from_dict = <function StrategyOnFull.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.Persistence[source]

Bases: enum.Enum

Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.

File = 0
Memory = 1
from_dict = <function Persistence.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.MessageStreamDefinition(name: str = None, max_size: int = 268435456, stream_segment_size: int = 16777216, time_to_live_millis: int = None, strategy_on_full: greengrasssdk.stream_manager.data.StrategyOnFull = None, persistence: greengrasssdk.stream_manager.data.Persistence = None, flush_on_write: bool = None, export_definition: greengrasssdk.stream_manager.data.ExportDefinition = None)[source]

Bases: object

Object defining a message stream used in the CreateMessageStream and UpdateMessageStream API.

name

The unique name of the stream. Must be an alphanumeric string including spaces, commas, periods, hyphens, and underscores with length between 1 and 255.

max_size

The maximum size in bytes for the entire stream. Set to 256MB by default with a minimum of 1KB and a maximum of 8192PB.

stream_segment_size

The size of each segment of the stream. Set to 16MB by default with a minimum of 1KB and a maximum of 2GB. Data is only deleted segment by segment, so the segment size is the smallest amount of data which can be deleted.

time_to_live_millis

Time to live for each message in milliseconds. Data may be deleted at any time after the TTL expires; deletion is not guaranteed to occur immediately when the TTL expires. The minimum value is 60000 milliseconds and the maximum is 9223372036854 milliseconds.

strategy_on_full

What to do when the maximum size of the stream is reached. RejectNewData: any append message request after the stream is full will be rejected with an exception. OverwriteOldestData: the oldest stream segments will be deleted until there is room for the new message.

persistence

Stream persistence. If set to File, the file system will be used to persist messages long-term and is resilient to restarts. Memory should be used when performance matters more than durability as it only stores the stream in memory and never writes to the disk.

flush_on_write

This only applies when Persistence is set to File mode. Waits for the filesystem to complete the write for every message. This is safer, but slower. Default is false.

export_definition

Defines how and where the stream is uploaded. See the definition of the ExportDefinition object for more detail.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.CreateMessageStreamRequest(request_id: str = None, definition: greengrasssdk.stream_manager.data.MessageStreamDefinition = None)[source]

Bases: object

(Internal Only) Request object for creating a message stream.

request_id
definition
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.CreateMessageStreamResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None)[source]

Bases: object

Internal Only.

request_id
status
error_message
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.UpdateMessageStreamRequest(request_id: str = None, definition: greengrasssdk.stream_manager.data.MessageStreamDefinition = None)[source]

Bases: object

(Internal Only) Request object for updating a message stream.

request_id
definition
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.UpdateMessageStreamResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None)[source]

Bases: object

(Internal Only) Response for UpdateMessageStreamRequest.

request_id
status
error_message
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.DeleteMessageStreamRequest(request_id: str = None, name: str = None)[source]

Bases: object

(Internal Only) Request object for deleting a message stream.

request_id
name
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.DeleteMessageStreamResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None)[source]

Bases: object

Internal Only.

request_id
status
error_message
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.DescribeMessageStreamRequest(request_id: str = None, name: str = None)[source]

Bases: object

(Internal Only) Request object for describing a message stream.

request_id
name
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.MessageStreamInfo(definition: greengrasssdk.stream_manager.data.MessageStreamDefinition = None, storage_status: greengrasssdk.stream_manager.data.MessageStreamInfo.storageStatus = None, export_statuses: List[greengrasssdk.stream_manager.data.MessageStreamInfo.exportStatuses] = None)[source]

Bases: object

Message stream information including its definition, storage status and export status.

class storageStatus(oldest_sequence_number: int = None, newest_sequence_number: int = None, total_bytes: int = None)[source]

Bases: object

Stream status including oldest/newest sequence number and total bytes.

oldest_sequence_number

The sequence number of the first message which is still accessible in the stream.

newest_sequence_number

The sequence number of the last appended message.

total_bytes

The current total size of the stream in bytes.

static from_dict(d)[source]
as_dict()[source]
class exportStatuses(export_config_identifier: str = None, last_exported_sequence_number: int = None, last_export_time: int = None, error_message: str = None, exported_bytes_from_stream: int = None, exported_messages_count: int = None)[source]

Bases: object

Export status including the export identifier and the last exported sequence number for that export task.

export_config_identifier

The unique export identifier.

last_exported_sequence_number

The sequence number of the last message which was successfully exported.

last_export_time

The last time an export was attempted. Data is Unix epoch time in milliseconds.

error_message

Error message from the last export attempt if it failed.

exported_bytes_from_stream

Total bytes exported from the stream for this Export Config. It does not include the failed export attempts or messages which are skipped because of some non-retryable error.

exported_messages_count

Total messages exported/processed.

static from_dict(d)[source]
as_dict()[source]
definition
storage_status

Stream status including oldest/newest sequence number and total bytes.

export_statuses
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.DescribeMessageStreamResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None, message_stream_info: greengrasssdk.stream_manager.data.MessageStreamInfo = None)[source]

Bases: object

(Internal Only) Response object for describing a message stream.

request_id
status
error_message
message_stream_info
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.AppendMessageRequest(request_id: str = None, name: str = None, payload: bytes = None)[source]

Bases: object

(Internal Only) Request object for appending to a message stream.

request_id
name
payload
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.AppendMessageResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None, sequence_number: int = None)[source]

Bases: object

Internal Only.

request_id
status
error_message
sequence_number
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ReadMessagesOptions(desired_start_sequence_number: int = None, min_message_count: int = 1, max_message_count: int = None, read_timeout_millis: int = 0)[source]

Bases: object

Options for the ReadMessages API. All fields are optional.

desired_start_sequence_number

The desired beginning sequence number to start reading from. If the desired sequence number is less than the current minimum of the stream, then it will instead start reading from the current minimum.

min_message_count

The minimum number of messages that will be returned. If not enough messages are available for reading, then NotEnoughMessages exception will be thrown. The minimum values is 1 and the maximum value is 2147483647.

max_message_count

The maximum number of messages that will be returned. The minimum values is the value of the minimum message count and the maximum value is 2147483647.

read_timeout_millis

The time to wait for messages in milliseconds. Default is 0, meaning that the server will not wait for messages. If it can fulfill the minimum messages it will return them, but otherwise NotEnoughMessages exception will be thrown. If the timeout is greater than zero, then the server will wait up to that time for more messages to be appended to the stream, waiting until the minimum number of messages is reached. The maximum value is the value of the client timeout.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ReadMessagesRequest(request_id: str = None, stream_name: str = None, read_messages_options: greengrasssdk.stream_manager.data.ReadMessagesOptions = None)[source]

Bases: object

(Internal Only) Request object for reading from a message stream. readMessagesOptions is optional.

request_id
stream_name
read_messages_options
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.Message(stream_name: str = None, sequence_number: int = None, ingest_time: int = None, payload: bytes = None)[source]

Bases: object

Message object containing metadata and the user’s payload.

stream_name

The name of the stream which this message is in.

sequence_number

The sequence number of this message within the stream.

ingest_time

The time that the message was ingested to Stream Manager. Data is Unix epoch time in milliseconds.

payload

The binary message data.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ReadMessagesResponse(request_id: str = None, messages: List[greengrasssdk.stream_manager.data.Message] = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None)[source]

Bases: object

Internal Only.

request_id
messages
status
error_message
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ListStreamsRequest(request_id: str = None)[source]

Bases: object

(Internal Only) Request object to list all available streams. There are no options.

request_id
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.ListStreamsResponse(request_id: str = None, status: greengrasssdk.stream_manager.data.ResponseStatusCode = None, error_message: str = None, streams: List[str] = None)[source]

Bases: object

Internal Only.

request_id
status
error_message
streams
static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.TimeInNanos(time_in_seconds: int = None, offset_in_nanos: int = None)[source]

Bases: object

Contains a timestamp with optional nanosecond granularity.

time_in_seconds

The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos.

offset_in_nanos

The nanosecond offset from timeInSeconds.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.Quality[source]

Bases: enum.Enum

An enumeration.

GOOD = 'GOOD'
BAD = 'BAD'
UNCERTAIN = 'UNCERTAIN'
from_dict = <function Quality.from_dict>[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.Variant(string_value: str = None, integer_value: int = None, double_value: float = None, boolean_value: bool = None)[source]

Bases: object

Contains an asset property value (of a single type only).

string_value

Asset property data of type string (sequence of characters).

integer_value

Asset property data of type integer (whole number).

double_value

Asset property data of type double (floating point number).

boolean_value

Asset property data of type Boolean (true or false).

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.AssetPropertyValue(value: greengrasssdk.stream_manager.data.Variant = None, timestamp: greengrasssdk.stream_manager.data.TimeInNanos = None, quality: greengrasssdk.stream_manager.data.Quality = None)[source]

Bases: object

Contains asset property value information.

value

The value of the asset property.

timestamp

The timestamp of the asset property value.

quality

The quality of the asset property value.

static from_dict(d)[source]
as_dict()[source]
class greengrasssdk.stream_manager.data.PutAssetPropertyValueEntry(entry_id: str = None, asset_id: str = None, property_id: str = None, property_alias: str = None, property_values: List[greengrasssdk.stream_manager.data.AssetPropertyValue] = None)[source]

Bases: object

Contains a list of value updates for a IoTSiteWise asset property in the list of asset entries consumed by the BatchPutAssetPropertyValue API. See https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_BatchPutAssetPropertyValue.html.

entry_id

The user specified ID for the entry. You can use this ID to identify which entries failed.

asset_id

The ID of the asset to update.

property_id

The ID of the asset property for this entry.

property_alias

//docs.aws.amazon.com/iot-sitewise/latest/userguide/connect-data-streams.html.

Type:The property alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature) For more information, see https
property_values

The list of property values to upload. You can specify up to 10 values.

static from_dict(d)[source]
as_dict()[source]