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

IFunctionsOperations.TestWithHttpMessagesAsync 方法

定义

测试为函数提供的信息是否有效。 这可以包括测试与函数背后的基础 Web 服务的连接,或确保提供的函数代码在语法上正确。

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.StreamAnalytics.Models.ResourceTestStatus>> TestWithHttpMessagesAsync (string resourceGroupName, string jobName, string functionName, Microsoft.Azure.Management.StreamAnalytics.Models.Function function = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member TestWithHttpMessagesAsync : string * string * string * Microsoft.Azure.Management.StreamAnalytics.Models.Function * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.StreamAnalytics.Models.ResourceTestStatus>>
Public Function TestWithHttpMessagesAsync (resourceGroupName As String, jobName As String, functionName As String, Optional function As Function = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of ResourceTestStatus))

参数

resourceGroupName
String

资源组的名称。 此名称不区分大小写。

jobName
String

流式处理作业的名称。

functionName
String

函数的名称。

function
Function

如果指定的函数尚不存在,则此参数必须包含要测试的完整函数定义。 如果指定的函数已存在,则此参数可以为 null 以按原样测试现有函数,或者如果指定,指定的属性将覆盖现有函数中的相应属性 (与 PATCH 操作) 完全相同,生成的函数将进行测试。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

例外

当操作返回无效状态代码时引发

当操作返回无效状态代码时引发

无法反序列化响应时引发

当所需参数为 null 时引发

适用于