Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Build

Builds are packages of Functions and Assets that you bundle together for deployment. Builds contain Function Version SIDs, Asset Version SIDs, and dependencies. Dependencies are Node.js packages from NPM.

Dependencies are defined as JSON strings, for example:

let dependencies = `[{"name": "randomcolor","version":"0.5.4" },
 {"name": "util","version":"0.10.3" },
 {"name": "xmldom","version":"0.1.27" },
 {"name": "got","version":"6.7.1" },
 {"name": "fs","version":"0.0.1-security" },
 {"name": "lodash","version":"4.17.11" },
 {"name": "date-fns","version":"1.30.1" }]`

Builds take time to package, deploy and be verified. After creating a build, it is best to poll every 1 second to check the build status. When a build is verified, it is ready to be used in a Deployment.

List of build statuses

Build Status

Meaning

Queued A build request has been queued to be picked and deployed.
Building Build request being processed by the packager.
デプロイ New package is being uploaded.
Deployed Package successfully deployed.
検証済み We have run a health check on the uploaded package and verified it.
失敗 Packaging has failed at any of the above step.

Build properties

Names in PHP format
sid
sid<ZB> Not PII

The unique SID identifier of this Build.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account that owns this Build.

serviceSid
sid<ZS> Not PII

The unique SID identifier of the Service for this Build.

status
enum:status Not PII

The current state of the Build. One of building, completed, or failed.

assetVersions
object[] Not PII

The list of Asset Version Sids that are included in this Build.

functionVersions
object[] Not PII

The list of Function Version Sids that are included in this Build.

dependencies
object[] Not PII

The list of Dependencies that are included in this Build, each described by a name and a version in a JSON object.

dateCreated
date_time<iso8601> Not PII

The date that this Build was created, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this Build was updated, given in ISO 8601 format.

url
url Not PII

The URL of this Build.

Create a Build resource

post
https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds
パラメーター
Names in None format
service_sid
必須
post sid_like<ZS> Not PII

The unique SID identifier of the Service for this Build.

asset_versions
オプション
post sid<ZN>[] Not PII

The list of Asset Version Sids that are included in this Build. Optional.

function_versions
オプション
post sid<ZN>[] Not PII

The list of Function Version Sids that are included in this Build. Optional.

dependencies
オプション
post 文字列 Not PII

The list of Dependencies that are included in this Build, each described by a name and a version in a JSON object. Optional.

        
        
        
        

        Fetch a Build resource

        GET
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds/{Sid}
        パラメーター
        Names in None format
        service_sid
        必須
        GET sid_like<ZS> Not PII

        The unique SID identifier of the Service for this Build.

        sid
        必須
        GET sid<ZB> Not PII

        The unique SID identifier of this Build.

              
              
              
              

              Read multiple Build resources

              GET
              https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds
              パラメーター
              Names in None format
              service_sid
              必須
              GET sid_like<ZS> Not PII

              The unique SID identifier of the Service for these Builds.

                    
                    
                    
                    

                    Delete a Build resource

                    削除する
                    https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds/{Sid}
                    パラメーター
                    Names in None format
                    service_sid
                    必須
                    削除する sid_like<ZS> Not PII

                    The unique SID identifier of the Service for the Build.

                    sid
                    必須
                    削除する sid<ZB> Not PII

                    The unique SID identifier of this Build.

                          
                          
                          
                          
                          Rate this page:

                          ヘルプが必要ですか?

                          誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。