NAME
Twilio::Rest::Verify::V2::Service::RateLimit::Bucket - The Bucket resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $bucket = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->create($max, $interval);
for my $bucket ($client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->read({}, 20)) {
...
}
my $bucket = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid)->fetch;
$client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid)->update(\%options);
$client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid)->delete;
DESCRIPTION
This file holds BucketList, BucketPage, BucketContext and BucketInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
BucketList
Returned by $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets. See also Twilio::ListResource.
create
my $bucket = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->create($max, $interval);
Create a new Bucket for a Rate Limit. Returns a BucketInstance.
The required values are:
$max-
Maximum number of requests permitted in during the interval.
$interval-
Number of seconds that the rate limit will be enforced over.
read
my @records = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->read(\%options, $limit, $page_size);
Retrieve a list of all Buckets for a Rate Limit. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets->get_context($sid);
Returns a BucketContext, and makes no request.
BucketPage
A Twilio::Page of BucketInstance objects.
records_key
build_instance
Used by Twilio::Page.
BucketContext
Returned by $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid). It makes no request until one of these methods is called.
fetch
my $bucket = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid)->fetch;
Fetch a specific Bucket. Returns a BucketInstance.
update
my $bucket = $client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid)->update(\%options);
Update a specific Bucket. Returns a BucketInstance.
The options are:
interval-
Number of seconds that the rate limit will be enforced over.
max-
Maximum number of requests permitted in during the interval.
delete
$client->verify->v2->services($service_sid)->rate_limits($rate_limit_sid)->buckets($sid)->delete;
Delete a specific Bucket. Returns true.
BucketInstance
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 Rate Limit 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.
- interval
-
Number of seconds that the rate limit will be enforced over.
- max
-
Maximum number of requests permitted in during the interval.
- rate_limit_sid
-
The Twilio-provided string that uniquely identifies the Rate Limit resource.
- service_sid
-
The SID of the Service the resource is associated with.
- sid
-
A 34 character string that uniquely identifies this Bucket.
- url
-
The URL of this 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.