stream_manager.data package

class stream_manager.data.VersionInfo(value)[source]

Bases: enum.Enum

(Internal Only) Version information.

PROTOCOL_VERSION = '1.1.0'
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.ConnectRequest(request_id: Optional[str] = None, protocol_version: Optional[str] = None, other_supported_protocol_versions: Optional[List[str]] = None, sdk_version: Optional[str] = None, auth_token: Optional[str] = None)[source]

Bases: object

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

property request_id
property protocol_version
property other_supported_protocol_versions
property sdk_version
property auth_token
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.ResponseStatusCode(value)[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
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.ConnectResponse(request_id: Optional[str] = None, status: Optional[stream_manager.data.ResponseStatusCode] = None, error_message: Optional[str] = None, protocol_version: Optional[str] = None, supported_protocol_versions: Optional[List[str]] = None, server_version: Optional[str] = None, client_identifier: Optional[str] = None)[source]

Bases: object

Internal Only.

property request_id
property status
property error_message
property protocol_version
property supported_protocol_versions
property server_version
property client_identifier
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.Operation(value)[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
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.MessageFrame(operation: Optional[stream_manager.data.Operation] = None, payload: Optional[bytes] = None)[source]

Bases: object

Internal Only.

property operation
property payload
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.S3ExportTaskDefinition(input_url: Optional[str] = None, bucket: Optional[str] = None, key: Optional[str] = None, user_metadata: Optional[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.

property input_url

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

property bucket

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

property 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.

property 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 stream_manager.data.StatusContext(s3_export_task_definition: Optional[stream_manager.data.S3ExportTaskDefinition] = None, export_identifier: Optional[str] = None, stream_name: Optional[str] = None, sequence_number: Optional[int] = None)[source]

Bases: object

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

property s3_export_task_definition

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

property export_identifier

The export identifier the status is associated with.

property stream_name

The name of the stream the status is associated with.

property sequence_number

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

static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.Status(value)[source]

Bases: enum.Enum

The status of the event.

Success = 0
Failure = 1
InProgress = 2
Warning = 3
Canceled = 4
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.EventType(value)[source]

Bases: enum.Enum

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

S3Task = 0
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.StatusLevel(value)[source]

Bases: enum.Enum

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

ERROR = 0
WARN = 1
INFO = 2
DEBUG = 3
TRACE = 4
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.StatusMessage(event_type: Optional[stream_manager.data.EventType] = None, status_level: Optional[stream_manager.data.StatusLevel] = None, status: Optional[stream_manager.data.Status] = None, status_context: Optional[stream_manager.data.StatusContext] = None, message: Optional[str] = None, timestamp_epoch_ms: Optional[int] = None)[source]

Bases: object

Status object appended to a status-stream.

property event_type
property status_level
property status
property status_context
property message

String describing the status message.

property 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 stream_manager.data.TraceableRequest(request_id: Optional[str] = None)[source]

Bases: object

(Internal Only) TraceableRequest that contains only requestId.

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

Bases: object

(Internal Only) Response for UnknownOperationError.

property request_id
property status
property error_message
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.Persistence(value)[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
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.StatusConfig(status_level: Optional[stream_manager.data.StatusLevel] = None, status_stream_name: Optional[str] = None)[source]

Bases: object

Configuration for status in a status-stream.

property status_level

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

property 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 stream_manager.data.S3ExportTaskExecutorConfig(identifier: Optional[str] = None, size_threshold_for_multipart_upload_bytes: Optional[int] = None, priority: Optional[int] = None, disabled: Optional[bool] = None, status_config: Optional[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)

property 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.

property 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.

property priority

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

property disabled

Enable or disable this export. Default is false.

property status_config

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

static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.ExportFormat(value)[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
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.HTTPConfig(identifier: Optional[str] = None, uri: Optional[str] = None, batch_size: Optional[int] = None, batch_interval_millis: Optional[int] = None, priority: Optional[int] = None, start_sequence_number: Optional[int] = None, disabled: Optional[bool] = None, export_format: Optional[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.

property 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.

property uri

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

property 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.

property 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.

property priority

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

property 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.

property disabled

Enable or disable this export. Default is false.

property export_format

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

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

Bases: object

Configuration object for IoT Analytics export destination.

property 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.

property iot_channel

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

property 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.

property 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.

property 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.

property priority

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

property 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.

property disabled

Enable or disable this export. Default is false.

static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.IoTSiteWiseConfig(identifier: Optional[str] = None, batch_size: Optional[int] = None, batch_interval_millis: Optional[int] = None, priority: Optional[int] = None, start_sequence_number: Optional[int] = None, disabled: Optional[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)

property 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.

property 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.

property 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.

property priority

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

property 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.

property disabled

Enable or disable this export. Default is false.

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

Bases: object

Configuration object for Kinesis data streams export destination.

property 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.

property kinesis_stream_name

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

property 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.

property 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.

property priority

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

property 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.

property disabled

Enable or disable this export. Default is false.

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

Bases: object

Defines how and where the stream is uploaded.

property http

Defines how the stream is uploaded to an HTTP endpoint.

property iot_analytics

Defines how the stream is uploaded to IoT Analytics.

property kinesis

Defines how the stream is uploaded to Kinesis.

property iot_sitewise

Defines how the stream is uploaded to IoT SiteWise.

property s3_task_executor

Defines the list of configs for S3 task executors.

static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.StrategyOnFull(value)[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
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.MessageStreamDefinition(name: Optional[str] = None, max_size: int = 268435456, stream_segment_size: int = 16777216, time_to_live_millis: Optional[int] = None, strategy_on_full: Optional[stream_manager.data.StrategyOnFull] = None, persistence: Optional[stream_manager.data.Persistence] = None, flush_on_write: Optional[bool] = None, export_definition: Optional[stream_manager.data.ExportDefinition] = None)[source]

Bases: object

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

property 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.

property 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.

property 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.

property 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.

property 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.

property 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.

property 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.

property 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 stream_manager.data.CreateMessageStreamRequest(request_id: Optional[str] = None, definition: Optional[stream_manager.data.MessageStreamDefinition] = None)[source]

Bases: object

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

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

Bases: object

Internal Only.

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

Bases: object

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

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

Bases: object

(Internal Only) Response for UpdateMessageStreamRequest.

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

Bases: object

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

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

Bases: object

Internal Only.

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

Bases: object

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

property request_id
property name
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.MessageStreamInfo(definition: Optional[stream_manager.data.MessageStreamDefinition] = None, storage_status: Optional[stream_manager.data.MessageStreamInfo.storageStatus] = None, export_statuses: Optional[List[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: Optional[int] = None, newest_sequence_number: Optional[int] = None, total_bytes: Optional[int] = None)[source]

Bases: object

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

property oldest_sequence_number

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

property newest_sequence_number

The sequence number of the last appended message.

property total_bytes

The current total size of the stream in bytes.

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

Bases: object

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

property export_config_identifier

The unique export identifier.

property last_exported_sequence_number

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

property last_export_time

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

property error_message

Error message from the last export attempt if it failed.

property 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.

property exported_messages_count

Total messages exported/processed.

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

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

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

Bases: object

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

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

Bases: object

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

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

Bases: object

Internal Only.

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

Bases: object

Options for the ReadMessages API. All fields are optional.

property 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.

property 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.

property 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.

property 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 stream_manager.data.ReadMessagesRequest(request_id: Optional[str] = None, stream_name: Optional[str] = None, read_messages_options: Optional[stream_manager.data.ReadMessagesOptions] = None)[source]

Bases: object

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

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

Bases: object

Message object containing metadata and the user’s payload.

property stream_name

The name of the stream which this message is in.

property sequence_number

The sequence number of this message within the stream.

property ingest_time

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

property payload

The binary message data.

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

Bases: object

Internal Only.

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

Bases: object

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

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

Bases: object

Internal Only.

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

Bases: object

Contains a timestamp with optional nanosecond granularity.

property time_in_seconds

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

property offset_in_nanos

The nanosecond offset from timeInSeconds.

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

Bases: enum.Enum

An enumeration.

GOOD = 'GOOD'
BAD = 'BAD'
UNCERTAIN = 'UNCERTAIN'
static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.Variant(string_value: Optional[str] = None, integer_value: Optional[int] = None, double_value: Optional[float] = None, boolean_value: Optional[bool] = None)[source]

Bases: object

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

property string_value

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

property integer_value

Asset property data of type integer (whole number).

property double_value

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

property boolean_value

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

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

Bases: object

Contains asset property value information.

property value

The value of the asset property.

property timestamp

The timestamp of the asset property value.

property quality

The quality of the asset property value.

static from_dict(d)[source]
as_dict()[source]
class stream_manager.data.PutAssetPropertyValueEntry(entry_id: Optional[str] = None, asset_id: Optional[str] = None, property_id: Optional[str] = None, property_alias: Optional[str] = None, property_values: Optional[List[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.

property entry_id

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

property asset_id

The ID of the asset to update.

property property_id

The ID of the asset property for this entry.

property 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 property_values

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

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