NAME
Twilio::Rest::Sync::V1::Service::SyncStream - The SyncStream resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $sync_stream = $client->sync->v1->services($service_sid)->sync_streams->create(\%options);
for my $sync_stream ($client->sync->v1->services($service_sid)->sync_streams->read({}, 20)) {
...
}
my $sync_stream = $client->sync->v1->services($service_sid)->sync_streams($sid)->fetch;
$client->sync->v1->services($service_sid)->sync_streams($sid)->update(\%options);
$client->sync->v1->services($service_sid)->sync_streams($sid)->delete;
DESCRIPTION
This file holds SyncStreamList, SyncStreamPage, SyncStreamContext and SyncStreamInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
SyncStreamList
Returned by $client->sync->v1->services($service_sid)->sync_streams. See also Twilio::ListResource.
create
my $sync_stream = $client->sync->v1->services($service_sid)->sync_streams->create(\%options);
Create a new Stream. Returns a SyncStreamInstance.
The options are:
ttl-
How long, in seconds, before the Stream expires and is deleted (time-to-live).
unique_name-
An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The
unique_namevalue can be used as an alternative to thesidin the URL path to address the resource.
read
my @records = $client->sync->v1->services($service_sid)->sync_streams->read(\%options, $limit, $page_size);
Retrieve a list of all Streams in a Service Instance. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->sync->v1->services($service_sid)->sync_streams->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->sync->v1->services($service_sid)->sync_streams->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->sync->v1->services($service_sid)->sync_streams->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->sync->v1->services($service_sid)->sync_streams->get_context($sid);
Returns a SyncStreamContext, and makes no request.
SyncStreamPage
A Twilio::Page of SyncStreamInstance objects.
records_key
build_instance
Used by Twilio::Page.
SyncStreamContext
Returned by $client->sync->v1->services($service_sid)->sync_streams($sid). It makes no request until one of these methods is called.
fetch
my $sync_stream = $client->sync->v1->services($service_sid)->sync_streams($sid)->fetch;
Fetch a specific Stream. Returns a SyncStreamInstance.
update
my $sync_stream = $client->sync->v1->services($service_sid)->sync_streams($sid)->update(\%options);
Update a specific Stream. Returns a SyncStreamInstance.
The options are:
ttl-
How long, in seconds, before the Stream expires and is deleted (time-to-live).
delete
$client->sync->v1->services($service_sid)->sync_streams($sid)->delete;
Delete a specific Stream. Returns true.
stream_messages
my $list = $object->stream_messages;
See Twilio::Rest::Sync::V1::Service::SyncStream::StreamMessage.
SyncStreamInstance
See also Twilio::InstanceResource.
It has fetch, update, delete and stream_messages, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Sync Stream resource.
- created_by
-
The identity of the Stream's creator. If the Stream is created from the client SDK, the value matches the Access Token's
identityfield. If the Stream was created from the REST API, the value is 'system'. - date_created
-
The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_expires
-
The date and time in GMT when the Message Stream expires and will be deleted, specified in ISO 8601 format. If the Message Stream does not expire, this value is
null. The Stream might not be deleted immediately after it expires. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize. - date_updated
-
The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- links
-
The URLs of the Stream's nested resources.
- service_sid
-
The SID of the Sync Service the resource is associated with.
- sid
-
The unique string that we created to identify the Sync Stream resource.
- unique_name
-
An application-defined string that uniquely identifies the resource. It can be used in place of the resource's
sidin the URL to address the resource. - url
-
The absolute URL of the Message Stream resource.
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.