From 513ab7496cd4e9c1381df9273a49f40e2820b534 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 25 Mar 2022 03:14:43 +0000 Subject: [PATCH] CodeGen from PR 18305 in Azure/azure-rest-api-specs [Stream Analytics] Fix s360 for 2021 preview version (#18305) * Add blockchain to latest profile * Add additional types * add azure function * add authenticationMode to blob input, AzFunction and DW ex files * update api version in 2021 preview ex files * fix api version * fix password * try to run model validation again * update pe to readonly * 2021 preview features * fix validation errors * more fixes * add aggregate func, which should be GA * rename new refreshType object Co-authored-by: Mark Cowlishaw Co-authored-by: Roslyn Lu --- .../Microsoft.StreamAnalytics.json | 4 - .../2020-03-01/Microsoft.StreamAnalytics.json | 124 ++-- .../Microsoft.StreamAnalytics.json | 550 +++++++++++++++++- 3 files changed, 610 insertions(+), 68 deletions(-) diff --git a/schemas/2020-03-01-preview/Microsoft.StreamAnalytics.json b/schemas/2020-03-01-preview/Microsoft.StreamAnalytics.json index 190a036295..5a1bce6845 100644 --- a/schemas/2020-03-01-preview/Microsoft.StreamAnalytics.json +++ b/schemas/2020-03-01-preview/Microsoft.StreamAnalytics.json @@ -291,10 +291,6 @@ "privateLinkServiceId": { "type": "string", "description": "The resource id of the private link service. Required on PUT (CreateOrUpdate) requests." - }, - "requestMessage": { - "type": "string", - "description": "A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars." } }, "description": "Bag of properties defining a privatelinkServiceConnection." diff --git a/schemas/2020-03-01/Microsoft.StreamAnalytics.json b/schemas/2020-03-01/Microsoft.StreamAnalytics.json index 7660dce6a4..687b79042a 100644 --- a/schemas/2020-03-01/Microsoft.StreamAnalytics.json +++ b/schemas/2020-03-01/Microsoft.StreamAnalytics.json @@ -368,6 +368,21 @@ } }, "definitions": { + "AggregateFunctionProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Aggregate" + ] + } + }, + "required": [ + "type" + ], + "description": "The properties that are associated with an aggregate function." + }, "AvroSerialization": { "type": "object", "properties": { @@ -1688,6 +1703,46 @@ "properties": {}, "description": "The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint." }, + "FunctionConfiguration": { + "type": "object", + "properties": { + "binding": { + "oneOf": [ + { + "$ref": "#/definitions/FunctionBinding" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint." + }, + "inputs": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/FunctionInput" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "output": { + "oneOf": [ + { + "$ref": "#/definitions/FunctionOutput" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes the output of a function." + } + } + }, "FunctionInput": { "type": "object", "properties": { @@ -1724,9 +1779,23 @@ "oneOf": [ { "$ref": "#/definitions/ScalarFunctionProperties" + }, + { + "$ref": "#/definitions/AggregateFunctionProperties" } ], - "properties": {}, + "properties": { + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/FunctionConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + } + }, "description": "The properties that are associated with a function." }, "Identity": { @@ -2306,62 +2375,9 @@ ], "description": "The properties that are associated with an input containing reference data." }, - "ScalarFunctionConfiguration": { - "type": "object", - "properties": { - "binding": { - "oneOf": [ - { - "$ref": "#/definitions/FunctionBinding" - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint." - }, - "inputs": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/FunctionInput" - } - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "A list of inputs describing the parameters of the function." - }, - "output": { - "oneOf": [ - { - "$ref": "#/definitions/FunctionOutput" - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "Describes the output of a function." - } - }, - "description": "Describes the configuration of the scalar function." - }, "ScalarFunctionProperties": { "type": "object", "properties": { - "properties": { - "oneOf": [ - { - "$ref": "#/definitions/ScalarFunctionConfiguration" - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "Describes the configuration of the scalar function." - }, "type": { "type": "string", "enum": [ diff --git a/schemas/2021-10-01-preview/Microsoft.StreamAnalytics.json b/schemas/2021-10-01-preview/Microsoft.StreamAnalytics.json index aea54c0010..a2ee498cd7 100644 --- a/schemas/2021-10-01-preview/Microsoft.StreamAnalytics.json +++ b/schemas/2021-10-01-preview/Microsoft.StreamAnalytics.json @@ -479,6 +479,10 @@ "type": "string", "description": "The Request-Response execute endpoint of the Azure Machine Learning web service." }, + "inputRequestName": { + "type": "string", + "description": "Label for the input request object." + }, "inputs": { "oneOf": [ { @@ -504,6 +508,10 @@ ], "description": "The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is 1." }, + "outputResponseName": { + "type": "string", + "description": "Label for the output request object." + }, "outputs": { "oneOf": [ { @@ -829,6 +837,22 @@ "AzureSqlReferenceInputDataSourceProperties": { "type": "object", "properties": { + "authenticationMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Msi", + "UserToken", + "ConnectionString" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authentication Mode." + }, "database": { "type": "string", "description": "This element is associated with the datasource element. This is the name of the database that output will be written to." @@ -856,7 +880,9 @@ "enum": [ "Static", "RefreshPeriodicallyWithFull", - "RefreshPeriodicallyWithDelta" + "RefreshPeriodicallyWithDelta", + "Blocking", + "Nonblocking" ] }, { @@ -869,10 +895,6 @@ "type": "string", "description": "This element is associated with the datasource element. This is the name of the server that contains the database that will be written to." }, - "table": { - "type": "string", - "description": "This element is associated with the datasource element. The name of the table in the Azure SQL database.." - }, "user": { "type": "string", "description": "This element is associated with the datasource element. This is the user name that will be used to connect to the SQL Database instance." @@ -909,6 +931,22 @@ "AzureSynapseOutputDataSourceProperties": { "type": "object", "properties": { + "authenticationMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Msi", + "UserToken", + "ConnectionString" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authentication Mode." + }, "database": { "type": "string", "description": "The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests." @@ -1054,6 +1092,25 @@ ], "description": "Authentication Mode." }, + "blobPathPrefix": { + "type": "string", + "description": "Blob path prefix." + }, + "blobWriteMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Append", + "Once" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Blob write mode." + }, "container": { "type": "string", "description": "The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests." @@ -1132,6 +1189,10 @@ ], "description": "Authentication Mode." }, + "blobName": { + "type": "string", + "description": "The name of the blob input." + }, "container": { "type": "string", "description": "The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests." @@ -1140,10 +1201,33 @@ "type": "string", "description": "The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead." }, + "deltaPathPattern": { + "type": "string", + "description": "The path pattern of the delta snapshot." + }, + "deltaSnapshotRefreshRate": { + "type": "string", + "description": "The interval that the user generates a delta snapshot of this reference blob input data source." + }, + "fullSnapshotRefreshRate": { + "type": "string", + "description": "The refresh interval of the blob input data source." + }, "pathPattern": { "type": "string", "description": "The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example." }, + "sourcePartitionCount": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The partition count of the blob input data source. Range 1 - 256." + }, "storageAccounts": { "oneOf": [ { @@ -1330,9 +1414,19 @@ "type": "string", "description": "The Csharp code containing a single function definition." }, - "script": { - "type": "string", - "description": "The Csharp code containing a single function definition." + "updateMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "Refreshable" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] } }, "description": "The binding properties associated with a CSharp function." @@ -1464,6 +1558,22 @@ "type": "string", "description": "The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests." }, + "authenticationMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Msi", + "UserToken", + "ConnectionString" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authentication Mode." + }, "collectionNamePattern": { "type": "string", "description": "The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests." @@ -1483,6 +1593,92 @@ }, "description": "The properties that are associated with a DocumentDB output." }, + "EventGridStreamInputDataSource": { + "type": "object", + "properties": { + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/EventGridStreamInputDataSourceProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that are associated with an event grid input containing stream data." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.EventGrid/EventSubscriptions" + ] + } + }, + "required": [ + "type" + ], + "description": "Describes an event grid input data source that contains stream data." + }, + "EventGridStreamInputDataSourceProperties": { + "type": "object", + "properties": { + "eventTypes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of Event Types that are supported by the Event Grid adapter." + }, + "schema": { + "oneOf": [ + { + "type": "string", + "enum": [ + "EventGridEventSchema", + "CloudEventSchema" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Indicates the Event Grid schema type." + }, + "storageAccounts": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/StorageAccount" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests." + }, + "subscriber": { + "oneOf": [ + { + "$ref": "#/definitions/EventHubV2StreamInputDataSource" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes an Event Hub input data source that contains stream data." + } + }, + "description": "The properties that are associated with an event grid input containing stream data." + }, "EventHubOutputDataSource": { "type": "object", "properties": { @@ -1532,6 +1728,17 @@ "type": "string", "description": "The name of the Event Hub. Required on PUT (CreateOrReplace) requests." }, + "partitionCount": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The partition count of the event hub data source. Range 1 - 256." + }, "partitionKey": { "type": "string", "description": "The key/column that is used to determine to which partition to send event data." @@ -1618,6 +1825,28 @@ "type": "string", "description": "The name of the Event Hub. Required on PUT (CreateOrReplace) requests." }, + "partitionCount": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The partition count of the event hub data source. Range 1 - 256." + }, + "prefetchCount": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The number of messages that the message receiver can simultaneously request." + }, "serviceBusNamespace": { "type": "string", "description": "The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests." @@ -1689,10 +1918,23 @@ "type": "object", "properties": { "container": { - "type": "string" + "type": "string", + "description": "The UserCustomCode container." }, "path": { - "type": "string" + "type": "string", + "description": "The UserCustomCode path." + }, + "refreshConfiguration": { + "oneOf": [ + { + "$ref": "#/definitions/RefreshConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The refresh parameters for any/all updatable user defined functions present in the job config." }, "storageAccount": { "oneOf": [ @@ -1843,6 +2085,78 @@ }, "description": "The properties that are associated with a function." }, + "GatewayMessageBusOutputDataSource": { + "type": "object", + "properties": { + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/GatewayMessageBusOutputDataSourceProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that are associated with a Gateway Message Bus." + }, + "type": { + "type": "string", + "enum": [ + "GatewayMessageBus" + ] + } + }, + "required": [ + "type" + ], + "description": "Describes a Gateway Message Bus output data source." + }, + "GatewayMessageBusOutputDataSourceProperties": { + "type": "object", + "properties": { + "topic": { + "type": "string", + "description": "The name of the Service Bus topic." + } + }, + "description": "The properties that are associated with a Gateway Message Bus." + }, + "GatewayMessageBusStreamInputDataSource": { + "type": "object", + "properties": { + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/GatewayMessageBusStreamInputDataSourceProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that are associated with a gateway message bus input containing stream data." + }, + "type": { + "type": "string", + "enum": [ + "GatewayMessageBus" + ] + } + }, + "required": [ + "type" + ], + "description": "Describes a blob input data source that contains stream data." + }, + "GatewayMessageBusStreamInputDataSourceProperties": { + "type": "object", + "properties": { + "topic": { + "type": "string", + "description": "The name of the Service Bus topic." + } + }, + "description": "The properties that are associated with a gateway message bus input containing stream data." + }, "Identity": { "type": "object", "properties": { @@ -1923,10 +2237,42 @@ } ], "description": "Describes how data from an input is serialized or how data is serialized when written to an output." + }, + "watermarkSettings": { + "oneOf": [ + { + "$ref": "#/definitions/InputWatermarkProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Settings which determine whether to read watermark events." } }, "description": "The properties that are associated with an input." }, + "InputWatermarkProperties": { + "type": "object", + "properties": { + "watermarkMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "ReadWatermark" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The input watermark mode." + } + }, + "description": "Settings which determine whether to read watermark events." + }, "IoTHubStreamInputDataSource": { "type": "object", "properties": { @@ -2151,6 +2497,9 @@ { "$ref": "#/definitions/AzureSynapseOutputDataSource" }, + { + "$ref": "#/definitions/PostgreSQLOutputDataSource" + }, { "$ref": "#/definitions/DocumentDbOutputDataSource" }, @@ -2168,6 +2517,9 @@ }, { "$ref": "#/definitions/AzureDataLakeStoreOutputDataSource" + }, + { + "$ref": "#/definitions/GatewayMessageBusOutputDataSource" } ], "properties": {}, @@ -2212,10 +2564,47 @@ "timeWindow": { "type": "string", "description": "The time frame for filtering Stream Analytics job outputs." + }, + "watermarkSettings": { + "oneOf": [ + { + "$ref": "#/definitions/OutputWatermarkProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Settings which determine whether to send watermarks to downstream." } }, "description": "The properties that are associated with an output." }, + "OutputWatermarkProperties": { + "type": "object", + "properties": { + "maxWatermarkDifferenceAcrossPartitions": { + "type": "string", + "description": "Describes the maximal delta between the fastest and slowest partitions, so the out of order window that catches all necessary events in downstream jobs is well defined." + }, + "watermarkMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "SendCurrentPartitionWatermark", + "SendLowestWatermarkAcrossPartitions" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The output watermark mode." + } + }, + "description": "Settings which determine whether to send watermarks to downstream." + }, "ParquetSerialization": { "type": "object", "properties": { @@ -2236,6 +2625,85 @@ ], "description": "Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format." }, + "PostgreSQLOutputDataSource": { + "type": "object", + "properties": { + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PostgreSQLOutputDataSourceProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties that are associated with a PostgreSQL output." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.DBForPostgreSQL/servers/databases" + ] + } + }, + "required": [ + "type" + ], + "description": "Describes a PostgreSQL output data source." + }, + "PostgreSQLOutputDataSourceProperties": { + "type": "object", + "properties": { + "authenticationMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Msi", + "UserToken", + "ConnectionString" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authentication Mode." + }, + "database": { + "type": "string", + "description": "The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests." + }, + "maxWriterCount": { + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Max Writer count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests." + }, + "password": { + "type": "string", + "description": "The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests." + }, + "server": { + "type": "string", + "description": "The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests." + }, + "table": { + "type": "string", + "description": "The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests." + }, + "user": { + "type": "string", + "description": "The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests." + } + }, + "description": "The properties that are associated with a PostgreSQL output." + }, "PowerBIOutputDataSource": { "type": "object", "properties": { @@ -2456,6 +2924,46 @@ ], "description": "The properties that are associated with an input containing reference data." }, + "RefreshConfiguration": { + "type": "object", + "properties": { + "dateFormat": { + "type": "string", + "description": "The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead." + }, + "pathPattern": { + "type": "string", + "description": "The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example." + }, + "refreshInterval": { + "type": "string", + "description": "The refresh interval." + }, + "refreshType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Static", + "RefreshPeriodicallyWithFull", + "RefreshPeriodicallyWithDelta", + "Blocking", + "Nonblocking" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "This property indicates which data refresh option to use, Blocking or Nonblocking." + }, + "timeFormat": { + "type": "string", + "description": "The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead." + } + }, + "description": "The refresh parameters for any/all updatable user defined functions present in the job config." + }, "ScalarFunctionProperties": { "type": "object", "properties": { @@ -2699,6 +3207,22 @@ "accountName": { "type": "string", "description": "The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests." + }, + "authenticationMode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Msi", + "UserToken", + "ConnectionString" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Authentication Mode." } }, "description": "The properties that are associated with an Azure Storage account" @@ -3101,6 +3625,12 @@ }, { "$ref": "#/definitions/RawStreamInputDataSource" + }, + { + "$ref": "#/definitions/GatewayMessageBusStreamInputDataSource" + }, + { + "$ref": "#/definitions/EventGridStreamInputDataSource" } ], "properties": {},