ConnectionPolicyTarget Resource
The ConnectionPolicyTarget
resource describes the individual URI entries that make up the BYOC Origination ConnectionPolicies list.
ConnectionPolicyTarget properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the Target resource. |
connection_policy_sid
|
The SID of the Connection Policy that owns the Target. |
sid
|
The unique string that we created to identify the Target resource. |
friendly_name
|
The string that you assigned to describe the resource. |
target
|
The SIP address you want Twilio to route your calls to. This must be a |
priority
|
The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. |
weight
|
The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. |
enabled
|
Whether the target is enabled. The default is |
date_created
|
The date and time in GMT when the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in RFC 2822 format. |
url
|
The absolute URL of the resource. |
Create a ConnectionPolicyTarget resource
https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets
Parameters
Parameters in REST API format | |
---|---|
connection_policy_sid
Path
|
The SID of the Connection Policy that owns the Target. |
target
Required
|
The SIP address you want Twilio to route your calls to. This must be a |
friendly_name
Optional
|
A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. |
priority
Optional
|
The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. |
weight
Optional
|
The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. |
enabled
Optional
|
Whether the Target is enabled. The default is |
Example 1
Fetch a ConnectionPolicyTarget resource
https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
Parameters
Parameters in REST API format | |
---|---|
connection_policy_sid
Path
|
The SID of the Connection Policy that owns the Target. |
sid
Path
|
The unique string that we created to identify the Target resource to fetch. |
Example 1
Read multiple ConnectionPolicyTarget resources
https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets
Parameters
Parameters in REST API format | |
---|---|
connection_policy_sid
Path
|
The SID of the Connection Policy from which to read the Targets. |
Example 1
Update a ConnectionPolicyTarget resource
https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
Parameters
Parameters in REST API format | |
---|---|
connection_policy_sid
Path
|
The SID of the Connection Policy that owns the Target. |
sid
Path
|
The unique string that we created to identify the Target resource to update. |
friendly_name
Optional
|
A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. |
target
Optional
|
The SIP address you want Twilio to route your calls to. This must be a |
priority
Optional
|
The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target. |
weight
Optional
|
The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. |
enabled
Optional
|
Whether the Target is enabled. |
Example 1
Delete a ConnectionPolicyTarget resource
https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
Parameters
Parameters in REST API format | |
---|---|
connection_policy_sid
Path
|
The SID of the Connection Policy that owns the Target. |
sid
Path
|
The unique string that we created to identify the Target resource to delete. |
Example 1
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.