メニュー

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?

関数

Functions are JavaScript Node.js code that execute at a particular domain.

The steps to create Functions are as follows:

  1. Create a Function (this resource)
  2. Create a Function Version via serverless-upload.twilio.com

We will need the Function Version SID to include this Function in a Build.

Function properties

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

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Function resource.

service_sid
sid<ZS> Not PII

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

friendly_name
文字列 PII MTL: 7 DAYS

The string that you assigned to describe the Function resource.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

url
url Not PII

The absolute URL of the Function resource.

links
uri_map Not PII

The URLs of nested resources of the function.

Create a Function resource

post
https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions
パラメーター
Parameters in REST API format
service_sid
Path
post sid_like<ZS> Not PII

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

friendly_name
必須
post 文字列 PII MTL: 7 DAYS

A descriptive string that you create to describe the Function resource. It can be up to 255 characters long.

例 1
        
        
        
        

        Fetch a Function resource

        GET
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions/{Sid}
        パラメーター
        Parameters in REST API format
        service_sid
        Path
        GET sid_like<ZS> Not PII

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

        sid
        Path
        GET sid<ZH> Not PII

        The SID of the Function resource to fetch.

        例 1
              
              
              
              

              Read multiple Function resources

              GET
              https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions
              パラメーター
              Parameters in REST API format
              service_sid
              Path
              GET sid_like<ZS> Not PII

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

              例 1
                    
                    
                    
                    

                    Update a Function resource

                    post
                    https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions/{Sid}
                    パラメーター
                    Parameters in REST API format
                    service_sid
                    Path
                    post sid_like<ZS> Not PII

                    The SID of the Service to update the Function resource from.

                    sid
                    Path
                    post sid<ZH> Not PII

                    The SID of the Function resource to update.

                    friendly_name
                    必須
                    post 文字列 PII MTL: 7 DAYS

                    A descriptive string that you create to describe the Function resource. It can be up to 255 characters long.

                    例 1
                          
                          
                          
                          

                          Delete a Function resource

                          削除する
                          https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions/{Sid}
                          パラメーター
                          Parameters in REST API format
                          service_sid
                          Path
                          削除する sid_like<ZS> Not PII

                          The SID of the Service to delete the Function resource from.

                          sid
                          Path
                          削除する sid<ZH> Not PII

                          The SID of the Function resource to delete.

                          例 1
                                
                                
                                
                                
                                Rate this page:

                                ヘルプが必要ですか?

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