NAME

Twilio::Rest::Memory::V1::DataMapping - The DataMapping resource

SYNOPSIS

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

my $data_mapping = $client->memory->v1->data_mappings($store_id)->create(\%body);
for my $data_mapping ($client->memory->v1->data_mappings($store_id)->read({}, 20)) {
  ...
}
my $data_mapping = $client->memory->v1->data_mappings($store_id, $data_mapping_id)->fetch;
$client->memory->v1->data_mappings($store_id, $data_mapping_id)->patch(\%body, \%options);
$client->memory->v1->data_mappings($store_id, $data_mapping_id)->delete;

DESCRIPTION

This file holds DataMappingList, DataMappingPage, DataMappingContext, DataMappingInstance, CreateDataMapping202ResponseInstance, PatchDataMapping202ResponseInstance and DeleteDataMapping202ResponseInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

DataMappingList

Returned by $client->memory->v1->data_mappings($store_id). See also Twilio::ListResource.

create

my $data_mapping = $client->memory->v1->data_mappings($store_id)->create(\%body);

Create a new data mapping to connect an external data source to this Memory Store. For DATASET_CLOUDAPP and DATASET_WAREHOUSE types, validates that all mapped Trait Groups and traits exist and that dataset field data types match their respective mapped trait data types. Returns a CreateDataMapping202ResponseInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

description

A human readable description of this resource, up to 512 characters.

displayName

Required. No description in the specification.

isEnabled

Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.

mappingFrom

Required. No description in the specification.

mappingTo

Required. No description in the specification.

read

my @records = $client->memory->v1->data_mappings($store_id)->read(\%options, $limit, $page_size);

Get a list of data mappings configured for this Memory Store. Returns the records as a list, fetching as many pages as it needs.

The options are:

order_by

Either 'ASC' or 'DESC' to sort results ascending or descending respectively. One of ASC or DESC.

type

Filter data mappings by type. One of INGRESS, DATASET_CLOUDAPP or DATASET_WAREHOUSE.

stream

my $stream = $client->memory->v1->data_mappings($store_id)->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->memory->v1->data_mappings($store_id)->page(\%options, $page_size, $page_token);

Fetches one page, and returns a Twilio::TokenPaginationPage. This API pages by token, so there is no page number.

get_page

my $page = $client->memory->v1->data_mappings($store_id)->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->memory->v1->data_mappings($store_id)->get_context($data_mapping_id);

Returns a DataMappingContext, and makes no request.

DataMappingPage

A Twilio::Page of DataMappingInstance objects.

records_key

build_instance

Used by Twilio::Page.

DataMappingContext

Returned by $client->memory->v1->data_mappings($store_id, $data_mapping_id). It makes no request until one of these methods is called.

fetch

my $data_mapping = $client->memory->v1->data_mappings($store_id, $data_mapping_id)->fetch;

Retrieve the details of a specific data mapping by its unique ID. Returns a DataMappingInstance.

patch

my $data_mapping = $client->memory->v1->data_mappings($store_id, $data_mapping_id)->patch(\%body, \%options);

Partially update a data mapping. Only the fields provided in the request body will be updated, including replacing the entire contents of the mappings array. For DATASET_CLOUDAPP and DATASET_WAREHOUSE types, validates that all mapped Trait Groups and traits exist and that dataset field data types match their respective mapped trait data types. Returns a PatchDataMapping202ResponseInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

The options are:

if_match

Allows for optimistic concurrency control by making the request conditional. Server will only act if the resource's current Entity Tag (ETag) matches the one provided, preventing accidental overwrites.

delete

$client->memory->v1->data_mappings($store_id, $data_mapping_id)->delete;

Delete a data mapping from the Memory Store. This action cannot be undone. Returns a DeleteDataMapping202ResponseInstance.

DataMappingInstance

See also Twilio::InstanceResource.

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

Its fields are:

created_at

The ISO 8601 timestamp when the data mapping was created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

description

A human readable description of this resource, up to 512 characters.

display_name

No description in the specification.

id

The unique identifier for the data mapping.

is_enabled

Flag indicating whether the data mapping is active. When true, data will be ingested and mapped according to the configuration. When false, the data mapping will be inactive and no data will be ingested into the Memory Store.

mapping_from

No description in the specification.

mapping_to

No description in the specification.

updated_at

The ISO 8601 timestamp when the data mapping was last updated. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

version

The current version number of the DataMapping. Incremented on each successful update.

CreateDataMapping202ResponseInstance

Returned by create, for an answer that is not a DataMapping. See also Twilio::InstanceResource.

Its fields are:

message

No description in the specification.

status_url

URI to check operation status.

PatchDataMapping202ResponseInstance

Returned by patch, for an answer that is not a DataMapping. See also Twilio::InstanceResource.

Its fields are:

message

No description in the specification.

status_url

URI to check operation status.

DeleteDataMapping202ResponseInstance

Returned by delete, for an answer that is not a DataMapping. See also Twilio::InstanceResource.

Its fields are:

message

No description in the specification.

status_url

URI to check operation status.

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.