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

Endpoints - Suspend

挂起由给定 ID 标识的终结点。

POST {endpoint}/customvoice/endpoints/{id}:suspend?api-version=2023-12-01-preview

URI 参数

名称 必需 类型 说明
endpoint
path True

string

支持的认知服务终结点 (协议和主机名,例如: https://eastus.api.cognitive.microsoft.com) 。

id
path True

string

uuid

资源 ID,应为 UUID。

api-version
query True

string

要用于此操作的 API 版本。

请求头

名称 必需 类型 说明
Ocp-Apim-Subscription-Key True

string

在此处提供语音资源密钥。

Operation-Id

string

操作的状态监视器的 ID。 如果 Operation-Id 标头与现有操作匹配,并且请求与以前的请求不同,则失败并显示 400 错误请求。

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9._-]{1,62}[a-zA-Z0-9]$

响应

名称 类型 说明
202 Accepted

Endpoint

已接受

Headers

  • Operation-Id: string
  • Operation-Location: string
Other Status Codes

ErrorResponse

出现了错误。

安全性

Ocp-Apim-Subscription-Key

在此处提供语音资源密钥。

Type: apiKey
In: header

示例

Suspend an endpoint

Sample Request

POST {endpoint}/customvoice/endpoints/9f50c644-2121-40e9-9ea7-544e48bfe3cb:suspend?api-version=2023-12-01-preview


Sample Response

Operation-Location: https://eastus.api.cognitive.microsoft.com/customvoice/operations/23f53763-5f21-442a-a944-18f72cdcaa4f?api-version=2023-12-01-preview
Operation-Id: 23f53763-5f21-442a-a944-18f72cdcaa4f
{
  "id": "9f50c644-2121-40e9-9ea7-544e48bfe3cb",
  "description": "Endpoint for Jessica voice",
  "projectId": "Jessica",
  "modelId": "Jessica",
  "properties": {
    "kind": "HighPerformance"
  },
  "status": "Disabling",
  "createdDateTime": "2023-04-01T05:30:00.000Z",
  "lastActionDateTime": "2023-04-02T10:15:30.000Z"
}

定义

名称 说明
Endpoint

Endpoint 对象

EndpointKind

终结点类型

EndpointProperties

终结点属性

Error

顶级错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含一个顶级错误,其中包含错误代码、消息、详细信息、目标以及具有更多描述性详细信息的内部错误。

ErrorCode

顶级错误代码

ErrorResponse

错误响应遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

InnerError

内部错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含必需的属性错误代码、消息和可选属性目标、内部错误 (可以嵌套) 。

Status

资源的状态。

Endpoint

Endpoint 对象

名称 类型 说明
createdDateTime

string

创建对象的时间戳。 时间戳编码为 ISO 8601 日期和时间格式 (“YYYY-MM-DDThh:mm:ssZ”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) 。

description

string

终结点说明

displayName

string

终结点名称

id

string

终结点 ID

lastActionDateTime

string

输入当前状态时的时间戳。 时间戳编码为 ISO 8601 日期和时间格式 (“YYYY-MM-DDThh:mm:ssZ”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) 。

modelId

string

资源 ID

projectId

string

资源 ID

properties

EndpointProperties

终结点属性

status

Status

资源的状态。

EndpointKind

终结点类型

名称 类型 说明
FastResume

string

HighPerformance

string

EndpointProperties

终结点属性

名称 类型 说明
kind

EndpointKind

终结点类型

Error

顶级错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含一个顶级错误,其中包含错误代码、消息、详细信息、目标以及具有更多描述性详细信息的内部错误。

名称 类型 说明
code

ErrorCode

顶级错误代码

details

Error[]

有关错误和/或预期策略的其他支持详细信息。

innererror

InnerError

内部错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含必需的属性错误代码、消息和可选属性目标、内部错误 (可以嵌套) 。

message

string

顶级错误消息。

target

string

错误的源。 例如,如果模型无效,则为“model”或“model id”。

ErrorCode

顶级错误代码

名称 类型 说明
BadArgument

string

BadRequest

string

Forbidden

string

InternalServerError

string

NotFound

string

ServiceUnavailable

string

TooManyRequests

string

Unauthorized

string

UnsupportedMediaType

string

ErrorResponse

错误响应遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

名称 类型 说明
error

Error

顶级错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含一个顶级错误,其中包含错误代码、消息、详细信息、目标以及具有更多描述性详细信息的内部错误。

InnerError

内部错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含必需的属性错误代码、消息和可选属性目标、内部错误 (可以嵌套) 。

名称 类型 说明
code

string

帮助诊断的详细错误代码。

innererror

InnerError

内部错误遵循 Microsoft Azure REST API 指南,请参阅 https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 这包含必需的属性错误代码、消息和可选属性目标、内部错误 (可以嵌套) 。

message

string

详细的错误消息。

target

string

错误的源。 例如,如果模型无效,则为“model”或“model id”。

Status

资源的状态。

名称 类型 说明
Disabled

string

Disabling

string

Failed

string

NotStarted

string

Running

string

Succeeded

string