你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Phone Numbers - Update Capabilities
更新电话号码的功能。
PATCH {endpoint}/phoneNumbers/{phoneNumber}/capabilities?api-version=2022-12-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string url |
|
phone
|
path | True |
string |
E.164 格式的电话号码 ID。 前导加可以是 + 或编码为 %2B,例如 +11234567890。 |
api-version
|
query | True |
string |
要调用的 API 版本 |
请求正文
Media Types: "application/merge-patch+json"
名称 | 类型 | 说明 |
---|---|---|
calling |
调用的功能值。 |
|
sms |
SMS 的功能值。 |
响应
名称 | 类型 | 说明 |
---|---|---|
202 Accepted |
该服务已接受请求,稍后将开始处理。 它将立即返回“Accepted”,并包含“Operation-Location”和“Location”标头。 客户端应使用“Operation-Location”标头中指定的 URL 进一步查询操作状态。 操作使用“位置”标头中指定的 URL 成功完成查询最终结果时。 标头
|
|
Other Status Codes |
失败 |
示例
Update phoneNumber capabilities
示例请求
PATCH https://resourcename.communication.azure.com//phoneNumbers/+14792000102/capabilities?api-version=2022-12-01
{
"calling": "inbound+outbound",
"sms": "none"
}
示例响应
Operation-Location: /phoneNumbers/operations/capabilities_378ddf60-81be-452a-ba4f-613198ea6c28
Location: /phoneNumbers/%2b14792000102
operation-id: capabilities_378ddf60-81be-452a-ba4f-613198ea6c28
capabilities-id: 378ddf60-81be-452a-ba4f-613198ea6c28
{
"id": "14792000102",
"phoneNumber": "+14792000102",
"countryCode": "US",
"assignmentType": "person",
"phoneNumberType": "geographic",
"capabilities": {
"calling": "inbound+outbound",
"sms": "none"
},
"purchaseDate": "2020-11-19T16:31:49.048Z",
"cost": {
"amount": 0.8,
"currencyCode": "USD",
"billingFrequency": "monthly"
}
}
定义
名称 | 说明 |
---|---|
Billing |
费用计费的频率。 |
Communication |
通信服务错误。 |
Communication |
通信服务错误。 |
Phone |
表示产品/服务的分配类型。 |
Phone |
电话号码的功能。 |
Phone |
电话号码的功能。 |
Phone |
调用的功能值。 |
Phone |
单个电话号码产生的成本。 |
Phone |
表示产品/服务的数量类型。 |
Purchased |
表示购买的电话号码。 |
BillingFrequency
费用计费的频率。
名称 | 类型 | 说明 |
---|---|---|
monthly |
string |
CommunicationError
通信服务错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
有关导致此错误的特定错误的更多详细信息。 |
|
innererror |
内部错误(如果有)。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
CommunicationErrorResponse
通信服务错误。
名称 | 类型 | 说明 |
---|---|---|
error |
通信服务错误。 |
PhoneNumberAssignmentType
表示产品/服务的分配类型。
名称 | 类型 | 说明 |
---|---|---|
application |
string |
|
person |
string |
PhoneNumberCapabilities
电话号码的功能。
名称 | 类型 | 说明 |
---|---|---|
calling |
调用的功能值。 |
|
sms |
SMS 的功能值。 |
PhoneNumberCapabilitiesRequest
电话号码的功能。
名称 | 类型 | 说明 |
---|---|---|
calling |
调用的功能值。 |
|
sms |
SMS 的功能值。 |
PhoneNumberCapabilityType
调用的功能值。
名称 | 类型 | 说明 |
---|---|---|
inbound |
string |
|
inbound+outbound |
string |
|
none |
string |
|
outbound |
string |
PhoneNumberCost
单个电话号码产生的成本。
名称 | 类型 | 说明 |
---|---|---|
amount |
number |
成本金额。 |
billingFrequency |
费用计费的频率。 |
|
currencyCode |
string |
成本金额的 ISO 4217 货币代码,例如美元。 |
PhoneNumberType
表示产品/服务的数量类型。
名称 | 类型 | 说明 |
---|---|---|
geographic |
string |
|
tollFree |
string |
PurchasedPhoneNumber
表示购买的电话号码。
名称 | 类型 | 说明 |
---|---|---|
assignmentType |
电话号码的分配类型。 可将电话号码分配给人员或应用程序。 |
|
capabilities |
电话号码的功能。 |
|
cost |
单个电话号码产生的成本。 |
|
countryCode |
string |
电话号码国家/地区的 ISO 3166-2 代码,例如美国。 |
id |
string |
电话号码的 ID,例如11234567890。 |
phoneNumber |
string |
电话号码的 E.164 格式字符串,例如 +11234567890。 |
phoneNumberType |
电话号码的类型,例如地理,tollFree。 |
|
purchaseDate |
string |
电话号码的购买日期和时间。 |