Service (サービス)
Services are containers for your environments. You may only need one Service with many environments. When you begin working on a new application, you will likely want to create a new Service.
The unique name of your service forms the first part of your Serverless domain and cannot be updated.
Service properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Service resource. |
account_sid
|
The SID of the Account that created the Service resource. |
friendly_name
|
The string that you assigned to describe the Service resource. |
unique_name
|
A user-defined string that uniquely identifies the Service resource. It can be used in place of the Service resource's |
include_credentials
|
Whether to inject Account credentials into a function invocation context. |
ui_editable
|
Whether the Service resource's properties and subresources can be edited via the UI. |
domain_base
|
The base domain name for this Service, which is a combination of the unique name and a randomly generated string. |
date_created
|
The date and time in GMT when the Service resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the Service resource was last updated specified in ISO 8601 format. |
url
|
The absolute URL of the Service resource. |
links
|
The URLs of the Service's nested resources. |
Create a Service resource
https://serverless.twilio.com/v1/Services
パラメーター
Parameters in REST API format | |
---|---|
unique_name
必須
|
A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the |
friendly_name
必須
|
A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. |
include_credentials
オプション
|
Whether to inject Account credentials into a function invocation context. The default value is |
ui_editable
オプション
|
Whether the Service's properties and subresources can be edited via the UI. The default value is |
例 1
Fetch a Service resource
https://serverless.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The |
例 1
Read multiple Service resources
https://serverless.twilio.com/v1/Services
例 1
Update a Service resource
https://serverless.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The |
include_credentials
オプション
|
Whether to inject Account credentials into a function invocation context. |
friendly_name
オプション
|
A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. |
ui_editable
オプション
|
Whether the Service resource's properties and subresources can be edited via the UI. The default value is |
例 1
Delete a Service resource
https://serverless.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The |
例 1
ヘルプが必要ですか?
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.