Functions - Retrieve Default Definition
根据指定的参数检索函数的默认定义。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/retrieveDefaultDefinition?api-version=2020-03-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
function
|
path | True |
string |
函数的名称。 |
job
|
path | True |
string |
流式处理作业的名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
资源组的名称。 名称不区分大小写。 |
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
请求正文
请求正文可以为下列任一内容:
名称 | 说明 |
---|---|
Azure |
检索 Azure 机器学习 Web 服务函数的默认函数定义所需的参数。 |
Java |
检索 JavaScript 函数的默认函数定义所需的参数。 |
AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters
检索 Azure 机器学习 Web 服务函数的默认函数定义所需的参数。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
bindingType | True |
string:
Microsoft. |
指示函数绑定类型。 |
bindingRetrievalProperties.executeEndpoint |
string |
Request-Response Azure 机器学习 Web 服务的执行终结点。 在此处了解详细信息:https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs |
|
bindingRetrievalProperties.udfType |
函数类型。 |
JavaScriptFunctionRetrieveDefaultDefinitionParameters
检索 JavaScript 函数的默认函数定义所需的参数。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
bindingType | True |
string:
Microsoft. |
指示函数绑定类型。 |
bindingRetrievalProperties.script |
string |
包含单个函数定义的 JavaScript 代码。 例如:“function (x, y) { return x + y; }”。 |
|
bindingRetrievalProperties.udfType |
函数类型。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
已成功检索函数的默认定义。 |
|
Other Status Codes |
错误。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Retrieve the default definition for an Azure ML function
示例请求
POST https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg7/providers/Microsoft.StreamAnalytics/streamingjobs/sj9093/functions/function588/retrieveDefaultDefinition?api-version=2020-03-01
{
"bindingType": "Microsoft.MachineLearning/WebService",
"bindingRetrievalProperties": {
"executeEndpoint": "someAzureMLExecuteEndpointUrl",
"udfType": "Scalar"
}
}
示例响应
{
"name": "function588",
"properties": {
"type": "Scalar",
"properties": {
"inputs": [
{
"dataType": "nvarchar(max)"
}
],
"output": {
"dataType": "nvarchar(max)"
},
"binding": {
"type": "Microsoft.MachineLearning/WebService",
"properties": {
"endpoint": "someAzureMLExecuteEndpointUrl",
"inputs": {
"name": "input1",
"columnNames": [
{
"name": "tweet",
"dataType": "string",
"mapTo": 0
}
]
},
"outputs": [
{
"name": "Sentiment",
"dataType": "string"
}
],
"batchSize": 1000
}
}
}
}
}
定义
名称 | 说明 |
---|---|
Aggregate |
与聚合函数关联的属性。 |
Azure |
绑定到 Azure 机器学习 Web 服务。 |
Azure |
检索 Azure 机器学习 Web 服务函数的默认函数定义所需的参数。 |
Azure |
描述 Azure 机器学习 Web 服务终结点的输入列。 |
Azure |
Azure 机器学习 Web 服务终结点的输入。 |
Azure |
描述 Azure 机器学习 Web 服务终结点的输出列。 |
Error |
常见的错误表示形式。 |
Function |
一个函数对象,包含与命名函数关联的所有信息。 所有函数都包含在流式处理作业下。 |
Function |
描述函数的一个输入参数。 |
Function |
描述函数的输出。 |
Java |
绑定到 JavaScript 函数。 |
Java |
检索 JavaScript 函数的默认函数定义所需的参数。 |
Scalar |
与标量函数关联的属性。 |
Udf |
函数类型。 |
AggregateFunctionProperties
与聚合函数关联的属性。
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
函数的当前实体标记。 这是一个不透明的字符串。 可以使用它来检测资源是否在请求之间发生了更改。 还可以在 If-Match 或 If-None-Match 标头中使用它,以便进行乐观并发的写入作。 |
properties.binding | FunctionBinding: |
函数的物理绑定。 例如,在 Azure 机器学习 Web 服务的情况下,这描述了终结点。 |
properties.inputs |
描述函数的一个输入参数。 |
|
properties.output |
描述函数的输出。 |
|
type |
string:
Aggregate |
指示函数的类型。 |
AzureMachineLearningWebServiceFunctionBinding
绑定到 Azure 机器学习 Web 服务。
名称 | 类型 | 说明 |
---|---|---|
properties.apiKey |
string |
用于对 Request-Response 终结点进行身份验证的 API 密钥。 |
properties.batchSize |
integer (int32) |
描述每个 Azure ML RRS 执行请求的最大行数的 1 到 10000 之间的数字。 默认值为 1000。 |
properties.endpoint |
string |
Request-Response Azure 机器学习 Web 服务的执行终结点。 在此处了解详细信息:https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs |
properties.inputs |
Azure 机器学习 Web 服务终结点的输入。 |
|
properties.outputs |
Azure 机器学习 Web 服务终结点执行的输出列表。 |
|
type |
string:
Microsoft. |
指示函数绑定类型。 |
AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters
检索 Azure 机器学习 Web 服务函数的默认函数定义所需的参数。
名称 | 类型 | 说明 |
---|---|---|
bindingRetrievalProperties.executeEndpoint |
string |
Request-Response Azure 机器学习 Web 服务的执行终结点。 在此处了解详细信息:https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs |
bindingRetrievalProperties.udfType |
函数类型。 |
|
bindingType |
string:
Microsoft. |
指示函数绑定类型。 |
AzureMachineLearningWebServiceInputColumn
描述 Azure 机器学习 Web 服务终结点的输入列。
名称 | 类型 | 说明 |
---|---|---|
dataType |
string |
输入列的 (Azure 机器学习支持)数据类型。 https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx 介绍了有效的 Azure 机器学习数据类型的列表。 |
mapTo |
integer (int32) |
此输入映射到的函数参数的从零开始的索引。 |
name |
string |
输入列的名称。 |
AzureMachineLearningWebServiceInputs
Azure 机器学习 Web 服务终结点的输入。
名称 | 类型 | 说明 |
---|---|---|
columnNames |
Azure 机器学习 Web 服务终结点的输入列列表。 |
|
name |
string |
输入的名称。 这是创作终结点时提供的名称。 |
AzureMachineLearningWebServiceOutputColumn
描述 Azure 机器学习 Web 服务终结点的输出列。
名称 | 类型 | 说明 |
---|---|---|
dataType |
string |
输出列的 (Azure 机器学习支持的)数据类型。 https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx 介绍了有效的 Azure 机器学习数据类型的列表。 |
name |
string |
输出列的名称。 |
Error
常见的错误表示形式。
名称 | 类型 | 说明 |
---|---|---|
error |
错误定义属性。 |
Function
一个函数对象,包含与命名函数关联的所有信息。 所有函数都包含在流式处理作业下。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID |
name |
string |
资源名称 |
properties | FunctionProperties: |
与函数关联的属性。 |
type |
string |
资源类型 |
FunctionInput
描述函数的一个输入参数。
名称 | 类型 | 说明 |
---|---|---|
dataType |
string |
函数输入参数的(支持 Azure 流分析)数据类型。 https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx 介绍了有效的 Azure 流分析数据类型列表 |
isConfigurationParameter |
boolean |
指示参数是否为配置参数的标志。 如此 如果此输入参数应为常量。 默认值为 false。 |
FunctionOutput
描述函数的输出。
名称 | 类型 | 说明 |
---|---|---|
dataType |
string |
函数输出的 (Azure 流分析支持)数据类型。 https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx 介绍了有效的 Azure 流分析数据类型列表 |
JavaScriptFunctionBinding
绑定到 JavaScript 函数。
名称 | 类型 | 说明 |
---|---|---|
properties.script |
string |
包含单个函数定义的 JavaScript 代码。 例如:“function (x, y) { return x + y; }' |
type |
string:
Microsoft. |
指示函数绑定类型。 |
JavaScriptFunctionRetrieveDefaultDefinitionParameters
检索 JavaScript 函数的默认函数定义所需的参数。
名称 | 类型 | 说明 |
---|---|---|
bindingRetrievalProperties.script |
string |
包含单个函数定义的 JavaScript 代码。 例如:“function (x, y) { return x + y; }”。 |
bindingRetrievalProperties.udfType |
函数类型。 |
|
bindingType |
string:
Microsoft. |
指示函数绑定类型。 |
ScalarFunctionProperties
与标量函数关联的属性。
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
函数的当前实体标记。 这是一个不透明的字符串。 可以使用它来检测资源是否在请求之间发生了更改。 还可以在 If-Match 或 If-None-Match 标头中使用它,以便进行乐观并发的写入作。 |
properties.binding | FunctionBinding: |
函数的物理绑定。 例如,在 Azure 机器学习 Web 服务的情况下,这描述了终结点。 |
properties.inputs |
描述函数的一个输入参数。 |
|
properties.output |
描述函数的输出。 |
|
type |
string:
Scalar |
指示函数的类型。 |
UdfType
函数类型。
值 | 说明 |
---|---|
Scalar |