NAME
Twilio::Rest::Voice::V1::ConnectionPolicy - The ConnectionPolicy resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $connection_policy = $client->voice->v1->connection_policies->create(\%options);
for my $connection_policy ($client->voice->v1->connection_policies->read({}, 20)) {
...
}
my $connection_policy = $client->voice->v1->connection_policies($sid)->fetch;
$client->voice->v1->connection_policies($sid)->update(\%options);
$client->voice->v1->connection_policies($sid)->delete;
DESCRIPTION
Connection Policy for sending traffic to your communications infrastructure.
This file holds ConnectionPolicyList, ConnectionPolicyPage, ConnectionPolicyContext and ConnectionPolicyInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
ConnectionPolicyList
Returned by $client->voice->v1->connection_policies. See also Twilio::ListResource.
create
my $connection_policy = $client->voice->v1->connection_policies->create(\%options);
Returns a ConnectionPolicyInstance.
The options are:
friendly_name-
A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
read
my @records = $client->voice->v1->connection_policies->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->voice->v1->connection_policies->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->voice->v1->connection_policies->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->voice->v1->connection_policies->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->voice->v1->connection_policies->get_context($sid);
Returns a ConnectionPolicyContext, and makes no request.
ConnectionPolicyPage
A Twilio::Page of ConnectionPolicyInstance objects.
records_key
build_instance
Used by Twilio::Page.
ConnectionPolicyContext
Returned by $client->voice->v1->connection_policies($sid). It makes no request until one of these methods is called.
fetch
my $connection_policy = $client->voice->v1->connection_policies($sid)->fetch;
Returns a ConnectionPolicyInstance.
update
my $connection_policy = $client->voice->v1->connection_policies($sid)->update(\%options);
Returns a ConnectionPolicyInstance.
The options are:
friendly_name-
A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
delete
$client->voice->v1->connection_policies($sid)->delete;
Returns true.
targets
my $list = $object->targets;
my $context = $object->targets($sid);
See Twilio::Rest::Voice::V1::ConnectionPolicy::ConnectionPolicyTarget.
ConnectionPolicyInstance
See also Twilio::InstanceResource.
It has fetch, update, delete and targets, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Connection Policy resource.
- date_created
-
The date and time in GMT when the resource was created specified in RFC 2822 format. 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 RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- friendly_name
-
The string that you assigned to describe the resource.
- links
-
The URLs of related resources.
- sid
-
The unique string that we created to identify the Connection Policy resource.
- url
-
The absolute URL of the 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.