Create a new Build resource
A collection of Function Versions, Asset Versions, Dependencies, and a Runtime that form a deployable unit.
Create a new Build resource. At least one function version or asset version is required.
Path parameters
-
The SID of the Service to create the Build resource under.
Body
-
AssetVersions array[string]
The list of Asset Version resource SIDs to include in the Build.
Minimum length of each is
34
, maximum length of each is34
. Format of each should match the following pattern:^ZN[0-9a-fA-F]{32}$
. -
Dependencies string
A list of objects that describe the Dependencies included in the Build. Each object contains the
name
andversion
of the dependency. -
FunctionVersions array[string]
The list of the Function Version resource SIDs to include in the Build.
Minimum length of each is
34
, maximum length of each is34
. Format of each should match the following pattern:^ZN[0-9a-fA-F]{32}$
. -
Runtime string
The Runtime version that will be used to run the Build resource when it is deployed.
curl \
-X POST https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'AssetVersions=string&Dependencies=string&FunctionVersions=string&Runtime=string'
{
"AssetVersions": [
"string"
],
"Dependencies": "string",
"FunctionVersions": [
"string"
],
"Runtime": "string"
}
{
"AssetVersions": [
"string"
],
"Dependencies": "string",
"FunctionVersions": [
"string"
],
"Runtime": "string"
}
{
"account_sid": "string",
"asset_versions": [],
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"dependencies": [],
"function_versions": [],
"links": {},
"runtime": "node8",
"service_sid": "string",
"sid": "string",
"status": "building",
"url": "https://example.com"
}
{
"account_sid": "string",
"asset_versions": [],
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"dependencies": [],
"function_versions": [],
"links": {},
"runtime": "node8",
"service_sid": "string",
"sid": "string",
"status": "building",
"url": "https://example.com"
}