NAME
Twilio::Rest::Serverless::V1::Service::Build - The Build resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $build = $client->serverless->v1->services($service_sid)->builds->create(\%options);
for my $build ($client->serverless->v1->services($service_sid)->builds->read({}, 20)) {
...
}
my $build = $client->serverless->v1->services($service_sid)->builds($sid)->fetch;
$client->serverless->v1->services($service_sid)->builds($sid)->delete;
DESCRIPTION
A collection of Function Versions, Asset Versions, Dependencies, and a Runtime that form a deployable unit.
This file holds BuildList, BuildPage, BuildContext and BuildInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
BuildList
Returned by $client->serverless->v1->services($service_sid)->builds. See also Twilio::ListResource.
create
my $build = $client->serverless->v1->services($service_sid)->builds->create(\%options);
Create a new Build resource. At least one function version or asset version is required. Returns a BuildInstance.
The options are:
asset_versions-
The list of Asset Version resource SIDs to include in the Build. An array reference.
dependencies-
A list of objects that describe the Dependencies included in the Build. Each object contains the
nameandversionof the dependency. function_versions-
The list of the Function Version resource SIDs to include in the Build. An array reference.
runtime-
The Runtime version that will be used to run the Build resource when it is deployed.
read
my @records = $client->serverless->v1->services($service_sid)->builds->read(\%options, $limit, $page_size);
Retrieve a list of all Builds. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->serverless->v1->services($service_sid)->builds->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->serverless->v1->services($service_sid)->builds->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->serverless->v1->services($service_sid)->builds->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->serverless->v1->services($service_sid)->builds->get_context($sid);
Returns a BuildContext, and makes no request.
BuildPage
A Twilio::Page of BuildInstance objects.
records_key
build_instance
Used by Twilio::Page.
BuildContext
Returned by $client->serverless->v1->services($service_sid)->builds($sid). It makes no request until one of these methods is called.
fetch
my $build = $client->serverless->v1->services($service_sid)->builds($sid)->fetch;
Retrieve a specific Build resource. Returns a BuildInstance.
delete
$client->serverless->v1->services($service_sid)->builds($sid)->delete;
Delete a Build resource. Returns true.
build_status
my $context = $object->build_status;
See Twilio::Rest::Serverless::V1::Service::Build::BuildStatus.
BuildInstance
See also Twilio::InstanceResource.
It has fetch, delete and build_status, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Build resource.
- asset_versions
-
The list of Asset Version resource SIDs that are included in the Build.
- date_created
-
The date and time in GMT when the Build resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- date_updated
-
The date and time in GMT when the Build resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- dependencies
-
A list of objects that describe the Dependencies included in the Build. Each object contains the
nameandversionof the dependency. - function_versions
-
The list of Function Version resource SIDs that are included in the Build.
- links
-
No description in the specification.
- runtime
-
One of
node8,node10,node12,node14,node16,node18,node20,node22ornode24. - service_sid
-
The SID of the Service that the Build resource is associated with.
- sid
-
The unique string that we created to identify the Build resource.
- status
-
One of
building,completedorfailed. - url
-
The absolute URL of the Build 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.