NAME

Twilio::Rest::Sync::V1::Service::SyncMap::SyncMapItem - The SyncMapItem resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $sync_map_item = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items->create($key, $data, \%options);
for my $sync_map_item ($client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items->read({}, 20)) {
  ...
}
my $sync_map_item = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key)->fetch;
$client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key)->update(\%options);
$client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key)->delete;

DESCRIPTION

Keys in a sync map

This file holds SyncMapItemList, SyncMapItemPage, SyncMapItemContext and SyncMapItemInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

SyncMapItemList

Returned by $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items. See also Twilio::ListResource.

create

my $sync_map_item = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items->create($key, $data, \%options);

Returns a SyncMapItemInstance.

The required values are:

$key

The unique, user-defined key for the Map Item. Can be up to 320 characters long.

$data

A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. A hash or array reference, or a string of JSON.

The options are:

collection_ttl

How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted.

item_ttl

How long, in seconds, before the Map Item expires (time-to-live) and is deleted.

ttl

An alias for item_ttl. If both parameters are provided, this value is ignored.

read

my @records = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

bounds

Whether to include the Map Item referenced by the from parameter. Can be: inclusive to include the Map Item referenced by the from parameter or exclusive to start with the next Map Item. The default value is inclusive. One of inclusive or exclusive.

from

The key of the first Sync Map Item resource to read. See also bounds.

order

How to order the Map Items returned by their key value. Can be: asc (ascending) or desc (descending) and the default is ascending. Map Items are ordered lexicographically by Item key. One of asc or desc.

stream

my $stream = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items->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_maps($map_sid)->sync_map_items->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_maps($map_sid)->sync_map_items->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items->get_context($key);

Returns a SyncMapItemContext, and makes no request.

SyncMapItemPage

A Twilio::Page of SyncMapItemInstance objects.

records_key

build_instance

Used by Twilio::Page.

SyncMapItemContext

Returned by $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key). It makes no request until one of these methods is called.

fetch

my $sync_map_item = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key)->fetch;

Returns a SyncMapItemInstance.

update

my $sync_map_item = $client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key)->update(\%options);

Returns a SyncMapItemInstance.

The options are:

collection_ttl

How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. This parameter can only be used when the Map Item's data or ttl is updated in the same request.

data

A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. A hash or array reference, or a string of JSON.

item_ttl

How long, in seconds, before the Map Item expires (time-to-live) and is deleted.

ttl

An alias for item_ttl. If both parameters are provided, this value is ignored.

if_match

If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP If-Match header.

delete

$client->sync->v1->services($service_sid)->sync_maps($map_sid)->sync_map_items($key)->delete(\%options);

Returns true.

The options are:

if_match

If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP If-Match header.

SyncMapItemInstance

See also Twilio::InstanceResource.

It has fetch, update and delete, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Map Item resource.

created_by

The identity of the Map Item's creator. If the Map Item is created from the client SDK, the value matches the Access Token's identity field. If the Map Item was created from the REST API, the value is system.

data

An arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length.

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 Map Item expires and will be deleted, specified in ISO 8601 format. If the Map Item does not expire, this value is null. The Map Item 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.

key

The unique, user-defined key for the Map Item.

map_sid

The SID of the Sync Map that contains the Map Item.

revision

The current revision of the Map Item, represented as a string.

service_sid

The SID of the Sync Service the resource is associated with.

url

The absolute URL of the Map Item 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.