Update connection policy target
Network element entry points into your communications infrastructure
Path parameters
-
The SID of the Connection Policy that owns the Target.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^NY[0-9a-fA-F]{32}$
. -
The unique string that we created to identify the Target resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^NE[0-9a-fA-F]{32}$
.
Body
-
A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
-
The SIP address you want Twilio to route your calls to. This must be a
sip:
schema.sips
is NOT supported. -
The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target.
-
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.
-
Whether the Target is enabled.
curl \
--request POST 'https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Target=sip%3Asip-updated.com%3A4321&Weight=10&Enabled=false&Priority=2&FriendlyName=updated_name'
{"Target"=>"sip:sip-updated.com:4321", "Weight"=>10, "Enabled"=>false, "Priority"=>2, "FriendlyName"=>"updated_name"}
{
"sid": "NEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://voice.twilio.com/v1/ConnectionPolicies/NYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Targets/NEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"target": "sip:sip-updated.com:4321",
"weight": 10,
"enabled": false,
"priority": 2,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2020-03-18T23:31:36Z",
"date_updated": "2020-03-18T23:31:37Z",
"friendly_name": "updated_name",
"connection_policy_sid": "NYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}