Create a new Build resource. At least one function version or asset version is required.
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.
Body
-
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}$
. -
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}$
. -
A list of objects that describe the Dependencies included in the Build. Each object contains the
name
andversion
of the dependency. -
The Runtime version that will be used to run the Build resource when it is deployed.
curl \
--request POST 'https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Dependencies=%5B%7B%22name%22%3A%22twilio%22%2C+%22version%22%3A%223.29.2%22%7D%2C+%7B%22name%22%3A%22%40twilio%2Fruntime-handler%22%2C+%22version%22%3A+%221.0.1%22%7D%5D&AssetVersions=ZN00000000000000000000000000000000&FunctionVersions=ZN00000000000000000000000000000001'
{"Dependencies"=>"[{\"name\":\"twilio\", \"version\":\"3.29.2\"}, {\"name\":\"@twilio/runtime-handler\", \"version\": \"1.0.1\"}]", "AssetVersions"=>["ZN00000000000000000000000000000000"], "FunctionVersions"=>["ZN00000000000000000000000000000001"]}
{
"sid": "ZB00000000000000000000000000000000",
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
"links": {
"build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
},
"status": "building",
"runtime": "node22",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ZS00000000000000000000000000000000",
"date_created": "2018-11-10T20:00:00Z",
"date_updated": "2018-11-10T20:00:00Z",
"dependencies": [
{
"name": "twilio",
"version": "3.29.2"
},
{
"name": "@twilio/runtime-handler",
"version": "1.0.1"
}
],
"asset_versions": [
{
"sid": "ZN00000000000000000000000000000000",
"path": "/asset-path",
"asset_sid": "ZH00000000000000000000000000000000",
"visibility": "PUBLIC",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ZS00000000000000000000000000000000",
"date_created": "2018-11-10T20:00:00Z"
}
],
"function_versions": [
{
"sid": "ZN00000000000000000000000000000001",
"path": "/function-path",
"visibility": "PUBLIC",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ZS00000000000000000000000000000000",
"date_created": "2018-11-10T20:00:00Z",
"function_sid": "ZH00000000000000000000000000000001"
}
]
}