From 136d67bd177d5fbc67b0f166d7f9a89ed8e24543 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 22 Nov 2022 23:10:51 +0000 Subject: [PATCH] CodeGen from PR 21632 in Azure/azure-rest-api-specs Merge 3131132e9e4da67c83d072a2b6ca8bcdd262c569 into 7a54c1a83d14da431c0ae48c4315cba143084bce --- common/config/rush/pnpm-lock.yaml | 35 +- .../arm-streamanalytics/CHANGELOG.md | 78 ++- .../arm-streamanalytics/_meta.json | 12 +- .../arm-streamanalytics/package.json | 29 +- .../review/arm-streamanalytics.api.md | 565 +++++++++--------- .../arm-streamanalytics/src/models/index.ts | 458 +++++++++----- .../arm-streamanalytics/src/models/mappers.ts | 489 ++++++++++----- .../src/streamAnalyticsManagementClient.ts | 73 ++- .../arm-streamanalytics/test/sampleTest.ts | 39 +- .../arm-streamanalytics/tsconfig.json | 10 +- 10 files changed, 1113 insertions(+), 675 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index fc4a5b212a39..e87582c29298 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3011,7 +3011,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3252,7 +3252,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3409,7 +3409,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3552,7 +3552,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3613,7 +3613,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3726,7 +3726,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.1: @@ -4003,11 +4003,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.284: @@ -4888,7 +4888,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -5028,7 +5028,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6444,7 +6444,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6454,7 +6454,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -6871,7 +6871,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -9114,7 +9114,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -15185,7 +15185,7 @@ packages: dev: false file:projects/arm-streamanalytics.tgz: - resolution: {integrity: sha512-tyDhMW+2aoBj060An0Hzvgm6gX5+H0XqoS0JvuB35M9aFL3UZoDZtIbOhJKklr2fCmiMPss4dEPk7gHR3vUV6Q==, tarball: file:projects/arm-streamanalytics.tgz} + resolution: {integrity: sha512-Dr7SRcSWM6JONMSH+fRTb/yPu5bZerkLUI4NrOxxg5YkqEZud6A8wDyN8fZGrjEk+ZqczjR7h3QUMQpGTKaiIw==, tarball: file:projects/arm-streamanalytics.tgz} name: '@rush-temp/arm-streamanalytics' version: 0.0.0 dependencies: @@ -15196,6 +15196,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.3 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -15203,11 +15205,10 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.1 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/streamanalytics/arm-streamanalytics/CHANGELOG.md b/sdk/streamanalytics/arm-streamanalytics/CHANGELOG.md index 7b22f5177893..7749f3add7b8 100644 --- a/sdk/streamanalytics/arm-streamanalytics/CHANGELOG.md +++ b/sdk/streamanalytics/arm-streamanalytics/CHANGELOG.md @@ -1,15 +1,73 @@ # Release History + +## 4.1.0 (2022-11-22) + +**Features** -## 4.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface AggregateFunctionProperties + - Added Interface AvroSerialization + - Added Interface AzureDataLakeStoreOutputDataSource + - Added Interface AzureDataLakeStoreOutputDataSourceProperties + - Added Interface AzureFunctionOutputDataSource + - Added Interface AzureMachineLearningWebServiceFunctionBinding + - Added Interface AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters + - Added Interface AzureSqlDatabaseOutputDataSource + - Added Interface AzureSqlDatabaseOutputDataSourceProperties + - Added Interface AzureSqlReferenceInputDataSource + - Added Interface AzureSynapseOutputDataSource + - Added Interface AzureSynapseOutputDataSourceProperties + - Added Interface AzureTableOutputDataSource + - Added Interface BlobOutputDataSource + - Added Interface BlobOutputDataSourceProperties + - Added Interface BlobReferenceInputDataSource + - Added Interface BlobReferenceInputDataSourceProperties + - Added Interface BlobStreamInputDataSource + - Added Interface BlobStreamInputDataSourceProperties + - Added Interface Cluster + - Added Interface CsvSerialization + - Added Interface DocumentDbOutputDataSource + - Added Interface EventHubDataSourceProperties + - Added Interface EventHubOutputDataSource + - Added Interface EventHubOutputDataSourceProperties + - Added Interface EventHubStreamInputDataSource + - Added Interface EventHubStreamInputDataSourceProperties + - Added Interface EventHubV2OutputDataSource + - Added Interface EventHubV2StreamInputDataSource + - Added Interface FileReferenceInputDataSource + - Added Interface FunctionModel + - Added Interface GatewayMessageBusOutputDataSource + - Added Interface GatewayMessageBusOutputDataSourceProperties + - Added Interface GatewayMessageBusSourceProperties + - Added Interface GatewayMessageBusStreamInputDataSource + - Added Interface GatewayMessageBusStreamInputDataSourceProperties + - Added Interface Input + - Added Interface IoTHubStreamInputDataSource + - Added Interface JavaScriptFunctionBinding + - Added Interface JavaScriptFunctionRetrieveDefaultDefinitionParameters + - Added Interface JobStorageAccount + - Added Interface JsonSerialization + - Added Interface Output + - Added Interface ParquetSerialization + - Added Interface PowerBIOutputDataSource + - Added Interface PowerBIOutputDataSourceProperties + - Added Interface PrivateEndpoint + - Added Interface ProxyResource + - Added Interface ReferenceInputProperties + - Added Interface ScalarFunctionProperties + - Added Interface ServiceBusQueueOutputDataSource + - Added Interface ServiceBusQueueOutputDataSourceProperties + - Added Interface ServiceBusTopicOutputDataSource + - Added Interface ServiceBusTopicOutputDataSourceProperties + - Added Interface StreamingJob + - Added Interface StreamInputProperties + - Added Interface SubscriptionQuota + - Added Interface TrackedResource + - Added Interface Transformation + - Interface BlobDataSourceProperties has a new optional parameter authenticationMode + - Interface FunctionProperties has a new optional parameter binding + - Interface FunctionProperties has a new optional parameter inputs + - Interface FunctionProperties has a new optional parameter output + ## 4.0.1 (2022-05-05) **Features** diff --git a/sdk/streamanalytics/arm-streamanalytics/_meta.json b/sdk/streamanalytics/arm-streamanalytics/_meta.json index eacc0d59e070..f014221fa8ed 100644 --- a/sdk/streamanalytics/arm-streamanalytics/_meta.json +++ b/sdk/streamanalytics/arm-streamanalytics/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d600759c3516b61a7c353bc8682bccbab85a6f65", - "readme": "specification\\streamanalytics\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\streamanalytics\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "3ee46502329f736a57bee766ccfa18954621c392", + "readme": "specification/streamanalytics/resource-manager/readme.md", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/streamanalytics/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" +} \ No newline at end of file diff --git a/sdk/streamanalytics/arm-streamanalytics/package.json b/sdk/streamanalytics/arm-streamanalytics/package.json index 379d75d42f3c..538df9f4add9 100644 --- a/sdk/streamanalytics/arm-streamanalytics/package.json +++ b/sdk/streamanalytics/arm-streamanalytics/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StreamAnalyticsManagementClient.", - "version": "4.0.2", + "version": "4.1.0", "engines": { "node": ">=14.0.0" }, @@ -36,13 +36,17 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/streamanalytics/arm-streamanalytics", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -106,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-streamanalytics?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/streamanalytics/arm-streamanalytics/review/arm-streamanalytics.api.md b/sdk/streamanalytics/arm-streamanalytics/review/arm-streamanalytics.api.md index 4500d2df761a..d9c77f45fefd 100644 --- a/sdk/streamanalytics/arm-streamanalytics/review/arm-streamanalytics.api.md +++ b/sdk/streamanalytics/arm-streamanalytics/review/arm-streamanalytics.api.md @@ -10,55 +10,70 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export interface AggregateFunctionProperties extends FunctionProperties { + type: "Aggregate"; +} + // @public export type AuthenticationMode = string; // @public -export type AvroSerialization = Serialization & { - type: "Avro"; +export interface AvroSerialization extends Serialization { properties?: Record; -}; + type: "Avro"; +} // @public -export type AzureDataLakeStoreOutputDataSource = OutputDataSource & { - type: "Microsoft.DataLake/Accounts"; - refreshToken?: string; - tokenUserPrincipalName?: string; - tokenUserDisplayName?: string; +export interface AzureDataLakeStoreOutputDataSource extends OutputDataSource { accountName?: string; - tenantId?: string; - filePathPrefix?: string; + authenticationMode?: AuthenticationMode; dateFormat?: string; + filePathPrefix?: string; + refreshToken?: string; + tenantId?: string; timeFormat?: string; - authenticationMode?: AuthenticationMode; -}; + tokenUserDisplayName?: string; + tokenUserPrincipalName?: string; + type: "Microsoft.DataLake/Accounts"; +} // @public -export type AzureDataLakeStoreOutputDataSourceProperties = OAuthBasedDataSourceProperties & { +export interface AzureDataLakeStoreOutputDataSourceProperties extends OAuthBasedDataSourceProperties { accountName?: string; - tenantId?: string; - filePathPrefix?: string; + authenticationMode?: AuthenticationMode; dateFormat?: string; + filePathPrefix?: string; + tenantId?: string; timeFormat?: string; - authenticationMode?: AuthenticationMode; -}; +} // @public -export type AzureMachineLearningWebServiceFunctionBinding = FunctionBinding & { - type: "Microsoft.MachineLearning/WebService"; - endpoint?: string; +export interface AzureFunctionOutputDataSource extends OutputDataSource { apiKey?: string; + functionAppName?: string; + functionName?: string; + maxBatchCount?: number; + maxBatchSize?: number; + type: "Microsoft.AzureFunction"; +} + +// @public +export interface AzureMachineLearningWebServiceFunctionBinding extends FunctionBinding { + apiKey?: string; + batchSize?: number; + endpoint?: string; inputs?: AzureMachineLearningWebServiceInputs; outputs?: AzureMachineLearningWebServiceOutputColumn[]; - batchSize?: number; -}; + type: "Microsoft.MachineLearning/WebService"; +} // @public -export type AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters = FunctionRetrieveDefaultDefinitionParameters & { +export interface AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters extends FunctionRetrieveDefaultDefinitionParameters { bindingType: "Microsoft.MachineLearning/WebService"; executeEndpoint?: string; udfType?: "Scalar"; -}; +} // @public export interface AzureMachineLearningWebServiceInputColumn { @@ -92,34 +107,35 @@ export interface AzureSqlDatabaseDataSourceProperties { } // @public -export type AzureSqlDatabaseOutputDataSource = OutputDataSource & { - type: "Microsoft.Sql/Server/Database"; - server?: string; +export interface AzureSqlDatabaseOutputDataSource extends OutputDataSource { + authenticationMode?: AuthenticationMode; database?: string; - user?: string; - password?: string; - table?: string; maxBatchCount?: number; maxWriterCount?: number; - authenticationMode?: AuthenticationMode; -}; + password?: string; + server?: string; + table?: string; + type: "Microsoft.Sql/Server/Database"; + user?: string; +} // @public -export type AzureSqlDatabaseOutputDataSourceProperties = AzureSqlDatabaseDataSourceProperties & {}; +export interface AzureSqlDatabaseOutputDataSourceProperties extends AzureSqlDatabaseDataSourceProperties { +} // @public -export type AzureSqlReferenceInputDataSource = ReferenceInputDataSource & { - type: "Microsoft.Sql/Server/Database"; - server?: string; +export interface AzureSqlReferenceInputDataSource extends ReferenceInputDataSource { database?: string; - user?: string; + deltaSnapshotQuery?: string; + fullSnapshotQuery?: string; password?: string; - table?: string; - refreshType?: RefreshType; refreshRate?: string; - fullSnapshotQuery?: string; - deltaSnapshotQuery?: string; -}; + refreshType?: RefreshType; + server?: string; + table?: string; + type: "Microsoft.Sql/Server/Database"; + user?: string; +} // @public export interface AzureSynapseDataSourceProperties { @@ -131,32 +147,34 @@ export interface AzureSynapseDataSourceProperties { } // @public -export type AzureSynapseOutputDataSource = OutputDataSource & { - type: "Microsoft.Sql/Server/DataWarehouse"; - server?: string; +export interface AzureSynapseOutputDataSource extends OutputDataSource { database?: string; + password?: string; + server?: string; table?: string; + type: "Microsoft.Sql/Server/DataWarehouse"; user?: string; - password?: string; -}; +} // @public -export type AzureSynapseOutputDataSourceProperties = AzureSynapseDataSourceProperties & {}; +export interface AzureSynapseOutputDataSourceProperties extends AzureSynapseDataSourceProperties { +} // @public -export type AzureTableOutputDataSource = OutputDataSource & { - type: "Microsoft.Storage/Table"; - accountName?: string; +export interface AzureTableOutputDataSource extends OutputDataSource { accountKey?: string; - table?: string; + accountName?: string; + batchSize?: number; + columnsToRemove?: string[]; partitionKey?: string; rowKey?: string; - columnsToRemove?: string[]; - batchSize?: number; -}; + table?: string; + type: "Microsoft.Storage/Table"; +} // @public export interface BlobDataSourceProperties { + authenticationMode?: AuthenticationMode; container?: string; dateFormat?: string; pathPattern?: string; @@ -165,60 +183,64 @@ export interface BlobDataSourceProperties { } // @public -export type BlobOutputDataSource = OutputDataSource & { - type: "Microsoft.Storage/Blob"; - storageAccounts?: StorageAccount[]; +export interface BlobOutputDataSource extends OutputDataSource { + authenticationMode?: AuthenticationMode; + blobPathPrefix?: string; container?: string; - pathPattern?: string; dateFormat?: string; + pathPattern?: string; + storageAccounts?: StorageAccount[]; timeFormat?: string; - authenticationMode?: AuthenticationMode; -}; + type: "Microsoft.Storage/Blob"; +} // @public -export type BlobOutputDataSourceProperties = BlobDataSourceProperties & { - authenticationMode?: AuthenticationMode; -}; +export interface BlobOutputDataSourceProperties extends BlobDataSourceProperties { + blobPathPrefix?: string; +} // @public -export type BlobReferenceInputDataSource = ReferenceInputDataSource & { - type: "Microsoft.Storage/Blob"; - storageAccounts?: StorageAccount[]; +export interface BlobReferenceInputDataSource extends ReferenceInputDataSource { + authenticationMode?: AuthenticationMode; container?: string; - pathPattern?: string; dateFormat?: string; + pathPattern?: string; + storageAccounts?: StorageAccount[]; timeFormat?: string; -}; + type: "Microsoft.Storage/Blob"; +} // @public -export type BlobReferenceInputDataSourceProperties = BlobDataSourceProperties & {}; +export interface BlobReferenceInputDataSourceProperties extends BlobDataSourceProperties { +} // @public -export type BlobStreamInputDataSource = StreamInputDataSource & { - type: "Microsoft.Storage/Blob"; - storageAccounts?: StorageAccount[]; +export interface BlobStreamInputDataSource extends StreamInputDataSource { + authenticationMode?: AuthenticationMode; container?: string; - pathPattern?: string; dateFormat?: string; - timeFormat?: string; + pathPattern?: string; sourcePartitionCount?: number; -}; + storageAccounts?: StorageAccount[]; + timeFormat?: string; + type: "Microsoft.Storage/Blob"; +} // @public -export type BlobStreamInputDataSourceProperties = BlobDataSourceProperties & { +export interface BlobStreamInputDataSourceProperties extends BlobDataSourceProperties { sourcePartitionCount?: number; -}; +} // @public -export type Cluster = TrackedResource & { - sku?: ClusterSku; - readonly etag?: string; - readonly createdDate?: Date; - readonly clusterId?: string; - readonly provisioningState?: ClusterProvisioningState; +export interface Cluster extends TrackedResource { readonly capacityAllocated?: number; readonly capacityAssigned?: number; -}; + readonly clusterId?: string; + readonly createdDate?: Date; + readonly etag?: string; + readonly provisioningState?: ClusterProvisioningState; + sku?: ClusterSku; +} // @public export interface ClusterInfo { @@ -361,11 +383,11 @@ export type CompressionType = string; export type ContentStoragePolicy = string; // @public -export type CsvSerialization = Serialization & { - type: "Csv"; - fieldDelimiter?: string; +export interface CsvSerialization extends Serialization { encoding?: Encoding; -}; + fieldDelimiter?: string; + type: "Csv"; +} // @public export interface DiagnosticCondition { @@ -380,15 +402,15 @@ export interface Diagnostics { } // @public -export type DocumentDbOutputDataSource = OutputDataSource & { - type: "Microsoft.Storage/DocumentDB"; +export interface DocumentDbOutputDataSource extends OutputDataSource { accountId?: string; accountKey?: string; - database?: string; collectionNamePattern?: string; - partitionKey?: string; + database?: string; documentId?: string; -}; + partitionKey?: string; + type: "Microsoft.Storage/DocumentDB"; +} // @public export type Encoding = string; @@ -420,66 +442,66 @@ export interface ErrorResponse { } // @public -export type EventHubDataSourceProperties = ServiceBusDataSourceProperties & { +export interface EventHubDataSourceProperties extends ServiceBusDataSourceProperties { eventHubName?: string; -}; +} // @public -export type EventHubOutputDataSource = OutputDataSource & { - type: "Microsoft.ServiceBus/EventHub"; - serviceBusNamespace?: string; - sharedAccessPolicyName?: string; - sharedAccessPolicyKey?: string; +export interface EventHubOutputDataSource extends OutputDataSource { authenticationMode?: AuthenticationMode; eventHubName?: string; partitionKey?: string; propertyColumns?: string[]; -}; + serviceBusNamespace?: string; + sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; + type: "Microsoft.ServiceBus/EventHub"; +} // @public -export type EventHubOutputDataSourceProperties = EventHubDataSourceProperties & { +export interface EventHubOutputDataSourceProperties extends EventHubDataSourceProperties { partitionKey?: string; propertyColumns?: string[]; -}; +} // @public -export type EventHubStreamInputDataSource = StreamInputDataSource & { - type: "Microsoft.ServiceBus/EventHub"; - serviceBusNamespace?: string; - sharedAccessPolicyName?: string; - sharedAccessPolicyKey?: string; +export interface EventHubStreamInputDataSource extends StreamInputDataSource { authenticationMode?: AuthenticationMode; - eventHubName?: string; consumerGroupName?: string; -}; + eventHubName?: string; + serviceBusNamespace?: string; + sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; + type: "Microsoft.ServiceBus/EventHub"; +} // @public -export type EventHubStreamInputDataSourceProperties = EventHubDataSourceProperties & { +export interface EventHubStreamInputDataSourceProperties extends EventHubDataSourceProperties { consumerGroupName?: string; -}; +} // @public -export type EventHubV2OutputDataSource = OutputDataSource & { - type: "Microsoft.EventHub/EventHub"; - serviceBusNamespace?: string; - sharedAccessPolicyName?: string; - sharedAccessPolicyKey?: string; +export interface EventHubV2OutputDataSource extends OutputDataSource { authenticationMode?: AuthenticationMode; eventHubName?: string; partitionKey?: string; propertyColumns?: string[]; -}; - -// @public -export type EventHubV2StreamInputDataSource = StreamInputDataSource & { - type: "Microsoft.EventHub/EventHub"; serviceBusNamespace?: string; - sharedAccessPolicyName?: string; sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; + type: "Microsoft.EventHub/EventHub"; +} + +// @public +export interface EventHubV2StreamInputDataSource extends StreamInputDataSource { authenticationMode?: AuthenticationMode; - eventHubName?: string; consumerGroupName?: string; -}; + eventHubName?: string; + serviceBusNamespace?: string; + sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; + type: "Microsoft.EventHub/EventHub"; +} // @public export type EventSerializationType = string; @@ -487,6 +509,12 @@ export type EventSerializationType = string; // @public export type EventsOutOfOrderPolicy = string; +// @public +export interface FileReferenceInputDataSource extends ReferenceInputDataSource { + path?: string; + type: "File"; +} + // @public export interface FunctionBinding { type: "Microsoft.MachineLearning/WebService" | "Microsoft.StreamAnalytics/JavascriptUdf"; @@ -508,9 +536,9 @@ export interface FunctionListResult { } // @public -export type FunctionModel = SubResource & { +export interface FunctionModel extends SubResource { properties?: FunctionPropertiesUnion; -}; +} // @public export interface FunctionOutput { @@ -519,12 +547,16 @@ export interface FunctionOutput { // @public export interface FunctionProperties { + binding?: FunctionBindingUnion; readonly etag?: string; - type: "Scalar"; + // (undocumented) + inputs?: FunctionInput[]; + output?: FunctionOutput; + type: "Scalar" | "Aggregate"; } // @public (undocumented) -export type FunctionPropertiesUnion = FunctionProperties | ScalarFunctionProperties; +export type FunctionPropertiesUnion = FunctionProperties | ScalarFunctionProperties | AggregateFunctionProperties; // @public export interface FunctionRetrieveDefaultDefinitionParameters { @@ -623,17 +655,42 @@ export interface FunctionsUpdateOptionalParams extends coreClient.OperationOptio // @public export type FunctionsUpdateResponse = FunctionsUpdateHeaders & FunctionModel; +// @public +export interface GatewayMessageBusOutputDataSource extends OutputDataSource { + topic?: string; + type: "GatewayMessageBus"; +} + +// @public +export interface GatewayMessageBusOutputDataSourceProperties extends GatewayMessageBusSourceProperties { +} + +// @public +export interface GatewayMessageBusSourceProperties { + topic?: string; +} + +// @public +export interface GatewayMessageBusStreamInputDataSource extends StreamInputDataSource { + topic?: string; + type: "GatewayMessageBus"; +} + +// @public +export interface GatewayMessageBusStreamInputDataSourceProperties extends GatewayMessageBusSourceProperties { +} + // @public export interface Identity { - principalId?: string; - tenantId?: string; + readonly principalId?: string; + readonly tenantId?: string; type?: string; } // @public -export type Input = SubResource & { +export interface Input extends SubResource { properties?: InputPropertiesUnion; -}; +} // @public export interface InputListResult { @@ -735,35 +792,35 @@ export interface InputsUpdateOptionalParams extends coreClient.OperationOptions export type InputsUpdateResponse = InputsUpdateHeaders & Input; // @public -export type IoTHubStreamInputDataSource = StreamInputDataSource & { - type: "Microsoft.Devices/IotHubs"; - iotHubNamespace?: string; - sharedAccessPolicyName?: string; - sharedAccessPolicyKey?: string; +export interface IoTHubStreamInputDataSource extends StreamInputDataSource { consumerGroupName?: string; endpoint?: string; -}; + iotHubNamespace?: string; + sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; + type: "Microsoft.Devices/IotHubs"; +} // @public -export type JavaScriptFunctionBinding = FunctionBinding & { - type: "Microsoft.StreamAnalytics/JavascriptUdf"; +export interface JavaScriptFunctionBinding extends FunctionBinding { script?: string; -}; + type: "Microsoft.StreamAnalytics/JavascriptUdf"; +} // @public -export type JavaScriptFunctionRetrieveDefaultDefinitionParameters = FunctionRetrieveDefaultDefinitionParameters & { +export interface JavaScriptFunctionRetrieveDefaultDefinitionParameters extends FunctionRetrieveDefaultDefinitionParameters { bindingType: "Microsoft.StreamAnalytics/JavascriptUdf"; script?: string; udfType?: "Scalar"; -}; +} // @public export type JobState = string; // @public -export type JobStorageAccount = StorageAccount & { +export interface JobStorageAccount extends StorageAccount { authenticationMode?: AuthenticationMode; -}; +} // @public export type JobType = string; @@ -772,19 +829,16 @@ export type JobType = string; export type JsonOutputSerializationFormat = string; // @public -export type JsonSerialization = Serialization & { - type: "Json"; +export interface JsonSerialization extends Serialization { encoding?: Encoding; format?: JsonOutputSerializationFormat; -}; + type: "Json"; +} // @public export enum KnownAuthenticationMode { - // (undocumented) ConnectionString = "ConnectionString", - // (undocumented) Msi = "Msi", - // (undocumented) UserToken = "UserToken" } @@ -803,53 +857,39 @@ export enum KnownClusterSkuName { // @public export enum KnownCompatibilityLevel { - // (undocumented) One0 = "1.0", - // (undocumented) One2 = "1.2" } // @public export enum KnownCompressionType { - // (undocumented) Deflate = "Deflate", - // (undocumented) GZip = "GZip", - // (undocumented) None = "None" } // @public export enum KnownContentStoragePolicy { - // (undocumented) JobStorageAccount = "JobStorageAccount", - // (undocumented) SystemAccount = "SystemAccount" } // @public export enum KnownEncoding { - // (undocumented) UTF8 = "UTF8" } // @public export enum KnownEventSerializationType { - // (undocumented) Avro = "Avro", - // (undocumented) Csv = "Csv", - // (undocumented) Json = "Json", - // (undocumented) Parquet = "Parquet" } // @public export enum KnownEventsOutOfOrderPolicy { - // (undocumented) Adjust = "Adjust", - // (undocumented) Drop = "Drop" } @@ -869,51 +909,38 @@ export enum KnownJobState { // @public export enum KnownJobType { - // (undocumented) Cloud = "Cloud", - // (undocumented) Edge = "Edge" } // @public export enum KnownJsonOutputSerializationFormat { - // (undocumented) Array = "Array", - // (undocumented) LineSeparated = "LineSeparated" } // @public export enum KnownOutputErrorPolicy { - // (undocumented) Drop = "Drop", - // (undocumented) Stop = "Stop" } // @public export enum KnownOutputStartMode { - // (undocumented) CustomTime = "CustomTime", - // (undocumented) JobStartTime = "JobStartTime", - // (undocumented) LastOutputEventTime = "LastOutputEventTime" } // @public export enum KnownRefreshType { - // (undocumented) RefreshPeriodicallyWithDelta = "RefreshPeriodicallyWithDelta", - // (undocumented) RefreshPeriodicallyWithFull = "RefreshPeriodicallyWithFull", - // (undocumented) Static = "Static" } // @public export enum KnownSkuName { - // (undocumented) Standard = "Standard" } @@ -965,22 +992,22 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = OperationListResult; // @public -export type Output = SubResource & { +export interface Output extends SubResource { datasource?: OutputDataSourceUnion; - timeWindow?: string; - sizeWindow?: number; - serialization?: SerializationUnion; readonly diagnostics?: Diagnostics; readonly etag?: string; -}; + serialization?: SerializationUnion; + sizeWindow?: number; + timeWindow?: string; +} // @public export interface OutputDataSource { - type: "Microsoft.Storage/Blob" | "Microsoft.Storage/Table" | "Microsoft.ServiceBus/EventHub" | "Microsoft.EventHub/EventHub" | "Microsoft.Sql/Server/Database" | "Microsoft.Sql/Server/DataWarehouse" | "Microsoft.Storage/DocumentDB" | "Microsoft.ServiceBus/Queue" | "Microsoft.ServiceBus/Topic" | "PowerBI" | "Microsoft.DataLake/Accounts"; + type: "Microsoft.Storage/Blob" | "Microsoft.Storage/Table" | "Microsoft.ServiceBus/EventHub" | "Microsoft.EventHub/EventHub" | "Microsoft.Sql/Server/Database" | "Microsoft.Sql/Server/DataWarehouse" | "Microsoft.Storage/DocumentDB" | "Microsoft.AzureFunction" | "Microsoft.ServiceBus/Queue" | "Microsoft.ServiceBus/Topic" | "PowerBI" | "Microsoft.DataLake/Accounts" | "GatewayMessageBus"; } // @public (undocumented) -export type OutputDataSourceUnion = OutputDataSource | BlobOutputDataSource | AzureTableOutputDataSource | EventHubOutputDataSource | EventHubV2OutputDataSource | AzureSqlDatabaseOutputDataSource | AzureSynapseOutputDataSource | DocumentDbOutputDataSource | ServiceBusQueueOutputDataSource | ServiceBusTopicOutputDataSource | PowerBIOutputDataSource | AzureDataLakeStoreOutputDataSource; +export type OutputDataSourceUnion = OutputDataSource | BlobOutputDataSource | AzureTableOutputDataSource | EventHubOutputDataSource | EventHubV2OutputDataSource | AzureSqlDatabaseOutputDataSource | AzureSynapseOutputDataSource | DocumentDbOutputDataSource | AzureFunctionOutputDataSource | ServiceBusQueueOutputDataSource | ServiceBusTopicOutputDataSource | PowerBIOutputDataSource | AzureDataLakeStoreOutputDataSource | GatewayMessageBusOutputDataSource; // @public export type OutputErrorPolicy = string; @@ -1075,39 +1102,39 @@ export interface OutputsUpdateOptionalParams extends coreClient.OperationOptions export type OutputsUpdateResponse = OutputsUpdateHeaders & Output; // @public -export type ParquetSerialization = Serialization & { - type: "Parquet"; +export interface ParquetSerialization extends Serialization { properties?: Record; -}; + type: "Parquet"; +} // @public -export type PowerBIOutputDataSource = OutputDataSource & { - type: "PowerBI"; - refreshToken?: string; - tokenUserPrincipalName?: string; - tokenUserDisplayName?: string; +export interface PowerBIOutputDataSource extends OutputDataSource { + authenticationMode?: AuthenticationMode; dataset?: string; - table?: string; groupId?: string; groupName?: string; - authenticationMode?: AuthenticationMode; -}; + refreshToken?: string; + table?: string; + tokenUserDisplayName?: string; + tokenUserPrincipalName?: string; + type: "PowerBI"; +} // @public -export type PowerBIOutputDataSourceProperties = OAuthBasedDataSourceProperties & { +export interface PowerBIOutputDataSourceProperties extends OAuthBasedDataSourceProperties { + authenticationMode?: AuthenticationMode; dataset?: string; - table?: string; groupId?: string; groupName?: string; - authenticationMode?: AuthenticationMode; -}; + table?: string; +} // @public -export type PrivateEndpoint = ProxyResource & { - readonly etag?: string; +export interface PrivateEndpoint extends ProxyResource { readonly createdDate?: string; + readonly etag?: string; manualPrivateLinkServiceConnections?: PrivateLinkServiceConnection[]; -}; +} // @public export interface PrivateEndpointListResult { @@ -1176,21 +1203,22 @@ export interface PrivateLinkServiceConnection { } // @public -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource { +} // @public export interface ReferenceInputDataSource { - type: "Microsoft.Storage/Blob" | "Microsoft.Sql/Server/Database"; + type: "File" | "Microsoft.Storage/Blob" | "Microsoft.Sql/Server/Database"; } // @public (undocumented) -export type ReferenceInputDataSourceUnion = ReferenceInputDataSource | BlobReferenceInputDataSource | AzureSqlReferenceInputDataSource; +export type ReferenceInputDataSourceUnion = ReferenceInputDataSource | FileReferenceInputDataSource | BlobReferenceInputDataSource | AzureSqlReferenceInputDataSource; // @public -export type ReferenceInputProperties = InputProperties & { - type: "Reference"; +export interface ReferenceInputProperties extends InputProperties { datasource?: ReferenceInputDataSourceUnion; -}; + type: "Reference"; +} // @public export type RefreshType = string; @@ -1209,12 +1237,9 @@ export interface ResourceTestStatus { } // @public -export type ScalarFunctionProperties = FunctionProperties & { +export interface ScalarFunctionProperties extends FunctionProperties { type: "Scalar"; - inputs?: FunctionInput[]; - output?: FunctionOutput; - binding?: FunctionBindingUnion; -}; +} // @public export interface ScaleStreamingJobParameters { @@ -1238,46 +1263,46 @@ export interface ServiceBusDataSourceProperties { } // @public -export type ServiceBusQueueOutputDataSource = OutputDataSource & { - type: "Microsoft.ServiceBus/Queue"; - serviceBusNamespace?: string; - sharedAccessPolicyName?: string; - sharedAccessPolicyKey?: string; +export interface ServiceBusQueueOutputDataSource extends OutputDataSource { authenticationMode?: AuthenticationMode; - queueName?: string; propertyColumns?: string[]; + queueName?: string; + serviceBusNamespace?: string; + sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; systemPropertyColumns?: Record; -}; + type: "Microsoft.ServiceBus/Queue"; +} // @public -export type ServiceBusQueueOutputDataSourceProperties = ServiceBusDataSourceProperties & { - queueName?: string; +export interface ServiceBusQueueOutputDataSourceProperties extends ServiceBusDataSourceProperties { propertyColumns?: string[]; + queueName?: string; systemPropertyColumns?: Record; -}; +} // @public -export type ServiceBusTopicOutputDataSource = OutputDataSource & { - type: "Microsoft.ServiceBus/Topic"; - serviceBusNamespace?: string; - sharedAccessPolicyName?: string; - sharedAccessPolicyKey?: string; +export interface ServiceBusTopicOutputDataSource extends OutputDataSource { authenticationMode?: AuthenticationMode; - topicName?: string; propertyColumns?: string[]; + serviceBusNamespace?: string; + sharedAccessPolicyKey?: string; + sharedAccessPolicyName?: string; systemPropertyColumns?: { [propertyName: string]: string; }; -}; + topicName?: string; + type: "Microsoft.ServiceBus/Topic"; +} // @public -export type ServiceBusTopicOutputDataSourceProperties = ServiceBusDataSourceProperties & { - topicName?: string; +export interface ServiceBusTopicOutputDataSourceProperties extends ServiceBusDataSourceProperties { propertyColumns?: string[]; systemPropertyColumns?: { [propertyName: string]: string; }; -}; + topicName?: string; +} // @public export interface Sku { @@ -1336,32 +1361,32 @@ export interface StreamAnalyticsManagementClientOptionalParams extends coreClien } // @public -export type StreamingJob = TrackedResource & { +export interface StreamingJob extends TrackedResource { + cluster?: ClusterInfo; + compatibilityLevel?: CompatibilityLevel; + contentStoragePolicy?: ContentStoragePolicy; + readonly createdDate?: Date; + dataLocale?: string; + readonly etag?: string; + eventsLateArrivalMaxDelayInSeconds?: number; + eventsOutOfOrderMaxDelayInSeconds?: number; + eventsOutOfOrderPolicy?: EventsOutOfOrderPolicy; + functions?: FunctionModel[]; identity?: Identity; - sku?: Sku; + inputs?: Input[]; readonly jobId?: string; - readonly provisioningState?: string; readonly jobState?: string; + jobStorageAccount?: JobStorageAccount; jobType?: JobType; - outputStartMode?: OutputStartMode; - outputStartTime?: Date; readonly lastOutputEventTime?: Date; - eventsOutOfOrderPolicy?: EventsOutOfOrderPolicy; outputErrorPolicy?: OutputErrorPolicy; - eventsOutOfOrderMaxDelayInSeconds?: number; - eventsLateArrivalMaxDelayInSeconds?: number; - dataLocale?: string; - compatibilityLevel?: CompatibilityLevel; - readonly createdDate?: Date; - inputs?: Input[]; - transformation?: Transformation; outputs?: Output[]; - functions?: FunctionModel[]; - readonly etag?: string; - jobStorageAccount?: JobStorageAccount; - contentStoragePolicy?: ContentStoragePolicy; - cluster?: ClusterInfo; -}; + outputStartMode?: OutputStartMode; + outputStartTime?: Date; + readonly provisioningState?: string; + sku?: Sku; + transformation?: Transformation; +} // @public export interface StreamingJobListResult { @@ -1489,17 +1514,17 @@ export type StreamingJobsUpdateResponse = StreamingJobsUpdateHeaders & Streaming // @public export interface StreamInputDataSource { - type: "Microsoft.Storage/Blob" | "Microsoft.ServiceBus/EventHub" | "Microsoft.EventHub/EventHub" | "Microsoft.Devices/IotHubs"; + type: "Microsoft.Storage/Blob" | "Microsoft.ServiceBus/EventHub" | "Microsoft.EventHub/EventHub" | "Microsoft.Devices/IotHubs" | "GatewayMessageBus"; } // @public (undocumented) -export type StreamInputDataSourceUnion = StreamInputDataSource | BlobStreamInputDataSource | EventHubStreamInputDataSource | EventHubV2StreamInputDataSource | IoTHubStreamInputDataSource; +export type StreamInputDataSourceUnion = StreamInputDataSource | BlobStreamInputDataSource | EventHubStreamInputDataSource | EventHubV2StreamInputDataSource | IoTHubStreamInputDataSource | GatewayMessageBusStreamInputDataSource; // @public -export type StreamInputProperties = InputProperties & { - type: "Stream"; +export interface StreamInputProperties extends InputProperties { datasource?: StreamInputDataSourceUnion; -}; + type: "Stream"; +} // @public export interface SubResource { @@ -1509,10 +1534,10 @@ export interface SubResource { } // @public -export type SubscriptionQuota = SubResource & { - readonly maxCount?: number; +export interface SubscriptionQuota extends SubResource { readonly currentCount?: number; -}; + readonly maxCount?: number; +} // @public export interface SubscriptionQuotasListResult { @@ -1532,20 +1557,20 @@ export interface SubscriptionsListQuotasOptionalParams extends coreClient.Operat export type SubscriptionsListQuotasResponse = SubscriptionQuotasListResult; // @public -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { + location?: string; tags?: { [propertyName: string]: string; }; - location?: string; -}; +} // @public -export type Transformation = SubResource & { +export interface Transformation extends SubResource { + readonly etag?: string; + query?: string; streamingUnits?: number; validStreamingUnits?: number[]; - query?: string; - readonly etag?: string; -}; +} // @public export interface Transformations { diff --git a/sdk/streamanalytics/arm-streamanalytics/src/models/index.ts b/sdk/streamanalytics/arm-streamanalytics/src/models/index.ts index a6c6e2ffaa4a..2ac7cbc59455 100644 --- a/sdk/streamanalytics/arm-streamanalytics/src/models/index.ts +++ b/sdk/streamanalytics/arm-streamanalytics/src/models/index.ts @@ -27,13 +27,20 @@ export type OutputDataSourceUnion = | AzureSqlDatabaseOutputDataSource | AzureSynapseOutputDataSource | DocumentDbOutputDataSource + | AzureFunctionOutputDataSource | ServiceBusQueueOutputDataSource | ServiceBusTopicOutputDataSource | PowerBIOutputDataSource - | AzureDataLakeStoreOutputDataSource; + | AzureDataLakeStoreOutputDataSource + | GatewayMessageBusOutputDataSource; export type FunctionPropertiesUnion = | FunctionProperties - | ScalarFunctionProperties; + | ScalarFunctionProperties + | AggregateFunctionProperties; +export type FunctionBindingUnion = + | FunctionBinding + | AzureMachineLearningWebServiceFunctionBinding + | JavaScriptFunctionBinding; export type FunctionRetrieveDefaultDefinitionParametersUnion = | FunctionRetrieveDefaultDefinitionParameters | AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters @@ -43,15 +50,13 @@ export type StreamInputDataSourceUnion = | BlobStreamInputDataSource | EventHubStreamInputDataSource | EventHubV2StreamInputDataSource - | IoTHubStreamInputDataSource; + | IoTHubStreamInputDataSource + | GatewayMessageBusStreamInputDataSource; export type ReferenceInputDataSourceUnion = | ReferenceInputDataSource + | FileReferenceInputDataSource | BlobReferenceInputDataSource | AzureSqlReferenceInputDataSource; -export type FunctionBindingUnion = - | FunctionBinding - | AzureMachineLearningWebServiceFunctionBinding - | JavaScriptFunctionBinding; /** Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the next set of results. */ export interface OperationListResult { @@ -230,21 +235,50 @@ export interface OutputDataSource { | "Microsoft.Sql/Server/Database" | "Microsoft.Sql/Server/DataWarehouse" | "Microsoft.Storage/DocumentDB" + | "Microsoft.AzureFunction" | "Microsoft.ServiceBus/Queue" | "Microsoft.ServiceBus/Topic" | "PowerBI" - | "Microsoft.DataLake/Accounts"; + | "Microsoft.DataLake/Accounts" + | "GatewayMessageBus"; } /** The properties that are associated with a function. */ export interface FunctionProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Scalar"; + type: "Scalar" | "Aggregate"; /** * The current entity tag for the function. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; + inputs?: FunctionInput[]; + /** Describes the output of a function. */ + output?: FunctionOutput; + /** The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. */ + binding?: FunctionBindingUnion; +} + +/** Describes one input parameter of a function. */ +export interface FunctionInput { + /** The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx */ + dataType?: string; + /** A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. */ + isConfigurationParameter?: boolean; +} + +/** Describes the output of a function. */ +export interface FunctionOutput { + /** The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx */ + dataType?: string; +} + +/** The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. */ +export interface FunctionBinding { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: + | "Microsoft.MachineLearning/WebService" + | "Microsoft.StreamAnalytics/JavascriptUdf"; } /** The properties that are associated with an Azure Storage account */ @@ -263,10 +297,16 @@ export interface ClusterInfo { /** Describes how identity is verified */ export interface Identity { - /** The identity tenantId */ - tenantId?: string; - /** The identity principal ID */ - principalId?: string; + /** + * The identity tenantId + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** + * The identity principal ID + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; /** The identity type */ type?: string; } @@ -515,13 +555,14 @@ export interface StreamInputDataSource { | "Microsoft.Storage/Blob" | "Microsoft.ServiceBus/EventHub" | "Microsoft.EventHub/EventHub" - | "Microsoft.Devices/IotHubs"; + | "Microsoft.Devices/IotHubs" + | "GatewayMessageBus"; } /** Describes an input data source that contains reference data. */ export interface ReferenceInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Microsoft.Storage/Blob" | "Microsoft.Sql/Server/Database"; + type: "File" | "Microsoft.Storage/Blob" | "Microsoft.Sql/Server/Database"; } /** The properties that are associated with a blob data source. */ @@ -536,6 +577,8 @@ export interface BlobDataSourceProperties { dateFormat?: string; /** The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. */ timeFormat?: string; + /** Authentication Mode. */ + authenticationMode?: AuthenticationMode; } /** The common properties that are associated with Service Bus data sources (Queues, Topics, Event Hubs, etc.). */ @@ -550,6 +593,12 @@ export interface ServiceBusDataSourceProperties { authenticationMode?: AuthenticationMode; } +/** The properties that are associated with a gateway message bus datasource. */ +export interface GatewayMessageBusSourceProperties { + /** The name of the Service Bus topic. */ + topic?: string; +} + /** The properties that are associated with an Azure SQL database data source. */ export interface AzureSqlDatabaseDataSourceProperties { /** The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. */ @@ -594,28 +643,6 @@ export interface OAuthBasedDataSourceProperties { tokenUserDisplayName?: string; } -/** Describes one input parameter of a function. */ -export interface FunctionInput { - /** The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx */ - dataType?: string; - /** A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. */ - isConfigurationParameter?: boolean; -} - -/** Describes the output of a function. */ -export interface FunctionOutput { - /** The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx */ - dataType?: string; -} - -/** The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. */ -export interface FunctionBinding { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: - | "Microsoft.MachineLearning/WebService" - | "Microsoft.StreamAnalytics/JavascriptUdf"; -} - /** The inputs for the Azure Machine Learning web service endpoint. */ export interface AzureMachineLearningWebServiceInputs { /** The name of the input. This is the name provided while authoring the endpoint. */ @@ -643,65 +670,65 @@ export interface AzureMachineLearningWebServiceOutputColumn { } /** The properties that are associated with an input containing stream data. */ -export type StreamInputProperties = InputProperties & { +export interface StreamInputProperties extends InputProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Stream"; /** Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests. */ datasource?: StreamInputDataSourceUnion; -}; +} /** The properties that are associated with an input containing reference data. */ -export type ReferenceInputProperties = InputProperties & { +export interface ReferenceInputProperties extends InputProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Reference"; /** Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. */ datasource?: ReferenceInputDataSourceUnion; -}; +} /** Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. */ -export type ParquetSerialization = Serialization & { +export interface ParquetSerialization extends Serialization { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Parquet"; /** The properties that are associated with the Parquet serialization type. Required on PUT (CreateOrReplace) requests. */ properties?: Record; -}; +} /** Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. */ -export type CsvSerialization = Serialization & { +export interface CsvSerialization extends Serialization { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Csv"; /** Specifies the delimiter that will be used to separate comma-separated value (CSV) records. 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 list of supported values. Required on PUT (CreateOrReplace) requests. */ fieldDelimiter?: string; /** Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. */ encoding?: Encoding; -}; +} /** Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. */ -export type JsonSerialization = Serialization & { +export interface JsonSerialization extends Serialization { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Json"; /** Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. */ encoding?: Encoding; /** This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. */ format?: JsonOutputSerializationFormat; -}; +} /** Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. */ -export type AvroSerialization = Serialization & { +export interface AvroSerialization extends Serialization { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Avro"; /** The properties that are associated with the Avro serialization type. Required on PUT (CreateOrReplace) requests. */ properties?: Record; -}; +} /** An input object, containing all information associated with the named input. All inputs are contained under a streaming job. */ -export type Input = SubResource & { +export interface Input extends SubResource { /** The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. */ properties?: InputPropertiesUnion; -}; +} /** A transformation object, containing all information associated with the named transformation. All transformations are contained under a streaming job. */ -export type Transformation = SubResource & { +export interface Transformation extends SubResource { /** Specifies the number of streaming units that the streaming job uses. */ streamingUnits?: number; /** Specifies the valid streaming units a streaming job can scale to. */ @@ -713,10 +740,10 @@ export type Transformation = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; -}; +} /** An output object, containing all information associated with the named output. All outputs are contained under a streaming job. */ -export type Output = SubResource & { +export interface Output extends SubResource { /** Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. */ datasource?: OutputDataSourceUnion; /** The time frame for filtering Stream Analytics job outputs. */ @@ -735,16 +762,16 @@ export type Output = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; -}; +} /** A function object, containing all information associated with the named function. All functions are contained under a streaming job. */ -export type FunctionModel = SubResource & { +export interface FunctionModel extends SubResource { /** The properties that are associated with a function. */ properties?: FunctionPropertiesUnion; -}; +} /** Describes the current quota for the subscription. */ -export type SubscriptionQuota = SubResource & { +export interface SubscriptionQuota extends SubResource { /** * The max permitted usage of this resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -755,10 +782,10 @@ export type SubscriptionQuota = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentCount?: number; -}; +} /** Describes a blob output data source. */ -export type BlobOutputDataSource = OutputDataSource & { +export interface BlobOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Storage/Blob"; /** A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. */ @@ -773,10 +800,12 @@ export type BlobOutputDataSource = OutputDataSource & { timeFormat?: string; /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; + /** Blob path prefix. */ + blobPathPrefix?: string; +} /** Describes an Azure Table output data source. */ -export type AzureTableOutputDataSource = OutputDataSource & { +export interface AzureTableOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Storage/Table"; /** The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. */ @@ -793,10 +822,10 @@ export type AzureTableOutputDataSource = OutputDataSource & { columnsToRemove?: string[]; /** The number of rows to write to the Azure Table at a time. */ batchSize?: number; -}; +} /** Describes an Event Hub output data source. */ -export type EventHubOutputDataSource = OutputDataSource & { +export interface EventHubOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.ServiceBus/EventHub"; /** The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. */ @@ -813,10 +842,10 @@ export type EventHubOutputDataSource = OutputDataSource & { partitionKey?: string; /** The properties associated with this Event Hub output. */ propertyColumns?: string[]; -}; +} /** Describes an Event Hub output data source. */ -export type EventHubV2OutputDataSource = OutputDataSource & { +export interface EventHubV2OutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.EventHub/EventHub"; /** The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. */ @@ -833,10 +862,10 @@ export type EventHubV2OutputDataSource = OutputDataSource & { partitionKey?: string; /** The properties associated with this Event Hub output. */ propertyColumns?: string[]; -}; +} /** Describes an Azure SQL database output data source. */ -export type AzureSqlDatabaseOutputDataSource = OutputDataSource & { +export interface AzureSqlDatabaseOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Sql/Server/Database"; /** The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. */ @@ -855,10 +884,10 @@ export type AzureSqlDatabaseOutputDataSource = OutputDataSource & { maxWriterCount?: number; /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; +} /** Describes an Azure Synapse output data source. */ -export type AzureSynapseOutputDataSource = OutputDataSource & { +export interface AzureSynapseOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Sql/Server/DataWarehouse"; /** The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. */ @@ -871,10 +900,10 @@ export type AzureSynapseOutputDataSource = OutputDataSource & { user?: string; /** The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. */ password?: string; -}; +} /** Describes a DocumentDB output data source. */ -export type DocumentDbOutputDataSource = OutputDataSource & { +export interface DocumentDbOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Storage/DocumentDB"; /** The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests. */ @@ -889,10 +918,26 @@ export type DocumentDbOutputDataSource = OutputDataSource & { partitionKey?: string; /** The name of the field in output events used to specify the primary key which insert or update operations are based on. */ documentId?: string; -}; +} + +/** Defines the metadata of AzureFunctionOutputDataSource */ +export interface AzureFunctionOutputDataSource extends OutputDataSource { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Microsoft.AzureFunction"; + /** The name of your Azure Functions app. */ + functionAppName?: string; + /** The name of the function in your Azure Functions app. */ + functionName?: string; + /** If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. */ + apiKey?: string; + /** A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB). */ + maxBatchSize?: number; + /** A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100. */ + maxBatchCount?: number; +} /** Describes a Service Bus Queue output data source. */ -export type ServiceBusQueueOutputDataSource = OutputDataSource & { +export interface ServiceBusQueueOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.ServiceBus/Queue"; /** The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. */ @@ -909,10 +954,10 @@ export type ServiceBusQueueOutputDataSource = OutputDataSource & { propertyColumns?: string[]; /** The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc. */ systemPropertyColumns?: Record; -}; +} /** Describes a Service Bus Topic output data source. */ -export type ServiceBusTopicOutputDataSource = OutputDataSource & { +export interface ServiceBusTopicOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.ServiceBus/Topic"; /** The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. */ @@ -929,10 +974,10 @@ export type ServiceBusTopicOutputDataSource = OutputDataSource & { propertyColumns?: string[]; /** The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc. */ systemPropertyColumns?: { [propertyName: string]: string }; -}; +} /** Describes a Power BI output data source. */ -export type PowerBIOutputDataSource = OutputDataSource & { +export interface PowerBIOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "PowerBI"; /** A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. */ @@ -951,10 +996,10 @@ export type PowerBIOutputDataSource = OutputDataSource & { groupName?: string; /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; +} /** Describes an Azure Data Lake Store output data source. */ -export type AzureDataLakeStoreOutputDataSource = OutputDataSource & { +export interface AzureDataLakeStoreOutputDataSource extends OutputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.DataLake/Accounts"; /** A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. */ @@ -975,59 +1020,94 @@ export type AzureDataLakeStoreOutputDataSource = OutputDataSource & { timeFormat?: string; /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; +} + +/** Describes a Gateway Message Bus output data source. */ +export interface GatewayMessageBusOutputDataSource extends OutputDataSource { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "GatewayMessageBus"; + /** The name of the Service Bus topic. */ + topic?: string; +} /** The properties that are associated with a scalar function. */ -export type ScalarFunctionProperties = FunctionProperties & { +export interface ScalarFunctionProperties extends FunctionProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Scalar"; - /** A list of inputs describing the parameters of the function. */ - inputs?: FunctionInput[]; - /** The output of the function. */ - output?: FunctionOutput; - /** The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. */ - binding?: FunctionBindingUnion; -}; +} + +/** The properties that are associated with an aggregate function. */ +export interface AggregateFunctionProperties extends FunctionProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Aggregate"; +} + +/** The binding to an Azure Machine Learning web service. */ +export interface AzureMachineLearningWebServiceFunctionBinding + extends FunctionBinding { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Microsoft.MachineLearning/WebService"; + /** The Request-Response execute endpoint of the Azure Machine Learning web service. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs */ + endpoint?: string; + /** The API key used to authenticate with Request-Response endpoint. */ + apiKey?: string; + /** The inputs for the Azure Machine Learning web service endpoint. */ + inputs?: AzureMachineLearningWebServiceInputs; + /** A list of outputs from the Azure Machine Learning web service endpoint execution. */ + outputs?: AzureMachineLearningWebServiceOutputColumn[]; + /** Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. */ + batchSize?: number; +} + +/** The binding to a JavaScript function. */ +export interface JavaScriptFunctionBinding extends FunctionBinding { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Microsoft.StreamAnalytics/JavascriptUdf"; + /** The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' */ + script?: string; +} /** The properties that are associated with an Azure Storage account with MSI */ -export type JobStorageAccount = StorageAccount & { +export interface JobStorageAccount extends StorageAccount { /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; +} /** The resource model definition for a ARM tracked top level resource */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location?: string; -}; +} /** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource {} /** The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. */ -export type AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters = FunctionRetrieveDefaultDefinitionParameters & { +export interface AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters + extends FunctionRetrieveDefaultDefinitionParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ bindingType: "Microsoft.MachineLearning/WebService"; /** The Request-Response execute endpoint of the Azure Machine Learning web service. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs */ executeEndpoint?: string; /** The function type. */ udfType?: "Scalar"; -}; +} /** The parameters needed to retrieve the default function definition for a JavaScript function. */ -export type JavaScriptFunctionRetrieveDefaultDefinitionParameters = FunctionRetrieveDefaultDefinitionParameters & { +export interface JavaScriptFunctionRetrieveDefaultDefinitionParameters + extends FunctionRetrieveDefaultDefinitionParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ bindingType: "Microsoft.StreamAnalytics/JavascriptUdf"; /** The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. */ script?: string; /** The function type. */ udfType?: "Scalar"; -}; +} /** Describes a blob input data source that contains stream data. */ -export type BlobStreamInputDataSource = StreamInputDataSource & { +export interface BlobStreamInputDataSource extends StreamInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Storage/Blob"; /** A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. */ @@ -1040,12 +1120,14 @@ export type BlobStreamInputDataSource = StreamInputDataSource & { dateFormat?: string; /** The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. */ timeFormat?: string; - /** The partition count of the blob input data source. Range 1 - 256. */ + /** Authentication Mode. */ + authenticationMode?: AuthenticationMode; + /** The partition count of the blob input data source. Range 1 - 1024. */ sourcePartitionCount?: number; -}; +} /** Describes an Event Hub input data source that contains stream data. */ -export type EventHubStreamInputDataSource = StreamInputDataSource & { +export interface EventHubStreamInputDataSource extends StreamInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.ServiceBus/EventHub"; /** The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. */ @@ -1060,10 +1142,10 @@ export type EventHubStreamInputDataSource = StreamInputDataSource & { eventHubName?: string; /** The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group. */ consumerGroupName?: string; -}; +} /** Describes an Event Hub input data source that contains stream data. */ -export type EventHubV2StreamInputDataSource = StreamInputDataSource & { +export interface EventHubV2StreamInputDataSource extends StreamInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.EventHub/EventHub"; /** The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests. */ @@ -1078,10 +1160,10 @@ export type EventHubV2StreamInputDataSource = StreamInputDataSource & { eventHubName?: string; /** The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group. */ consumerGroupName?: string; -}; +} /** Describes an IoT Hub input data source that contains stream data. */ -export type IoTHubStreamInputDataSource = StreamInputDataSource & { +export interface IoTHubStreamInputDataSource extends StreamInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Devices/IotHubs"; /** The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests. */ @@ -1094,10 +1176,27 @@ export type IoTHubStreamInputDataSource = StreamInputDataSource & { consumerGroupName?: string; /** The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). */ endpoint?: string; -}; +} + +/** Describes a blob input data source that contains stream data. */ +export interface GatewayMessageBusStreamInputDataSource + extends StreamInputDataSource { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "GatewayMessageBus"; + /** The name of the Service Bus topic. */ + topic?: string; +} + +/** Describes a file input data source that contains reference data. */ +export interface FileReferenceInputDataSource extends ReferenceInputDataSource { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "File"; + /** The path of the file. */ + path?: string; +} /** Describes a blob input data source that contains reference data. */ -export type BlobReferenceInputDataSource = ReferenceInputDataSource & { +export interface BlobReferenceInputDataSource extends ReferenceInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Storage/Blob"; /** A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. */ @@ -1110,10 +1209,13 @@ export type BlobReferenceInputDataSource = ReferenceInputDataSource & { dateFormat?: string; /** The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. */ timeFormat?: string; -}; + /** Authentication Mode. */ + authenticationMode?: AuthenticationMode; +} /** Describes an Azure SQL database reference input data source. */ -export type AzureSqlReferenceInputDataSource = ReferenceInputDataSource & { +export interface AzureSqlReferenceInputDataSource + extends ReferenceInputDataSource { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Microsoft.Sql/Server/Database"; /** This element is associated with the datasource element. This is the name of the server that contains the database that will be written to. */ @@ -1134,57 +1236,74 @@ export type AzureSqlReferenceInputDataSource = ReferenceInputDataSource & { fullSnapshotQuery?: string; /** This element is associated with the datasource element. This query is used to fetch incremental changes from the SQL database. To use this option, we recommend using temporal tables in Azure SQL Database. */ deltaSnapshotQuery?: string; -}; +} /** The properties that are associated with a blob input containing stream data. */ -export type BlobStreamInputDataSourceProperties = BlobDataSourceProperties & { - /** The partition count of the blob input data source. Range 1 - 256. */ +export interface BlobStreamInputDataSourceProperties + extends BlobDataSourceProperties { + /** The partition count of the blob input data source. Range 1 - 1024. */ sourcePartitionCount?: number; -}; +} /** The properties that are associated with a blob input containing reference data. */ -export type BlobReferenceInputDataSourceProperties = BlobDataSourceProperties & {}; +export interface BlobReferenceInputDataSourceProperties + extends BlobDataSourceProperties {} /** The properties that are associated with a blob output. */ -export type BlobOutputDataSourceProperties = BlobDataSourceProperties & { - /** Authentication Mode. */ - authenticationMode?: AuthenticationMode; -}; +export interface BlobOutputDataSourceProperties + extends BlobDataSourceProperties { + /** Blob path prefix. */ + blobPathPrefix?: string; +} /** The common properties that are associated with Event Hub data sources. */ -export type EventHubDataSourceProperties = ServiceBusDataSourceProperties & { +export interface EventHubDataSourceProperties + extends ServiceBusDataSourceProperties { /** The name of the Event Hub. Required on PUT (CreateOrReplace) requests. */ eventHubName?: string; -}; +} /** The properties that are associated with a Service Bus Queue output. */ -export type ServiceBusQueueOutputDataSourceProperties = ServiceBusDataSourceProperties & { +export interface ServiceBusQueueOutputDataSourceProperties + extends ServiceBusDataSourceProperties { /** The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. */ queueName?: string; /** A string array of the names of output columns to be attached to Service Bus messages as custom properties. */ propertyColumns?: string[]; /** The system properties associated with the Service Bus Queue. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc. */ systemPropertyColumns?: Record; -}; +} /** The properties that are associated with a Service Bus Topic output. */ -export type ServiceBusTopicOutputDataSourceProperties = ServiceBusDataSourceProperties & { +export interface ServiceBusTopicOutputDataSourceProperties + extends ServiceBusDataSourceProperties { /** The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. */ topicName?: string; /** A string array of the names of output columns to be attached to Service Bus messages as custom properties. */ propertyColumns?: string[]; /** The system properties associated with the Service Bus Topic Output. The following system properties are supported: ReplyToSessionId, ContentType, To, Subject, CorrelationId, TimeToLive, PartitionKey, SessionId, ScheduledEnqueueTime, MessageId, ReplyTo, Label, ScheduledEnqueueTimeUtc. */ systemPropertyColumns?: { [propertyName: string]: string }; -}; +} + +/** The properties that are associated with a gateway message bus input containing stream data. */ +export interface GatewayMessageBusStreamInputDataSourceProperties + extends GatewayMessageBusSourceProperties {} + +/** The properties that are associated with a Gateway Message Bus. */ +export interface GatewayMessageBusOutputDataSourceProperties + extends GatewayMessageBusSourceProperties {} /** The properties that are associated with an Azure SQL database output. */ -export type AzureSqlDatabaseOutputDataSourceProperties = AzureSqlDatabaseDataSourceProperties & {}; +export interface AzureSqlDatabaseOutputDataSourceProperties + extends AzureSqlDatabaseDataSourceProperties {} /** The properties that are associated with an Azure Synapse output. */ -export type AzureSynapseOutputDataSourceProperties = AzureSynapseDataSourceProperties & {}; +export interface AzureSynapseOutputDataSourceProperties + extends AzureSynapseDataSourceProperties {} /** The properties that are associated with a Power BI output. */ -export type PowerBIOutputDataSourceProperties = OAuthBasedDataSourceProperties & { +export interface PowerBIOutputDataSourceProperties + extends OAuthBasedDataSourceProperties { /** The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. */ dataset?: string; /** The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. */ @@ -1195,10 +1314,11 @@ export type PowerBIOutputDataSourceProperties = OAuthBasedDataSourceProperties & groupName?: string; /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; +} /** The properties that are associated with an Azure Data Lake Store. */ -export type AzureDataLakeStoreOutputDataSourceProperties = OAuthBasedDataSourceProperties & { +export interface AzureDataLakeStoreOutputDataSourceProperties + extends OAuthBasedDataSourceProperties { /** The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. */ accountName?: string; /** The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests. */ @@ -1211,34 +1331,10 @@ export type AzureDataLakeStoreOutputDataSourceProperties = OAuthBasedDataSourceP timeFormat?: string; /** Authentication Mode. */ authenticationMode?: AuthenticationMode; -}; - -/** The binding to an Azure Machine Learning web service. */ -export type AzureMachineLearningWebServiceFunctionBinding = FunctionBinding & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Microsoft.MachineLearning/WebService"; - /** The Request-Response execute endpoint of the Azure Machine Learning web service. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs */ - endpoint?: string; - /** The API key used to authenticate with Request-Response endpoint. */ - apiKey?: string; - /** The inputs for the Azure Machine Learning web service endpoint. */ - inputs?: AzureMachineLearningWebServiceInputs; - /** A list of outputs from the Azure Machine Learning web service endpoint execution. */ - outputs?: AzureMachineLearningWebServiceOutputColumn[]; - /** Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. */ - batchSize?: number; -}; - -/** The binding to a JavaScript function. */ -export type JavaScriptFunctionBinding = FunctionBinding & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Microsoft.StreamAnalytics/JavascriptUdf"; - /** The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' */ - script?: string; -}; +} /** A streaming job object, containing all information associated with the named streaming job. */ -export type StreamingJob = TrackedResource & { +export interface StreamingJob extends TrackedResource { /** Describes the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs. */ identity?: Identity; /** Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. */ @@ -1305,10 +1401,10 @@ export type StreamingJob = TrackedResource & { contentStoragePolicy?: ContentStoragePolicy; /** The cluster which streaming jobs will run on. */ cluster?: ClusterInfo; -}; +} /** A Stream Analytics Cluster object */ -export type Cluster = TrackedResource & { +export interface Cluster extends TrackedResource { /** The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. */ sku?: ClusterSku; /** @@ -1341,10 +1437,10 @@ export type Cluster = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly capacityAssigned?: number; -}; +} /** Complete information about the private endpoint. */ -export type PrivateEndpoint = ProxyResource & { +export interface PrivateEndpoint extends ProxyResource { /** * Unique opaque string (generally a GUID) that represents the metadata state of the resource (private endpoint) and changes whenever the resource is updated. Required on PUT (CreateOrUpdate) requests. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1357,21 +1453,23 @@ export type PrivateEndpoint = ProxyResource & { readonly createdDate?: string; /** A list of connections to the remote resource. Immutable after it is set. */ manualPrivateLinkServiceConnections?: PrivateLinkServiceConnection[]; -}; +} /** The properties that are associated with a Event Hub input containing stream data. */ -export type EventHubStreamInputDataSourceProperties = EventHubDataSourceProperties & { +export interface EventHubStreamInputDataSourceProperties + extends EventHubDataSourceProperties { /** The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group. */ consumerGroupName?: string; -}; +} /** The properties that are associated with an Event Hub output. */ -export type EventHubOutputDataSourceProperties = EventHubDataSourceProperties & { +export interface EventHubOutputDataSourceProperties + extends EventHubDataSourceProperties { /** The key/column that is used to determine to which partition to send event data. */ partitionKey?: string; /** The properties associated with this Event Hub output. */ propertyColumns?: string[]; -}; +} /** Defines headers for StreamingJobs_createOrReplace operation. */ export interface StreamingJobsCreateOrReplaceHeaders { @@ -1465,6 +1563,7 @@ export interface FunctionsGetHeaders { /** Known values of {@link SkuName} that the service accepts. */ export enum KnownSkuName { + /** Standard */ Standard = "Standard" } @@ -1479,7 +1578,9 @@ export type SkuName = string; /** Known values of {@link JobType} that the service accepts. */ export enum KnownJobType { + /** Cloud */ Cloud = "Cloud", + /** Edge */ Edge = "Edge" } @@ -1495,8 +1596,11 @@ export type JobType = string; /** Known values of {@link OutputStartMode} that the service accepts. */ export enum KnownOutputStartMode { + /** JobStartTime */ JobStartTime = "JobStartTime", + /** CustomTime */ CustomTime = "CustomTime", + /** LastOutputEventTime */ LastOutputEventTime = "LastOutputEventTime" } @@ -1513,7 +1617,9 @@ export type OutputStartMode = string; /** Known values of {@link EventsOutOfOrderPolicy} that the service accepts. */ export enum KnownEventsOutOfOrderPolicy { + /** Adjust */ Adjust = "Adjust", + /** Drop */ Drop = "Drop" } @@ -1529,7 +1635,9 @@ export type EventsOutOfOrderPolicy = string; /** Known values of {@link OutputErrorPolicy} that the service accepts. */ export enum KnownOutputErrorPolicy { + /** Stop */ Stop = "Stop", + /** Drop */ Drop = "Drop" } @@ -1545,7 +1653,9 @@ export type OutputErrorPolicy = string; /** Known values of {@link CompatibilityLevel} that the service accepts. */ export enum KnownCompatibilityLevel { + /** One0 */ One0 = "1.0", + /** One2 */ One2 = "1.2" } @@ -1561,9 +1671,13 @@ export type CompatibilityLevel = string; /** Known values of {@link EventSerializationType} that the service accepts. */ export enum KnownEventSerializationType { + /** Csv */ Csv = "Csv", + /** Avro */ Avro = "Avro", + /** Json */ Json = "Json", + /** Parquet */ Parquet = "Parquet" } @@ -1581,8 +1695,11 @@ export type EventSerializationType = string; /** Known values of {@link CompressionType} that the service accepts. */ export enum KnownCompressionType { + /** None */ None = "None", + /** GZip */ GZip = "GZip", + /** Deflate */ Deflate = "Deflate" } @@ -1599,8 +1716,11 @@ export type CompressionType = string; /** Known values of {@link AuthenticationMode} that the service accepts. */ export enum KnownAuthenticationMode { + /** Msi */ Msi = "Msi", + /** UserToken */ UserToken = "UserToken", + /** ConnectionString */ ConnectionString = "ConnectionString" } @@ -1617,7 +1737,9 @@ export type AuthenticationMode = string; /** Known values of {@link ContentStoragePolicy} that the service accepts. */ export enum KnownContentStoragePolicy { + /** SystemAccount */ SystemAccount = "SystemAccount", + /** JobStorageAccount */ JobStorageAccount = "JobStorageAccount" } @@ -1714,6 +1836,7 @@ export type JobState = string; /** Known values of {@link Encoding} that the service accepts. */ export enum KnownEncoding { + /** UTF8 */ UTF8 = "UTF8" } @@ -1728,7 +1851,9 @@ export type Encoding = string; /** Known values of {@link JsonOutputSerializationFormat} that the service accepts. */ export enum KnownJsonOutputSerializationFormat { + /** LineSeparated */ LineSeparated = "LineSeparated", + /** Array */ Array = "Array" } @@ -1744,8 +1869,11 @@ export type JsonOutputSerializationFormat = string; /** Known values of {@link RefreshType} that the service accepts. */ export enum KnownRefreshType { + /** Static */ Static = "Static", + /** RefreshPeriodicallyWithFull */ RefreshPeriodicallyWithFull = "RefreshPeriodicallyWithFull", + /** RefreshPeriodicallyWithDelta */ RefreshPeriodicallyWithDelta = "RefreshPeriodicallyWithDelta" } diff --git a/sdk/streamanalytics/arm-streamanalytics/src/models/mappers.ts b/sdk/streamanalytics/arm-streamanalytics/src/models/mappers.ts index 854205becd9d..8e4b077976a0 100644 --- a/sdk/streamanalytics/arm-streamanalytics/src/models/mappers.ts +++ b/sdk/streamanalytics/arm-streamanalytics/src/models/mappers.ts @@ -334,6 +334,7 @@ export const Compression: coreClient.CompositeMapper = { className: "Compression", modelProperties: { type: { + defaultValue: "None", serializedName: "type", required: true, type: { @@ -417,6 +418,89 @@ export const FunctionProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + inputs: { + serializedName: "properties.inputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FunctionInput" + } + } + } + }, + output: { + serializedName: "properties.output", + type: { + name: "Composite", + className: "FunctionOutput" + } + }, + binding: { + serializedName: "properties.binding", + type: { + name: "Composite", + className: "FunctionBinding" + } + } + } + } +}; + +export const FunctionInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FunctionInput", + modelProperties: { + dataType: { + serializedName: "dataType", + type: { + name: "String" + } + }, + isConfigurationParameter: { + serializedName: "isConfigurationParameter", + type: { + name: "Boolean" + } + } + } + } +}; + +export const FunctionOutput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FunctionOutput", + modelProperties: { + dataType: { + serializedName: "dataType", + type: { + name: "String" + } + } + } + } +}; + +export const FunctionBinding: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FunctionBinding", + uberParent: "FunctionBinding", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } } } } @@ -465,12 +549,14 @@ export const Identity: coreClient.CompositeMapper = { modelProperties: { tenantId: { serializedName: "tenantId", + readOnly: true, type: { name: "String" } }, principalId: { serializedName: "principalId", + readOnly: true, type: { name: "String" } @@ -769,7 +855,7 @@ export const ClusterSku: coreClient.CompositeMapper = { }, capacity: { constraints: { - InclusiveMaximum: 216, + InclusiveMaximum: 396, InclusiveMinimum: 36 }, serializedName: "capacity", @@ -1050,6 +1136,13 @@ export const BlobDataSourceProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + authenticationMode: { + defaultValue: "ConnectionString", + serializedName: "authenticationMode", + type: { + name: "String" + } } } } @@ -1079,6 +1172,7 @@ export const ServiceBusDataSourceProperties: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "authenticationMode", type: { name: "String" @@ -1088,6 +1182,21 @@ export const ServiceBusDataSourceProperties: coreClient.CompositeMapper = { } }; +export const GatewayMessageBusSourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayMessageBusSourceProperties", + modelProperties: { + topic: { + serializedName: "topic", + type: { + name: "String" + } + } + } + } +}; + export const AzureSqlDatabaseDataSourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1136,6 +1245,7 @@ export const AzureSqlDatabaseDataSourceProperties: coreClient.CompositeMapper = } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "authenticationMode", type: { name: "String" @@ -1211,63 +1321,6 @@ export const OAuthBasedDataSourceProperties: coreClient.CompositeMapper = { } }; -export const FunctionInput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FunctionInput", - modelProperties: { - dataType: { - serializedName: "dataType", - type: { - name: "String" - } - }, - isConfigurationParameter: { - serializedName: "isConfigurationParameter", - type: { - name: "Boolean" - } - } - } - } -}; - -export const FunctionOutput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FunctionOutput", - modelProperties: { - dataType: { - serializedName: "dataType", - type: { - name: "String" - } - } - } - } -}; - -export const FunctionBinding: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FunctionBinding", - uberParent: "FunctionBinding", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" - }, - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - } - } - } -}; - export const AzureMachineLearningWebServiceInputs: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1497,6 +1550,7 @@ export const Transformation: coreClient.CompositeMapper = { modelProperties: { ...SubResource.type.modelProperties, streamingUnits: { + defaultValue: 3, serializedName: "properties.streamingUnits", type: { name: "Number" @@ -1667,10 +1721,17 @@ export const BlobOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" } + }, + blobPathPrefix: { + serializedName: "properties.blobPathPrefix", + type: { + name: "String" + } } } } @@ -1764,6 +1825,7 @@ export const EventHubOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -1824,6 +1886,7 @@ export const EventHubV2OutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -1908,6 +1971,7 @@ export const AzureSqlDatabaseOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2009,6 +2073,49 @@ export const DocumentDbOutputDataSource: coreClient.CompositeMapper = { } }; +export const AzureFunctionOutputDataSource: coreClient.CompositeMapper = { + serializedName: "Microsoft.AzureFunction", + type: { + name: "Composite", + className: "AzureFunctionOutputDataSource", + uberParent: "OutputDataSource", + polymorphicDiscriminator: OutputDataSource.type.polymorphicDiscriminator, + modelProperties: { + ...OutputDataSource.type.modelProperties, + functionAppName: { + serializedName: "properties.functionAppName", + type: { + name: "String" + } + }, + functionName: { + serializedName: "properties.functionName", + type: { + name: "String" + } + }, + apiKey: { + serializedName: "properties.apiKey", + type: { + name: "String" + } + }, + maxBatchSize: { + serializedName: "properties.maxBatchSize", + type: { + name: "Number" + } + }, + maxBatchCount: { + serializedName: "properties.maxBatchCount", + type: { + name: "Number" + } + } + } + } +}; + export const ServiceBusQueueOutputDataSource: coreClient.CompositeMapper = { serializedName: "Microsoft.ServiceBus/Queue", type: { @@ -2037,6 +2144,7 @@ export const ServiceBusQueueOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2098,6 +2206,7 @@ export const ServiceBusTopicOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2183,6 +2292,7 @@ export const PowerBIOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2250,6 +2360,7 @@ export const AzureDataLakeStoreOutputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2259,6 +2370,25 @@ export const AzureDataLakeStoreOutputDataSource: coreClient.CompositeMapper = { } }; +export const GatewayMessageBusOutputDataSource: coreClient.CompositeMapper = { + serializedName: "GatewayMessageBus", + type: { + name: "Composite", + className: "GatewayMessageBusOutputDataSource", + uberParent: "OutputDataSource", + polymorphicDiscriminator: OutputDataSource.type.polymorphicDiscriminator, + modelProperties: { + ...OutputDataSource.type.modelProperties, + topic: { + serializedName: "properties.topic", + type: { + name: "String" + } + } + } + } +}; + export const ScalarFunctionProperties: coreClient.CompositeMapper = { serializedName: "Scalar", type: { @@ -2267,31 +2397,87 @@ export const ScalarFunctionProperties: coreClient.CompositeMapper = { uberParent: "FunctionProperties", polymorphicDiscriminator: FunctionProperties.type.polymorphicDiscriminator, modelProperties: { - ...FunctionProperties.type.modelProperties, + ...FunctionProperties.type.modelProperties + } + } +}; + +export const AggregateFunctionProperties: coreClient.CompositeMapper = { + serializedName: "Aggregate", + type: { + name: "Composite", + className: "AggregateFunctionProperties", + uberParent: "FunctionProperties", + polymorphicDiscriminator: FunctionProperties.type.polymorphicDiscriminator, + modelProperties: { + ...FunctionProperties.type.modelProperties + } + } +}; + +export const AzureMachineLearningWebServiceFunctionBinding: coreClient.CompositeMapper = { + serializedName: "Microsoft.MachineLearning/WebService", + type: { + name: "Composite", + className: "AzureMachineLearningWebServiceFunctionBinding", + uberParent: "FunctionBinding", + polymorphicDiscriminator: FunctionBinding.type.polymorphicDiscriminator, + modelProperties: { + ...FunctionBinding.type.modelProperties, + endpoint: { + serializedName: "properties.endpoint", + type: { + name: "String" + } + }, + apiKey: { + serializedName: "properties.apiKey", + type: { + name: "String" + } + }, inputs: { serializedName: "properties.inputs", + type: { + name: "Composite", + className: "AzureMachineLearningWebServiceInputs" + } + }, + outputs: { + serializedName: "properties.outputs", type: { name: "Sequence", element: { type: { name: "Composite", - className: "FunctionInput" + className: "AzureMachineLearningWebServiceOutputColumn" } } } }, - output: { - serializedName: "properties.output", + batchSize: { + serializedName: "properties.batchSize", type: { - name: "Composite", - className: "FunctionOutput" + name: "Number" } - }, - binding: { - serializedName: "properties.binding", + } + } + } +}; + +export const JavaScriptFunctionBinding: coreClient.CompositeMapper = { + serializedName: "Microsoft.StreamAnalytics/JavascriptUdf", + type: { + name: "Composite", + className: "JavaScriptFunctionBinding", + uberParent: "FunctionBinding", + polymorphicDiscriminator: FunctionBinding.type.polymorphicDiscriminator, + modelProperties: { + ...FunctionBinding.type.modelProperties, + script: { + serializedName: "properties.script", type: { - name: "Composite", - className: "FunctionBinding" + name: "String" } } } @@ -2305,6 +2491,7 @@ export const JobStorageAccount: coreClient.CompositeMapper = { modelProperties: { ...StorageAccount.type.modelProperties, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "authenticationMode", type: { name: "String" @@ -2450,6 +2637,13 @@ export const BlobStreamInputDataSource: coreClient.CompositeMapper = { name: "String" } }, + authenticationMode: { + defaultValue: "ConnectionString", + serializedName: "properties.authenticationMode", + type: { + name: "String" + } + }, sourcePartitionCount: { serializedName: "properties.sourcePartitionCount", type: { @@ -2489,6 +2683,7 @@ export const EventHubStreamInputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2539,6 +2734,7 @@ export const EventHubV2StreamInputDataSource: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "properties.authenticationMode", type: { name: "String" @@ -2604,6 +2800,46 @@ export const IoTHubStreamInputDataSource: coreClient.CompositeMapper = { } }; +export const GatewayMessageBusStreamInputDataSource: coreClient.CompositeMapper = { + serializedName: "GatewayMessageBus", + type: { + name: "Composite", + className: "GatewayMessageBusStreamInputDataSource", + uberParent: "StreamInputDataSource", + polymorphicDiscriminator: + StreamInputDataSource.type.polymorphicDiscriminator, + modelProperties: { + ...StreamInputDataSource.type.modelProperties, + topic: { + serializedName: "properties.topic", + type: { + name: "String" + } + } + } + } +}; + +export const FileReferenceInputDataSource: coreClient.CompositeMapper = { + serializedName: "File", + type: { + name: "Composite", + className: "FileReferenceInputDataSource", + uberParent: "ReferenceInputDataSource", + polymorphicDiscriminator: + ReferenceInputDataSource.type.polymorphicDiscriminator, + modelProperties: { + ...ReferenceInputDataSource.type.modelProperties, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + } + } + } +}; + export const BlobReferenceInputDataSource: coreClient.CompositeMapper = { serializedName: "Microsoft.Storage/Blob", type: { @@ -2649,6 +2885,13 @@ export const BlobReferenceInputDataSource: coreClient.CompositeMapper = { type: { name: "String" } + }, + authenticationMode: { + defaultValue: "ConnectionString", + serializedName: "properties.authenticationMode", + type: { + name: "String" + } } } } @@ -2754,8 +2997,8 @@ export const BlobOutputDataSourceProperties: coreClient.CompositeMapper = { className: "BlobOutputDataSourceProperties", modelProperties: { ...BlobDataSourceProperties.type.modelProperties, - authenticationMode: { - serializedName: "authenticationMode", + blobPathPrefix: { + serializedName: "blobPathPrefix", type: { name: "String" } @@ -2848,6 +3091,26 @@ export const ServiceBusTopicOutputDataSourceProperties: coreClient.CompositeMapp } }; +export const GatewayMessageBusStreamInputDataSourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayMessageBusStreamInputDataSourceProperties", + modelProperties: { + ...GatewayMessageBusSourceProperties.type.modelProperties + } + } +}; + +export const GatewayMessageBusOutputDataSourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayMessageBusOutputDataSourceProperties", + modelProperties: { + ...GatewayMessageBusSourceProperties.type.modelProperties + } + } +}; + export const AzureSqlDatabaseOutputDataSourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2899,6 +3162,7 @@ export const PowerBIOutputDataSourceProperties: coreClient.CompositeMapper = { } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "authenticationMode", type: { name: "String" @@ -2945,6 +3209,7 @@ export const AzureDataLakeStoreOutputDataSourceProperties: coreClient.CompositeM } }, authenticationMode: { + defaultValue: "ConnectionString", serializedName: "authenticationMode", type: { name: "String" @@ -2954,75 +3219,6 @@ export const AzureDataLakeStoreOutputDataSourceProperties: coreClient.CompositeM } }; -export const AzureMachineLearningWebServiceFunctionBinding: coreClient.CompositeMapper = { - serializedName: "Microsoft.MachineLearning/WebService", - type: { - name: "Composite", - className: "AzureMachineLearningWebServiceFunctionBinding", - uberParent: "FunctionBinding", - polymorphicDiscriminator: FunctionBinding.type.polymorphicDiscriminator, - modelProperties: { - ...FunctionBinding.type.modelProperties, - endpoint: { - serializedName: "properties.endpoint", - type: { - name: "String" - } - }, - apiKey: { - serializedName: "properties.apiKey", - type: { - name: "String" - } - }, - inputs: { - serializedName: "properties.inputs", - type: { - name: "Composite", - className: "AzureMachineLearningWebServiceInputs" - } - }, - outputs: { - serializedName: "properties.outputs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AzureMachineLearningWebServiceOutputColumn" - } - } - } - }, - batchSize: { - serializedName: "properties.batchSize", - type: { - name: "Number" - } - } - } - } -}; - -export const JavaScriptFunctionBinding: coreClient.CompositeMapper = { - serializedName: "Microsoft.StreamAnalytics/JavascriptUdf", - type: { - name: "Composite", - className: "JavaScriptFunctionBinding", - uberParent: "FunctionBinding", - polymorphicDiscriminator: FunctionBinding.type.polymorphicDiscriminator, - modelProperties: { - ...FunctionBinding.type.modelProperties, - script: { - serializedName: "properties.script", - type: { - name: "String" - } - } - } - } -}; - export const StreamingJob: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3574,10 +3770,10 @@ export let discriminators = { Serialization: Serialization, OutputDataSource: OutputDataSource, FunctionProperties: FunctionProperties, + FunctionBinding: FunctionBinding, FunctionRetrieveDefaultDefinitionParameters: FunctionRetrieveDefaultDefinitionParameters, StreamInputDataSource: StreamInputDataSource, ReferenceInputDataSource: ReferenceInputDataSource, - FunctionBinding: FunctionBinding, "InputProperties.Stream": StreamInputProperties, "InputProperties.Reference": ReferenceInputProperties, "Serialization.Parquet": ParquetSerialization, @@ -3591,19 +3787,24 @@ export let discriminators = { "OutputDataSource.Microsoft.Sql/Server/Database": AzureSqlDatabaseOutputDataSource, "OutputDataSource.Microsoft.Sql/Server/DataWarehouse": AzureSynapseOutputDataSource, "OutputDataSource.Microsoft.Storage/DocumentDB": DocumentDbOutputDataSource, + "OutputDataSource.Microsoft.AzureFunction": AzureFunctionOutputDataSource, "OutputDataSource.Microsoft.ServiceBus/Queue": ServiceBusQueueOutputDataSource, "OutputDataSource.Microsoft.ServiceBus/Topic": ServiceBusTopicOutputDataSource, "OutputDataSource.PowerBI": PowerBIOutputDataSource, "OutputDataSource.Microsoft.DataLake/Accounts": AzureDataLakeStoreOutputDataSource, + "OutputDataSource.GatewayMessageBus": GatewayMessageBusOutputDataSource, "FunctionProperties.Scalar": ScalarFunctionProperties, + "FunctionProperties.Aggregate": AggregateFunctionProperties, + "FunctionBinding.Microsoft.MachineLearning/WebService": AzureMachineLearningWebServiceFunctionBinding, + "FunctionBinding.Microsoft.StreamAnalytics/JavascriptUdf": JavaScriptFunctionBinding, "FunctionRetrieveDefaultDefinitionParameters.Microsoft.MachineLearning/WebService": AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, "FunctionRetrieveDefaultDefinitionParameters.Microsoft.StreamAnalytics/JavascriptUdf": JavaScriptFunctionRetrieveDefaultDefinitionParameters, "StreamInputDataSource.Microsoft.Storage/Blob": BlobStreamInputDataSource, "StreamInputDataSource.Microsoft.ServiceBus/EventHub": EventHubStreamInputDataSource, "StreamInputDataSource.Microsoft.EventHub/EventHub": EventHubV2StreamInputDataSource, "StreamInputDataSource.Microsoft.Devices/IotHubs": IoTHubStreamInputDataSource, + "StreamInputDataSource.GatewayMessageBus": GatewayMessageBusStreamInputDataSource, + "ReferenceInputDataSource.File": FileReferenceInputDataSource, "ReferenceInputDataSource.Microsoft.Storage/Blob": BlobReferenceInputDataSource, - "ReferenceInputDataSource.Microsoft.Sql/Server/Database": AzureSqlReferenceInputDataSource, - "FunctionBinding.Microsoft.MachineLearning/WebService": AzureMachineLearningWebServiceFunctionBinding, - "FunctionBinding.Microsoft.StreamAnalytics/JavascriptUdf": JavaScriptFunctionBinding + "ReferenceInputDataSource.Microsoft.Sql/Server/Database": AzureSqlReferenceInputDataSource }; diff --git a/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts b/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts index fec4aedf1359..15e973c4dfa0 100644 --- a/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts +++ b/sdk/streamanalytics/arm-streamanalytics/src/streamAnalyticsManagementClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, @@ -65,7 +70,7 @@ export class StreamAnalyticsManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-streamanalytics/4.0.2`; + const packageDetails = `azsdk-js-arm-streamanalytics/4.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -85,27 +90,34 @@ export class StreamAnalyticsManagementClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; @@ -122,6 +134,35 @@ export class StreamAnalyticsManagementClient extends coreClient.ServiceClient { this.subscriptions = new SubscriptionsImpl(this); this.clusters = new ClustersImpl(this); this.privateEndpoints = new PrivateEndpointsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } operations: Operations; diff --git a/sdk/streamanalytics/arm-streamanalytics/test/sampleTest.ts b/sdk/streamanalytics/arm-streamanalytics/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/streamanalytics/arm-streamanalytics/test/sampleTest.ts +++ b/sdk/streamanalytics/arm-streamanalytics/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/streamanalytics/arm-streamanalytics/tsconfig.json b/sdk/streamanalytics/arm-streamanalytics/tsconfig.json index b12af4296073..3e6ae96443f3 100644 --- a/sdk/streamanalytics/arm-streamanalytics/tsconfig.json +++ b/sdk/streamanalytics/arm-streamanalytics/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-streamanalytics": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"