NAME
Twilio::Rest::Serverless::V1::Service - The Service resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $service = $client->serverless->v1->services->create($unique_name, $friendly_name, \%options);
for my $service ($client->serverless->v1->services->read({}, 20)) {
...
}
my $service = $client->serverless->v1->services($sid)->fetch;
$client->serverless->v1->services($sid)->update(\%options);
$client->serverless->v1->services($sid)->delete;
DESCRIPTION
The top-level resource for a Serverless application, which serves as a container for the application environments.
This file holds ServiceList, ServicePage, ServiceContext and ServiceInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
ServiceList
Returned by $client->serverless->v1->services. See also Twilio::ListResource.
create
my $service = $client->serverless->v1->services->create($unique_name, $friendly_name, \%options);
Create a new Service resource. Returns a ServiceInstance.
The required values are:
$unique_name-
A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the
sidin the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. $friendly_name-
A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
The options are:
include_credentials-
Whether to inject Account credentials into a function invocation context. The default value is
true. ui_editable-
Whether the Service's properties and subresources can be edited via the UI. The default value is
false.
read
my @records = $client->serverless->v1->services->read(\%options, $limit, $page_size);
Retrieve a list of all Services. Returns the records as a list, fetching as many pages as it needs.
stream
my $stream = $client->serverless->v1->services->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->serverless->v1->services->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->serverless->v1->services->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->serverless->v1->services->get_context($sid);
Returns a ServiceContext, and makes no request.
ServicePage
A Twilio::Page of ServiceInstance objects.
records_key
build_instance
Used by Twilio::Page.
ServiceContext
Returned by $client->serverless->v1->services($sid). It makes no request until one of these methods is called.
fetch
my $service = $client->serverless->v1->services($sid)->fetch;
Retrieve a specific Service resource. Returns a ServiceInstance.
update
my $service = $client->serverless->v1->services($sid)->update(\%options);
Update a specific Service resource. Returns a ServiceInstance.
The options are:
friendly_name-
A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
include_credentials-
Whether to inject Account credentials into a function invocation context.
ui_editable-
Whether the Service resource's properties and subresources can be edited via the UI. The default value is
false.
delete
$client->serverless->v1->services($sid)->delete;
Delete a Service resource. Returns true.
assets
my $list = $object->assets;
my $context = $object->assets($sid);
See Twilio::Rest::Serverless::V1::Service::Asset.
builds
my $list = $object->builds;
my $context = $object->builds($sid);
See Twilio::Rest::Serverless::V1::Service::Build.
environments
my $list = $object->environments;
my $context = $object->environments($sid);
See Twilio::Rest::Serverless::V1::Service::Environment.
functions
my $list = $object->functions;
my $context = $object->functions($sid);
See Twilio::Rest::Serverless::V1::Service::Function.
ServiceInstance
See also Twilio::InstanceResource.
It has fetch, update, delete, assets, builds, environments and functions, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Service resource.
- date_created
-
The date and time in GMT when the Service 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 Service resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- domain_base
-
The base domain name for this Service, which is a combination of the unique name and a randomly generated string.
- friendly_name
-
The string that you assigned to describe the Service resource.
- include_credentials
-
Whether to inject Account credentials into a function invocation context.
- links
-
The URLs of the Service's nested resources.
- sid
-
The unique string that we created to identify the Service resource.
- ui_editable
-
Whether the Service resource's properties and subresources can be edited via the UI.
- unique_name
-
A user-defined string that uniquely identifies the Service resource. It can be used in place of the Service resource's
sidin the URL to address the Service resource. - url
-
The absolute URL of the Service 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.