diff --git a/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts b/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts index b4e0e28f8e7a..8877cadac8d0 100644 --- a/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts +++ b/sdk/kusto/arm-kusto/src/kustoManagementClientContext.ts @@ -45,7 +45,7 @@ export class KustoManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2020-02-15'; + this.apiVersion = '2020-06-14'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/kusto/arm-kusto/src/models/index.ts b/sdk/kusto/arm-kusto/src/models/index.ts index b2c44309542b..e7a99ba13e6d 100644 --- a/sdk/kusto/arm-kusto/src/models/index.ts +++ b/sdk/kusto/arm-kusto/src/models/index.ts @@ -364,8 +364,13 @@ export interface Cluster extends TrackedResource { enablePurge?: boolean; /** * List of the cluster's language extensions. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly languageExtensions?: LanguageExtensionsList; + /** + * A boolean value that indicates if double encryption is enabled. Default value: false. */ - languageExtensions?: LanguageExtensionsList; + enableDoubleEncryption?: boolean; } /** @@ -445,8 +450,13 @@ export interface ClusterUpdate extends Resource { enablePurge?: boolean; /** * List of the cluster's language extensions. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - languageExtensions?: LanguageExtensionsList; + readonly languageExtensions?: LanguageExtensionsList; + /** + * A boolean value that indicates if double encryption is enabled. Default value: false. + */ + enableDoubleEncryption?: boolean; } /** @@ -577,7 +587,7 @@ export interface ReadWriteDatabase { * Indicates whether the database is followed. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly isFollowed?: string; + readonly isFollowed?: boolean; } /** @@ -910,7 +920,7 @@ export interface EventHubDataConnection { /** * The data format of the message. Optionally the data format can be added to each message. * Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', - * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE' */ dataFormat?: EventHubDataFormat; /** @@ -973,7 +983,7 @@ export interface IotHubDataConnection { /** * The data format of the message. Optionally the data format can be added to each message. * Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', - * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE' */ dataFormat?: IotHubDataFormat; /** @@ -1031,7 +1041,7 @@ export interface EventGridDataConnection { * The table where the data should be ingested. Optionally the table information can be added to * each message. */ - tableName: string; + tableName?: string; /** * The mapping rule to be used to ingest the data. Optionally the mapping information can be * added to each message. @@ -1040,9 +1050,19 @@ export interface EventGridDataConnection { /** * The data format of the message. Optionally the data format can be added to each message. * Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', - * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE' + */ + dataFormat?: EventGridDataFormat; + /** + * A Boolean value that, if set to true, indicates that ingestion should ignore the first record + * of every file */ - dataFormat: EventGridDataFormat; + ignoreFirstRecord?: boolean; + /** + * The name of blob storage event type to process. Possible values include: + * 'Microsoft.Storage.BlobCreated', 'Microsoft.Storage.BlobRenamed' + */ + blobStorageEventType?: BlobStorageEventType; } /** @@ -1371,11 +1391,11 @@ export type PrincipalsModificationKind = 'Union' | 'Replace' | 'None'; /** * Defines values for EventHubDataFormat. * Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', - * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE' * @readonly * @enum {string} */ -export type EventHubDataFormat = 'MULTIJSON' | 'JSON' | 'CSV' | 'TSV' | 'SCSV' | 'SOHSV' | 'PSV' | 'TXT' | 'RAW' | 'SINGLEJSON' | 'AVRO' | 'TSVE' | 'PARQUET' | 'ORC'; +export type EventHubDataFormat = 'MULTIJSON' | 'JSON' | 'CSV' | 'TSV' | 'SCSV' | 'SOHSV' | 'PSV' | 'TXT' | 'RAW' | 'SINGLEJSON' | 'AVRO' | 'TSVE' | 'PARQUET' | 'ORC' | 'APACHEAVRO' | 'W3CLOGFILE'; /** * Defines values for Compression. @@ -1388,20 +1408,28 @@ export type Compression = 'None' | 'GZip'; /** * Defines values for IotHubDataFormat. * Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', - * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE' * @readonly * @enum {string} */ -export type IotHubDataFormat = 'MULTIJSON' | 'JSON' | 'CSV' | 'TSV' | 'SCSV' | 'SOHSV' | 'PSV' | 'TXT' | 'RAW' | 'SINGLEJSON' | 'AVRO' | 'TSVE' | 'PARQUET' | 'ORC'; +export type IotHubDataFormat = 'MULTIJSON' | 'JSON' | 'CSV' | 'TSV' | 'SCSV' | 'SOHSV' | 'PSV' | 'TXT' | 'RAW' | 'SINGLEJSON' | 'AVRO' | 'TSVE' | 'PARQUET' | 'ORC' | 'APACHEAVRO' | 'W3CLOGFILE'; /** * Defines values for EventGridDataFormat. * Possible values include: 'MULTIJSON', 'JSON', 'CSV', 'TSV', 'SCSV', 'SOHSV', 'PSV', 'TXT', - * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC' + * 'RAW', 'SINGLEJSON', 'AVRO', 'TSVE', 'PARQUET', 'ORC', 'APACHEAVRO', 'W3CLOGFILE' + * @readonly + * @enum {string} + */ +export type EventGridDataFormat = 'MULTIJSON' | 'JSON' | 'CSV' | 'TSV' | 'SCSV' | 'SOHSV' | 'PSV' | 'TXT' | 'RAW' | 'SINGLEJSON' | 'AVRO' | 'TSVE' | 'PARQUET' | 'ORC' | 'APACHEAVRO' | 'W3CLOGFILE'; + +/** + * Defines values for BlobStorageEventType. + * Possible values include: 'Microsoft.Storage.BlobCreated', 'Microsoft.Storage.BlobRenamed' * @readonly * @enum {string} */ -export type EventGridDataFormat = 'MULTIJSON' | 'JSON' | 'CSV' | 'TSV' | 'SCSV' | 'SOHSV' | 'PSV' | 'TXT' | 'RAW' | 'SINGLEJSON' | 'AVRO' | 'TSVE' | 'PARQUET' | 'ORC'; +export type BlobStorageEventType = 'Microsoft.Storage.BlobCreated' | 'Microsoft.Storage.BlobRenamed'; /** * Defines values for IdentityType. @@ -2340,6 +2368,26 @@ export type DataConnectionsUpdateResponse = DataConnectionUnion & { }; }; +/** + * Contains response data for the beginDataConnectionValidationMethod operation. + */ +export type DataConnectionsBeginDataConnectionValidationMethodResponse = DataConnectionValidationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataConnectionValidationListResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ diff --git a/sdk/kusto/arm-kusto/src/models/mappers.ts b/sdk/kusto/arm-kusto/src/models/mappers.ts index be80151ce297..398f668f590b 100644 --- a/sdk/kusto/arm-kusto/src/models/mappers.ts +++ b/sdk/kusto/arm-kusto/src/models/mappers.ts @@ -607,11 +607,19 @@ export const Cluster: msRest.CompositeMapper = { } }, languageExtensions: { + readOnly: true, serializedName: "properties.languageExtensions", type: { name: "Composite", className: "LanguageExtensionsList" } + }, + enableDoubleEncryption: { + serializedName: "properties.enableDoubleEncryption", + defaultValue: false, + type: { + name: "Boolean" + } } } } @@ -744,11 +752,19 @@ export const ClusterUpdate: msRest.CompositeMapper = { } }, languageExtensions: { + readOnly: true, serializedName: "properties.languageExtensions", type: { name: "Composite", className: "LanguageExtensionsList" } + }, + enableDoubleEncryption: { + serializedName: "properties.enableDoubleEncryption", + defaultValue: false, + type: { + name: "Boolean" + } } } } @@ -830,7 +846,7 @@ export const Database: msRest.CompositeMapper = { serializedName: "kind", clientName: "kind" }, - uberParent: "BaseResource", + uberParent: "Database", className: "Database", modelProperties: { ...ProxyResource.type.modelProperties, @@ -855,6 +871,8 @@ export const ReadWriteDatabase: msRest.CompositeMapper = { serializedName: "ReadWrite", type: { name: "Composite", + polymorphicDiscriminator: Database.type.polymorphicDiscriminator, + uberParent: "Database", className: "ReadWriteDatabase", modelProperties: { ...Database.type.modelProperties, @@ -888,7 +906,7 @@ export const ReadWriteDatabase: msRest.CompositeMapper = { readOnly: true, serializedName: "properties.isFollowed", type: { - name: "String" + name: "Boolean" } } } @@ -899,6 +917,8 @@ export const ReadOnlyFollowingDatabase: msRest.CompositeMapper = { serializedName: "ReadOnlyFollowing", type: { name: "Composite", + polymorphicDiscriminator: Database.type.polymorphicDiscriminator, + uberParent: "Database", className: "ReadOnlyFollowingDatabase", modelProperties: { ...Database.type.modelProperties, @@ -1167,7 +1187,7 @@ export const DataConnection: msRest.CompositeMapper = { serializedName: "kind", clientName: "kind" }, - uberParent: "BaseResource", + uberParent: "DataConnection", className: "DataConnection", modelProperties: { ...ProxyResource.type.modelProperties, @@ -1274,6 +1294,8 @@ export const EventHubDataConnection: msRest.CompositeMapper = { serializedName: "EventHub", type: { name: "Composite", + polymorphicDiscriminator: DataConnection.type.polymorphicDiscriminator, + uberParent: "DataConnection", className: "EventHubDataConnection", modelProperties: { ...DataConnection.type.modelProperties, @@ -1334,6 +1356,8 @@ export const IotHubDataConnection: msRest.CompositeMapper = { serializedName: "IotHub", type: { name: "Composite", + polymorphicDiscriminator: DataConnection.type.polymorphicDiscriminator, + uberParent: "DataConnection", className: "IotHubDataConnection", modelProperties: { ...DataConnection.type.modelProperties, @@ -1395,6 +1419,8 @@ export const EventGridDataConnection: msRest.CompositeMapper = { serializedName: "EventGrid", type: { name: "Composite", + polymorphicDiscriminator: DataConnection.type.polymorphicDiscriminator, + uberParent: "DataConnection", className: "EventGridDataConnection", modelProperties: { ...DataConnection.type.modelProperties, @@ -1420,7 +1446,6 @@ export const EventGridDataConnection: msRest.CompositeMapper = { } }, tableName: { - required: true, serializedName: "properties.tableName", type: { name: "String" @@ -1433,11 +1458,22 @@ export const EventGridDataConnection: msRest.CompositeMapper = { } }, dataFormat: { - required: true, serializedName: "properties.dataFormat", type: { name: "String" } + }, + ignoreFirstRecord: { + serializedName: "properties.ignoreFirstRecord", + type: { + name: "Boolean" + } + }, + blobStorageEventType: { + serializedName: "properties.blobStorageEventType", + type: { + name: "String" + } } } } @@ -1990,12 +2026,12 @@ export const OperationListResult: msRest.CompositeMapper = { }; export const discriminators = { - 'BaseResource.Database' : Database, - 'BaseResource.ReadWrite' : ReadWriteDatabase, - 'BaseResource.ReadOnlyFollowing' : ReadOnlyFollowingDatabase, - 'BaseResource.DataConnection' : DataConnection, - 'BaseResource.EventHub' : EventHubDataConnection, - 'BaseResource.IotHub' : IotHubDataConnection, - 'BaseResource.EventGrid' : EventGridDataConnection + 'Database' : Database, + 'Database.ReadWrite' : ReadWriteDatabase, + 'Database.ReadOnlyFollowing' : ReadOnlyFollowingDatabase, + 'DataConnection' : DataConnection, + 'DataConnection.EventHub' : EventHubDataConnection, + 'DataConnection.IotHub' : IotHubDataConnection, + 'DataConnection.EventGrid' : EventGridDataConnection }; diff --git a/sdk/kusto/arm-kusto/src/models/parameters.ts b/sdk/kusto/arm-kusto/src/models/parameters.ts index 212c741614a6..073471f41623 100644 --- a/sdk/kusto/arm-kusto/src/models/parameters.ts +++ b/sdk/kusto/arm-kusto/src/models/parameters.ts @@ -50,21 +50,21 @@ export const clusterName: msRest.OperationURLParameter = { } } }; -export const dataConnectionName: msRest.OperationURLParameter = { - parameterPath: "dataConnectionName", +export const databaseName: msRest.OperationURLParameter = { + parameterPath: "databaseName", mapper: { required: true, - serializedName: "dataConnectionName", + serializedName: "databaseName", type: { name: "String" } } }; -export const databaseName: msRest.OperationURLParameter = { - parameterPath: "databaseName", +export const dataConnectionName: msRest.OperationURLParameter = { + parameterPath: "dataConnectionName", mapper: { required: true, - serializedName: "databaseName", + serializedName: "dataConnectionName", type: { name: "String" } diff --git a/sdk/kusto/arm-kusto/src/operations/dataConnections.ts b/sdk/kusto/arm-kusto/src/operations/dataConnections.ts index 15a7366a6c8b..b2c8d48478e7 100644 --- a/sdk/kusto/arm-kusto/src/operations/dataConnections.ts +++ b/sdk/kusto/arm-kusto/src/operations/dataConnections.ts @@ -72,35 +72,9 @@ export class DataConnections { * @param [options] The optional parameters * @returns Promise */ - dataConnectionValidationMethod(resourceGroupName: string, clusterName: string, databaseName: string, parameters: Models.DataConnectionValidation, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group containing the Kusto cluster. - * @param clusterName The name of the Kusto cluster. - * @param databaseName The name of the database in the Kusto cluster. - * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. - * @param callback The callback - */ - dataConnectionValidationMethod(resourceGroupName: string, clusterName: string, databaseName: string, parameters: Models.DataConnectionValidation, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group containing the Kusto cluster. - * @param clusterName The name of the Kusto cluster. - * @param databaseName The name of the database in the Kusto cluster. - * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. - * @param options The optional parameters - * @param callback The callback - */ - dataConnectionValidationMethod(resourceGroupName: string, clusterName: string, databaseName: string, parameters: Models.DataConnectionValidation, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - dataConnectionValidationMethod(resourceGroupName: string, clusterName: string, databaseName: string, parameters: Models.DataConnectionValidation, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - clusterName, - databaseName, - parameters, - options - }, - dataConnectionValidationMethodOperationSpec, - callback) as Promise; + dataConnectionValidationMethod(resourceGroupName: string, clusterName: string, databaseName: string, parameters: Models.DataConnectionValidation, options?: msRest.RequestOptionsBase): Promise { + return this.beginDataConnectionValidationMethod(resourceGroupName,clusterName,databaseName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -227,6 +201,28 @@ export class DataConnections { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Checks that the data connection parameters are valid. + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The data connection parameters supplied to the CreateOrUpdate operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginDataConnectionValidationMethod(resourceGroupName: string, clusterName: string, databaseName: string, parameters: Models.DataConnectionValidation, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + databaseName, + parameters, + options + }, + beginDataConnectionValidationMethodOperationSpec, + options); + } + /** * Creates or updates a data connection. * @param resourceGroupName The name of the resource group containing the Kusto cluster. @@ -326,9 +322,9 @@ const listByDatabaseOperationSpec: msRest.OperationSpec = { serializer }; -const dataConnectionValidationMethodOperationSpec: msRest.OperationSpec = { +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability", urlParameters: [ Parameters.resourceGroupName, Parameters.clusterName, @@ -342,15 +338,15 @@ const dataConnectionValidationMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "parameters", + parameterPath: "dataConnectionName", mapper: { - ...Mappers.DataConnectionValidation, + ...Mappers.DataConnectionCheckNameRequest, required: true } }, responses: { 200: { - bodyMapper: Mappers.DataConnectionValidationListResult + bodyMapper: Mappers.CheckNameResult }, default: { bodyMapper: Mappers.CloudError @@ -359,13 +355,14 @@ const dataConnectionValidationMethodOperationSpec: msRest.OperationSpec = { serializer }; -const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", urlParameters: [ Parameters.resourceGroupName, Parameters.clusterName, Parameters.databaseName, + Parameters.dataConnectionName, Parameters.subscriptionId ], queryParameters: [ @@ -374,16 +371,9 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "dataConnectionName", - mapper: { - ...Mappers.DataConnectionCheckNameRequest, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CheckNameResult + bodyMapper: Mappers.DataConnection }, default: { bodyMapper: Mappers.CloudError @@ -392,14 +382,13 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}", +const beginDataConnectionValidationMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnectionValidation", urlParameters: [ Parameters.resourceGroupName, Parameters.clusterName, Parameters.databaseName, - Parameters.dataConnectionName, Parameters.subscriptionId ], queryParameters: [ @@ -408,10 +397,18 @@ const getOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataConnectionValidation, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.DataConnection + bodyMapper: Mappers.DataConnectionValidationListResult }, + 202: {}, default: { bodyMapper: Mappers.CloudError }