NAME
Twilio::Rest::IpMessaging::V1::Service::Role - The Role resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $role = $client->ip_messaging->v1->services($service_sid)->roles->create($friendly_name, $type, $permission);
for my $role ($client->ip_messaging->v1->services($service_sid)->roles->read({}, 20)) {
...
}
my $role = $client->ip_messaging->v1->services($service_sid)->roles($sid)->fetch;
$client->ip_messaging->v1->services($service_sid)->roles($sid)->update($permission);
$client->ip_messaging->v1->services($service_sid)->roles($sid)->delete;
DESCRIPTION
This file holds RoleList, RolePage, RoleContext and RoleInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
RoleList
Returned by $client->ip_messaging->v1->services($service_sid)->roles. See also Twilio::ListResource.
create
my $role = $client->ip_messaging->v1->services($service_sid)->roles->create($friendly_name, $type, $permission);
Returns a RoleInstance.
The required values are:
$friendly_name-
No description in the specification.
$type-
One of
channelordeployment. $permission-
An array reference.
read
my @records = $client->ip_messaging->v1->services($service_sid)->roles->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->ip_messaging->v1->services($service_sid)->roles->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->ip_messaging->v1->services($service_sid)->roles->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->ip_messaging->v1->services($service_sid)->roles->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->ip_messaging->v1->services($service_sid)->roles->get_context($sid);
Returns a RoleContext, and makes no request.
RolePage
A Twilio::Page of RoleInstance objects.
records_key
build_instance
Used by Twilio::Page.
RoleContext
Returned by $client->ip_messaging->v1->services($service_sid)->roles($sid). It makes no request until one of these methods is called.
fetch
my $role = $client->ip_messaging->v1->services($service_sid)->roles($sid)->fetch;
Returns a RoleInstance.
update
my $role = $client->ip_messaging->v1->services($service_sid)->roles($sid)->update($permission);
Returns a RoleInstance.
The required values are:
delete
$client->ip_messaging->v1->services($service_sid)->roles($sid)->delete;
Returns true.
RoleInstance
See also Twilio::InstanceResource.
It has fetch, update and delete, which work as they do on the context.
Its fields are:
- account_sid
-
No description in the specification.
- date_created
-
A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- friendly_name
-
No description in the specification.
- permissions
-
No description in the specification.
- service_sid
-
No description in the specification.
- sid
-
No description in the specification.
- type
-
One of
channelordeployment. - url
-
No description in the specification.
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.