你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Job Router Operations - Decline Job Offer
拒绝提供工作机会。
POST {endpoint}/routing/workers/{workerId}/offers/{offerId}:decline?api-version=2023-11-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string |
通信资源的 URI |
offer
|
path | True |
string |
产品/服务的 ID。 |
worker
|
path | True |
string |
辅助角色的 ID。 |
api-version
|
query | True |
string |
用于此操作的 API 版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
retryOfferAt |
string |
如果未提供 RetryOfferAt,则此作业将不会再次提供给拒绝此作业的辅助角色,除非该辅助角色已取消注册并重新注册。 如果提供了 RetryOfferAt 时间,则作业将在 UTC 的重试时间与符合条件的辅助角色重新匹配。 拒绝该作业的辅助角色也有资格在该时间获得该作业。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
object |
请求已成功。 |
Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
AadOauth2Auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
accessCode
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
令牌 URL:
https://login.microsoftonline.com/common/oauth2/token
作用域
名称 | 说明 |
---|---|
https://communication.azure.com/.default |
示例
Declines an offer to work on a job
示例请求
POST https://contoso.westus.communications.azure.com/routing/workers/DefaultWorker/offers/1d5896f3-8b54-40be-82d3-910323f5e2af:decline?api-version=2023-11-01
{
"retryOfferAt": "2023-05-26T00:00:00.0000000Z"
}
示例响应
{}
定义
名称 | 说明 |
---|---|
Azure. |
错误对象。 |
Azure. |
包含错误详细信息的响应。 |
Azure. |
包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。 |
Decline |
请求拒绝产品/服务的有效负载。 |
Azure.Core.Foundations.Error
错误对象。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码集之一。 |
details |
导致此报告错误的特定错误的详细信息数组。 |
|
innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
message |
string |
错误的人工可读表示形式。 |
target |
string |
错误的目标。 |
Azure.Core.Foundations.ErrorResponse
包含错误详细信息的响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
Azure.Core.Foundations.InnerError
包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码集之一。 |
innererror |
内部错误。 |
DeclineJobOfferOptions
请求拒绝产品/服务的有效负载。
名称 | 类型 | 说明 |
---|---|---|
retryOfferAt |
string |
如果未提供 RetryOfferAt,则此作业将不会再次提供给拒绝此作业的辅助角色,除非该辅助角色已取消注册并重新注册。 如果提供了 RetryOfferAt 时间,则作业将在 UTC 的重试时间与符合条件的辅助角色重新匹配。 拒绝该作业的辅助角色也有资格在该时间获得该作业。 |