你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
JobRouterClient.AcceptJobOfferAsync(String, String, CancellationToken) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
接受用于处理作业的提议,如果另一个代理已接受该作业,则返回 409/Conflict。
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.AcceptJobOfferResult>> AcceptJobOfferAsync (string workerId, string offerId, System.Threading.CancellationToken cancellationToken = default);
abstract member AcceptJobOfferAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.AcceptJobOfferResult>>
override this.AcceptJobOfferAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.AcceptJobOfferResult>>
Public Overridable Function AcceptJobOfferAsync (workerId As String, offerId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AcceptJobOfferResult))
参数
- workerId
- String
辅助角色的 ID。
- offerId
- String
作业套餐的 ID。
- cancellationToken
- CancellationToken
(可选) 要使用的取消令牌。
返回
例外
offerId
或 workerId
为 null。
服务器返回错误。 有关从服务器返回的详细信息,请参阅 Message 。