Functions - Update
既存のストリーミング ジョブの下に既存の関数を更新します。 これは、ジョブまたは関数定義の残りの部分に影響を与えることなく、関数を部分的に更新 (つまり、1 つまたは 2 つのプロパティを更新) するために使用できます。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}?api-version=2020-03-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
function
|
path | True |
string |
関数の名前です。 |
job
|
path | True |
string |
ストリーミング ジョブの名前。 |
resource
|
path | True |
string |
リソース グループの名前。 名前の大文字と小文字は区別されます。 Regex pattern: |
subscription
|
path | True |
string |
ターゲット サブスクリプションの ID。 |
api-version
|
query | True |
string |
この操作に使用する API バージョン。 |
要求ヘッダー
名前 | 必須 | 型 | 説明 |
---|---|---|---|
If-Match |
string |
関数の ETag。 現在の関数を常に上書きするには、この値を省略します。 同時変更が誤って上書きされないように、最後に表示された ETag 値を指定します。 |
要求本文
名前 | 型 | 説明 |
---|---|---|
name |
string |
リソース名 |
properties | FunctionProperties: |
関数に関連付けられているプロパティ。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
関数が正常に更新されました。 Headers ETag: string |
|
Other Status Codes |
エラー。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントの借用 |
例
Update a Java |
Update an Azure ML function |
Update a JavaScript function
Sample Request
PATCH https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg1637/providers/Microsoft.StreamAnalytics/streamingjobs/sj8653/functions/function8197?api-version=2020-03-01
{
"properties": {
"type": "Scalar",
"properties": {
"binding": {
"type": "Microsoft.StreamAnalytics/JavascriptUdf",
"properties": {
"script": "function (a, b) { return a * b; }"
}
}
}
}
}
Sample Response
ETag: 94a512d5-2f59-4e39-b9c8-bca4abd74b7e
{
"id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg1637/providers/Microsoft.StreamAnalytics/streamingjobs/sj8653/functions/function8197",
"name": "function8197",
"type": "Microsoft.StreamAnalytics/streamingjobs/functions",
"properties": {
"type": "Scalar",
"properties": {
"inputs": [
{
"dataType": "Any"
}
],
"output": {
"dataType": "Any"
},
"binding": {
"type": "Microsoft.StreamAnalytics/JavascriptUdf",
"properties": {
"script": "function (a, b) { return a * b; }"
}
}
}
}
}
Update an Azure ML function
Sample Request
PATCH https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg7/providers/Microsoft.StreamAnalytics/streamingjobs/sj9093/functions/function588?api-version=2020-03-01
{
"properties": {
"type": "Scalar",
"properties": {
"binding": {
"type": "Microsoft.MachineLearning/WebService",
"properties": {
"batchSize": 5000
}
}
}
}
}
Sample Response
ETag: 281cbf11-cd50-4a44-b833-cf170ce74748
{
"id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg7/providers/Microsoft.StreamAnalytics/streamingjobs/sj9093/functions/function588",
"name": "function588",
"type": "Microsoft.StreamAnalytics/streamingjobs/functions",
"properties": {
"type": "Scalar",
"properties": {
"inputs": [
{
"dataType": "nvarchar(max)"
}
],
"output": {
"dataType": "nvarchar(max)"
},
"binding": {
"type": "Microsoft.MachineLearning/WebService",
"properties": {
"endpoint": "someAzureMLEndpointURL",
"inputs": {
"name": "input1",
"columnNames": [
{
"name": "tweet",
"dataType": "string",
"mapTo": 0
}
]
},
"outputs": [
{
"name": "Sentiment",
"dataType": "string"
}
],
"batchSize": 5000
}
}
}
}
}
定義
名前 | 説明 |
---|---|
Aggregate |
集計関数に関連付けられているプロパティ。 |
Azure |
Azure Machine Learning Web サービスへのバインド。 |
Azure |
Azure Machine Learning Web サービス エンドポイントの入力列について説明します。 |
Azure |
Azure Machine Learning Web サービス エンドポイントの入力。 |
Azure |
Azure Machine Learning Web サービス エンドポイントの出力列について説明します。 |
Error |
一般的なエラー表現。 |
Function |
名前付き関数に関連付けられているすべての情報を含む関数オブジェクト。 すべての関数はストリーミング ジョブの下に含まれます。 |
Function |
関数の 1 つの入力パラメーターについて説明します。 |
Function |
関数の出力について説明します。 |
Java |
JavaScript 関数へのバインド。 |
Scalar |
スカラー関数に関連付けられているプロパティ。 |
AggregateFunctionProperties
集計関数に関連付けられているプロパティ。
名前 | 型 | 説明 |
---|---|---|
etag |
string |
関数の現在のエンティティ タグ。 これは不透明な文字列です。 これを使用して、要求間でリソースが変更されたかどうかを検出できます。 また、オプティミスティック コンカレンシーの書き込み操作に対して、If-Match ヘッダーまたは If-None-Match ヘッダーで使用することもできます。 |
properties.binding | FunctionBinding: |
関数の物理バインディング。 たとえば、Azure Machine Learning Web サービスの場合、これはエンドポイントについて説明します。 |
properties.inputs |
関数の 1 つの入力パラメーターについて説明します。 |
|
properties.output |
関数の出力について説明します。 |
|
type |
string:
Aggregate |
関数の種類を示します。 |
AzureMachineLearningWebServiceFunctionBinding
Azure Machine Learning Web サービスへのバインド。
名前 | 型 | 説明 |
---|---|---|
properties.apiKey |
string |
Request-Response エンドポイントで認証するために使用される API キー。 |
properties.batchSize |
integer |
Azure ML RRS が要求を実行するたびに行の最大数を示す 1 から 10000 までの数値。 既定値は 1000 です。 |
properties.endpoint |
string |
Request-Response は、Azure Machine Learning Web サービスのエンドポイントを実行します。 詳細については、こちらを参照してください。 https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs |
properties.inputs |
Azure Machine Learning Web サービス エンドポイントの入力。 |
|
properties.outputs |
Azure Machine Learning Web サービス エンドポイントの実行からの出力の一覧。 |
|
type |
string:
Microsoft. |
関数バインドの種類を示します。 |
AzureMachineLearningWebServiceInputColumn
Azure Machine Learning Web サービス エンドポイントの入力列について説明します。
名前 | 型 | 説明 |
---|---|---|
dataType |
string |
入力列の (Azure Machine Learning でサポートされている) データ型。 有効な Azure Machine Learning データ型の一覧については、 を参照 https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx してください。 |
mapTo |
integer |
この入力がマップされる関数パラメーターの 0 から始まるインデックス。 |
name |
string |
入力列の名前。 |
AzureMachineLearningWebServiceInputs
Azure Machine Learning Web サービス エンドポイントの入力。
名前 | 型 | 説明 |
---|---|---|
columnNames |
Azure Machine Learning Web サービス エンドポイントの入力列の一覧。 |
|
name |
string |
入力の名前。 これは、エンドポイントの作成中に指定された名前です。 |
AzureMachineLearningWebServiceOutputColumn
Azure Machine Learning Web サービス エンドポイントの出力列について説明します。
名前 | 型 | 説明 |
---|---|---|
dataType |
string |
出力列の (Azure Machine Learning でサポートされている) データ型。 有効な Azure Machine Learning データ型の一覧については、 を参照 https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx してください。 |
name |
string |
出力列の名前。 |
Error
一般的なエラー表現。
名前 | 型 | 説明 |
---|---|---|
error |
エラー定義のプロパティ。 |
Function
名前付き関数に関連付けられているすべての情報を含む関数オブジェクト。 すべての関数はストリーミング ジョブの下に含まれます。
名前 | 型 | 説明 |
---|---|---|
id |
string |
リソース ID |
name |
string |
リソース名 |
properties | FunctionProperties: |
関数に関連付けられているプロパティ。 |
type |
string |
リソースの種類 |
FunctionInput
関数の 1 つの入力パラメーターについて説明します。
名前 | 型 | 説明 |
---|---|---|
dataType |
string |
関数入力パラメーターの (Azure Stream Analytics でサポートされている) データ型。 有効な Azure Stream Analytics データ型の一覧については、 https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx |
isConfigurationParameter |
boolean |
パラメーターが構成パラメーターであるかどうかを示すフラグ。 True を指定すると、この入力パラメーターは定数になります。 既定値は false です。 |
FunctionOutput
関数の出力について説明します。
名前 | 型 | 説明 |
---|---|---|
dataType |
string |
関数出力の (Azure Stream Analytics でサポートされている) データ型。 有効な Azure Stream Analytics データ型の一覧については、 https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx |
JavaScriptFunctionBinding
JavaScript 関数へのバインド。
名前 | 型 | 説明 |
---|---|---|
properties.script |
string |
1 つの関数定義を含む JavaScript コード。 例: 'function (x, y) { return x + y; }' |
type |
string:
Microsoft. |
関数バインドの種類を示します。 |
ScalarFunctionProperties
スカラー関数に関連付けられているプロパティ。
名前 | 型 | 説明 |
---|---|---|
etag |
string |
関数の現在のエンティティ タグ。 これは不透明な文字列です。 これを使用して、要求間でリソースが変更されたかどうかを検出できます。 また、オプティミスティック コンカレンシーの書き込み操作に対して、If-Match ヘッダーまたは If-None-Match ヘッダーで使用することもできます。 |
properties.binding | FunctionBinding: |
関数の物理バインディング。 たとえば、Azure Machine Learning Web サービスの場合、これはエンドポイントについて説明します。 |
properties.inputs |
関数の 1 つの入力パラメーターについて説明します。 |
|
properties.output |
関数の出力について説明します。 |
|
type |
string:
Scalar |
関数の種類を示します。 |