Menu

Expand
Rate this page:

Deployment

Deployments let you set a particular Build to be live on a particular Environment.

Deployment properties

Resource Properties in REST API format
sid
sid<ZD> Not PII

The unique string that we created to identify the Deployment resource.

account_sid
sid<AC> Not PII

The SID of the Account that created the Deployment resource.

service_sid
sid<ZS> Not PII

The SID of the Service that the Deployment resource is associated with.

environment_sid
sid<ZE> Not PII

The SID of the Environment for the Deployment.

build_sid
sid<ZB> Not PII

The SID of the Build for the deployment.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the Deployment resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the Deployment resource was last updated specified in ISO 8601 format.

url
url Not PII

The absolute URL of the Deployment resource.

Create a Deployment resource

post
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments
Parameters
Parameters in REST API format
service_sid
Path
post sid_like<ZS> Not PII

The SID of the Service to create the Deployment resource under.

environment_sid
Path
post sid<ZE> Not PII

The SID of the Environment for the Deployment.

build_sid
Optional
post sid<ZB> Not PII

The SID of the Build for the Deployment.

Example 1
Loading Code Sample...
        
        

        Create a Deployment

        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
        Loading Code Sample...
              
              

              Clear all Deployments from an Environment

              Fetch a Deployment resource

              get
              https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}
              Parameters
              Parameters in REST API format
              service_sid
              Path
              get sid_like<ZS> Not PII

              The SID of the Service to fetch the Deployment resource from.

              environment_sid
              Path
              get sid<ZE> Not PII

              The SID of the Environment used by the Deployment to fetch.

              sid
              Path
              get sid<ZD> Not PII

              The SID that identifies the Deployment resource to fetch.

              Example 1
              Loading Code Sample...
                    
                    

                    Fetch Deployment

                    Read multiple Deployment resources

                    get
                    https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments
                    Parameters
                    Parameters in REST API format
                    service_sid
                    Path
                    get sid_like<ZS> Not PII

                    The SID of the Service to read the Deployment resources from.

                    environment_sid
                    Path
                    get sid<ZE> Not PII

                    The SID of the Environment used by the Deployment resources to read.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Read Deployment

                          Rate this page:

                          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.

                          Loading Code Sample...
                                
                                
                                

                                Thank you for your feedback!

                                Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                thanks-feedback-gif