Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@
"minLength": 1,
"maxLength": 90,
"x-ms-parameter-location": "method"
},
"LocationParameter": {
"name": "location",
"in": "path",
"required": true,
"type": "string",
"description": "The region to which the request is sent. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"parameters": {
"api-version": "2017-04-01-preview",
"subscriptionId": "56b5e0a9-b645-407d-99b0-c64f86013e3d",
"location": "West US",
"streamingJob": {
"properties": {
"sku": {
"name": "Standard"
},
"eventsOutOfOrderPolicy": "Drop",
"outputErrorPolicy": "Drop",
"eventsOutOfOrderMaxDelayInSeconds": 0,
"eventsLateArrivalMaxDelayInSeconds": 5,
"dataLocale": "en-US",
"compatibilityLevel": "1.0",
"inputs": [
{
"properties": {
"type": "Stream",
"datasource": {
"type": "Raw",
"properties": {
"payloadUri": "http://myinput.com"
}
},
"serialization": {
"type": "Json",
"properties": {
"encoding": "UTF8"
}
}
},
"name": "inputtest"
}
],
"transformation": {
"properties": {
"streamingUnits": 1,
"query": "Select Id, Name from inputtest"
},
"name": "transformationtest"
},
"outputs": [
{
"properties": {
"datasource": {
"type": "Raw",
"properties": {
"payloadUri": "http://myoutput.com"
}
},
"serialization": {
"type": "Json"
}
},
"name": "outputtest"
}
],
"functions": []
},
"location": "West US",
"tags": {
"key1": "value1",
"randomKey": "randomValue",
"key3": "value3"
}
}
},
"responses": {
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,22 @@
}
}
},
"RawStreamInputDataSource": {
"description": "Describes a raw input data source that contains stream data. This data source type is only applicable/usable when using the query testing API. You cannot create a job with this data source type or add an input/output of this data source type to an existing job.",
"x-ms-discriminator-value": "Raw",
"allOf": [
{
"$ref": "#/definitions/StreamInputDataSource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/RawInputDatasourceProperties",
"description": "The properties that are associated with a raw input. Required on PUT (CreateOrReplace) requests.",
"x-ms-client-flatten": true
}
}
},
"ReferenceInputDataSource": {
"description": "Describes an input data source that contains reference data.",
"discriminator": "type",
Expand Down Expand Up @@ -632,6 +648,22 @@
],
"properties": {}
},
"RawReferenceInputDataSource": {
"description": "Describes a raw input data source that contains reference data. This data source type is only applicable/usable when using the query testing API. You cannot create a job with this data source type or add an input/output of this data source type to an existing job.",
"x-ms-discriminator-value": "Raw",
"allOf": [
{
"$ref": "#/definitions/ReferenceInputDataSource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/RawInputDatasourceProperties",
"description": "The properties that are associated with a raw input containing reference data. Required on PUT (CreateOrReplace) requests.",
"x-ms-client-flatten": true
}
}
},
"BlobDataSourceProperties": {
"description": "The properties that are associated with a blob data source.",
"properties": {
Expand Down Expand Up @@ -660,6 +692,19 @@
}
}
},
"RawInputDatasourceProperties": {
"description": "The properties that are associated with a raw input.",
"properties": {
"payload": {
"description": "The JSON serialized content of the input data. Either payload or payloadUri must be set, but not both. ",
"type": "string"
},
"payloadUri": {
"description": "The SAS URL to a blob containing the JSON serialized content of the input data. Either payload or payloadUri must be set, but not both.",
"type": "string"
}
}
},
"StorageAccount": {
"description": "The properties that are associated with an Azure Storage account",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,31 @@
"type"
]
},
"RawOutputDatasource": {
"description": "Describes a raw output data source.",
"x-ms-discriminator-value": "Raw",
"allOf": [
{
"$ref": "#/definitions/OutputDataSource"
}
],
"properties": {
"properties": {
"description": "The properties that are associated with a raw output.",
"$ref": "#/definitions/RawOutputDatasourceProperties",
"x-ms-client-flatten": true
}
}
},
"RawOutputDatasourceProperties": {
"description": "The properties that are associated with a raw output.",
"properties": {
"payloadUri": {
"description": "The SAS URL to a blob where the output should be written. If this property is not set, output data will be embedded in the result response. The SAS URL needs to have write permission.",
"type": "string"
}
}
},
"BlobOutputDataSource": {
"description": "Describes a blob output data source.",
"x-ms-discriminator-value": "Microsoft.Storage/Blob",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@
},
"parameters": [
{
"name": "location",
"in": "path",
"required": true,
"type": "string",
"description": "The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/"
"$ref": "../../common/v1/definitions.json#/parameters/LocationParameter"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
Expand All @@ -69,6 +65,61 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/testQuery": {
"post": {
"tags": [
"Subscriptions"
],
"operationId": "Subscriptions_TestQuery",
"description": "Test the Stream Analytics query on a sample input.",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Test the Stream Analytics query": {
"$ref": "./examples/Subscription_TestQuery.json"
}
},
"parameters": [
{
"name": "streamingJob",
"in": "body",
"required": true,
"schema": {
"$ref": "./streamingjobs.json#/definitions/StreamingJob"
},
"description": "A streaming job object. This object defines the input, output, and transformation for the query testing."
},
{
"$ref": "../../common/v1/definitions.json#/parameters/LocationParameter"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The request to test the Stream Analytics query was successful.",
"schema": {
"$ref": "#/definitions/QueryTestingResult"
}
},
"202": {
"description": "The request to test the Stream Analytics query was successfully initiated."
},
"default": {
"description": "Error.",
"schema": {
"$ref": "../../common/v1/definitions.json#/definitions/Error"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -115,6 +166,71 @@
}
}
},
"QueryTestingResult": {
"description": "The result of the query testing request.",
"allOf": [
{
"$ref": "../../common/v1/definitions.json#/definitions/Error"
}
],
"properties": {
"status": {
"description": "The status of the query testing request.",
"$ref": "#/definitions/QueryTestingResultStatus"
},
"outputUri": {
"description": "The SAS URL to the outputs payload.",
"type": "string",
"readOnly": true
},
"error": {
"$ref": "../../common/v1/definitions.json#/definitions/Error"
}
}
},
"QueryTestingResultStatus": {
"description": "The status of the query testing request.",
"readOnly": true,
"type": "string",
"enum": [
"Started",
"Success",
"CompilerError",
"RuntimeError",
"Timeout",
"UnknownError"
],
"x-ms-enum": {
"name": "QueryTestingResultStatus",
"modelAsString": true,
"values": [
{
"value": "Started",
"description": "The query testing operation was initiatied."
},
{
"value": "Success",
"description": "The query testing operation succeeded."
},
{
"value": "CompilerError",
"description": "The query testing operation failed due to a compiler error."
},
{
"value": "RuntimeError",
"description": "The query testing operation failed due to a runtime error."
},
{
"value": "Timeout",
"description": "The query testing operation failed due to a timeout."
},
{
"value": "UnknownError",
"description": "The query testing operation failed due to an unknown error ."
}
]
}
},
"SubResource": {
"description": "The base sub-resource model definition.",
"properties": {
Expand Down