IoT.Client.
create_stream
(**kwargs)¶Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream.
Requires permission to access the CreateStream action.
See also: AWS API Documentation
Request Syntax
response = client.create_stream(
streamId='string',
description='string',
files=[
{
'fileId': 123,
's3Location': {
'bucket': 'string',
'key': 'string',
'version': 'string'
}
},
],
roleArn='string',
tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The stream ID.
[REQUIRED]
The files to stream.
Represents a file to stream.
The file ID.
The location of the file in S3.
The S3 bucket.
The S3 key.
The S3 bucket version.
[REQUIRED]
An IAM role that allows the IoT service principal to access your S3 files.
Metadata which can be used to manage streams.
A set of key/value pairs that are used to manage the resource.
The tag's key.
The tag's value.
dict
Response Syntax
{
'streamId': 'string',
'streamArn': 'string',
'description': 'string',
'streamVersion': 123
}
Response Structure
(dict) --
streamId (string) --
The stream ID.
streamArn (string) --
The stream ARN.
description (string) --
A description of the stream.
streamVersion (integer) --
The version of the stream.
Exceptions
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.LimitExceededException
IoT.Client.exceptions.ResourceNotFoundException
IoT.Client.exceptions.ResourceAlreadyExistsException
IoT.Client.exceptions.ThrottlingException
IoT.Client.exceptions.UnauthorizedException
IoT.Client.exceptions.ServiceUnavailableException
IoT.Client.exceptions.InternalFailureException