你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Phone Numbers - Get Operation

按其 ID 获取操作。

GET {endpoint}/phoneNumbers/operations/{operationId}?api-version=2022-12-01

URI 参数

名称 必需 类型 说明
endpoint
path True

string

url

通信资源,例如 https://resourcename.communication.azure.com

operationId
path True

string

操作的 ID

api-version
query True

string

要调用的 API 版本

响应

名称 类型 说明
200 OK

PhoneNumberOperation

操作完成后,使用响应标头中“Location”属性中指定的 URL 查询操作的最终结果。

标头

Location: string

Other Status Codes

CommunicationErrorResponse

失败

示例

Get long running operation status by operation id

示例请求

GET https://resourcename.communication.azure.com//phoneNumbers/operations/search-my-operation-id?api-version=2022-12-01

示例响应

Location: /availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28
{
  "status": "succeeded",
  "resourceLocation": "/availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28",
  "createdDateTime": "2020-11-19T16:31:49.048Z",
  "id": "search-my-operation-id",
  "operationType": "search",
  "lastActionDateTime": "2020-11-19T22:31:49.048Z"
}

定义

名称 说明
CommunicationError

通信服务错误。

CommunicationErrorResponse

通信服务错误。

PhoneNumberOperation
PhoneNumberOperationStatus

操作状态。

PhoneNumberOperationType

操作类型,例如搜索

CommunicationError

通信服务错误。

名称 类型 说明
code

string

错误代码。

details

CommunicationError[]

有关导致此错误的特定错误的更多详细信息。

innererror

CommunicationError

内部错误(如果有)。

message

string

错误消息。

target

string

错误目标。

CommunicationErrorResponse

通信服务错误。

名称 类型 说明
error

CommunicationError

通信服务错误。

PhoneNumberOperation

名称 类型 说明
createdDateTime

string

创建操作的日期。

error

CommunicationError

通信服务错误。

id

string

操作 ID。

lastActionDateTime

string

更改操作的最近日期。

operationType

PhoneNumberOperationType

操作类型,例如搜索

resourceLocation

string

用于检索操作结果的 URL(如果有)。

status

PhoneNumberOperationStatus

操作状态。

PhoneNumberOperationStatus

操作状态。

名称 类型 说明
failed

string

notStarted

string

running

string

succeeded

string

PhoneNumberOperationType

操作类型,例如搜索

名称 类型 说明
purchase

string

releasePhoneNumber

string

search

string

updatePhoneNumberCapabilities

string