Deployment
Deployments let you set a particular Build to be live on a particular Environment.
Deployment properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Deployment resource. |
account_sid
|
The SID of the Account that created the Deployment resource. |
service_sid
|
The SID of the Service that the Deployment resource is associated with. |
environment_sid
|
The SID of the Environment for the Deployment. |
build_sid
|
The SID of the Build for the deployment. |
date_created
|
The date and time in GMT when the Deployment resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the Deployment resource was last updated specified in ISO 8601 format. |
url
|
The absolute URL of the Deployment resource. |
Create a Deployment resource
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to create the Deployment resource under. |
environment_sid
Path
|
The SID of the Environment for the Deployment. |
build_sid
Optional
|
The SID of the Build for the Deployment. |
Example 1
POST'ing to the deployment endpoint without a Build SID will delete any existing deployments in that Environment. Calls to Functions & Assets that were hosted by that Environment will result in 404s.
Example 2
Fetch a Deployment resource
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to fetch the Deployment resource from. |
environment_sid
Path
|
The SID of the Environment used by the Deployment to fetch. |
sid
Path
|
The SID that identifies the Deployment resource to fetch. |
Example 1
Read multiple Deployment resources
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the Service to read the Deployment resources from. |
environment_sid
Path
|
The SID of the Environment used by the Deployment resources to read. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.