Functions are JavaScript Node.js code that execute at a particular domain.
The steps to create Functions are as follows:
serverless.twilio.com
We will need the Function Version SID to include this Function in a Build.
sid
type: SID<ZH>The unique string that we created to identify the Function resource.
^ZH[0-9a-fA-F]{32}$
34
34
account_sid
type: SID<AC>The SID of the Account that created the Function resource.
^AC[0-9a-fA-F]{32}$
34
34
service_sid
type: SID<ZS>The SID of the Service that the Function resource is associated with.
^ZS[0-9a-fA-F]{32}$
34
34
friendly_name
type: stringThe string that you assigned to describe the Function resource. It can be a maximum of 255 characters.
date_created
type: string<date-time>The date and time in GMT when the Function resource was created specified in ISO 8601 format.
date_updated
type: string<date-time>The date and time in GMT when the Function resource was last updated specified in ISO 8601 format.
POST https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions
ServiceSid
type: stringThe SID of the Service to create the Function resource under.
FriendlyName
type: stringRequiredA descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters.
GET https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions/{Sid}
ServiceSid
type: stringThe SID of the Service to fetch the Function resource from.
Sid
type: SID<ZH>The SID of the Function resource to fetch.
^ZH[0-9a-fA-F]{32}$
34
34
GET https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions
ServiceSid
type: stringThe SID of the Service to read the Function resources from.
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions/{Sid}
ServiceSid
type: stringThe SID of the Service to update the Function resource from.
Sid
type: SID<ZH>The SID of the Function resource to update.
^ZH[0-9a-fA-F]{32}$
34
34
FriendlyName
type: stringRequiredA descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters.
DELETE https://serverless.twilio.com/v1/Services/{ServiceSid}/Functions/{Sid}
ServiceSid
type: stringThe SID of the Service to delete the Function resource from.
Sid
type: SID<ZH>The SID of the Function resource to delete.
^ZH[0-9a-fA-F]{32}$
34
34