Generate azure-arm-kusto
This commit is contained in:
Родитель
69de4196a4
Коммит
7ea71c0f73
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
uid: azure-arm-kusto
|
||||
summary: *content
|
||||
|
||||
---
|
||||
**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.**
|
||||
## Microsoft Azure SDK for Node.js - KustoManagementClient
|
||||
This project provides a Node.js package for accessing Azure. Right now it supports:
|
||||
- **Node.js version 6.x.x or higher**
|
||||
|
||||
### Features
|
||||
|
||||
|
||||
### How to Install
|
||||
|
||||
```bash
|
||||
npm install azure-arm-kusto
|
||||
```
|
||||
|
||||
### How to use
|
||||
|
||||
#### Authentication, client creation and get clusters as an example.
|
||||
|
||||
```javascript
|
||||
const msRestAzure = require("ms-rest-azure");
|
||||
const KustoManagementClient = require("azure-arm-kusto");
|
||||
msRestAzure.interactiveLogin().then((creds) => {
|
||||
const subscriptionId = "<Subscription_Id>";
|
||||
const client = new KustoManagementClient(creds, subscriptionId);
|
||||
const resourceGroupName = "testresourceGroupName";
|
||||
const clusterName = "testclusterName";
|
||||
return client.clusters.get(resourceGroupName, clusterName).then((result) => {
|
||||
console.log("The result is:");
|
||||
console.log(result);
|
||||
});
|
||||
}).catch((err) => {
|
||||
console.log('An error occurred:');
|
||||
console.dir(err, {depth: null, colors: true});
|
||||
});
|
||||
|
||||
### Related projects
|
||||
|
||||
- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
import { ServiceClientCredentials } from 'ms-rest';
|
||||
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
|
||||
import * as models from "./models";
|
||||
import * as operations from "./operations";
|
||||
|
||||
export default class KustoManagementClient extends AzureServiceClient {
|
||||
/**
|
||||
* Initializes a new instance of the KustoManagementClient class.
|
||||
* @constructor
|
||||
*
|
||||
* @class
|
||||
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
|
||||
*
|
||||
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
|
||||
*
|
||||
* @param {string} [baseUri] - The base URI of the service.
|
||||
*
|
||||
* @param {object} [options] - The parameter options
|
||||
*
|
||||
* @param {Array} [options.filters] - Filters to be added to the request pipeline
|
||||
*
|
||||
* @param {object} [options.requestOptions] - Options for the underlying request object
|
||||
* {@link https://github.com/request/request#requestoptions-callback Options doc}
|
||||
*
|
||||
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
|
||||
*
|
||||
* @param {string} [options.acceptLanguage] - The preferred language for the response.
|
||||
*
|
||||
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
|
||||
*
|
||||
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
|
||||
*
|
||||
*/
|
||||
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
|
||||
|
||||
credentials: ServiceClientCredentials;
|
||||
|
||||
subscriptionId: string;
|
||||
|
||||
apiVersion: string;
|
||||
|
||||
acceptLanguage: string;
|
||||
|
||||
longRunningOperationRetryTimeout: number;
|
||||
|
||||
generateClientRequestId: boolean;
|
||||
|
||||
// Operation groups
|
||||
clusters: operations.Clusters;
|
||||
databases: operations.Databases;
|
||||
eventHubConnections: operations.EventHubConnections;
|
||||
operations: operations.Operations;
|
||||
}
|
||||
|
||||
export { KustoManagementClient, models as KustoManagementModels };
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
/* jshint latedef:false */
|
||||
/* jshint forin:false */
|
||||
/* jshint noempty:false */
|
||||
|
||||
'use strict';
|
||||
|
||||
const msRest = require('ms-rest');
|
||||
const msRestAzure = require('ms-rest-azure');
|
||||
const ServiceClient = msRestAzure.AzureServiceClient;
|
||||
|
||||
const models = require('./models');
|
||||
const operations = require('./operations');
|
||||
|
||||
|
||||
/** Class representing a KustoManagementClient. */
|
||||
class KustoManagementClient extends ServiceClient {
|
||||
/**
|
||||
* Create a KustoManagementClient.
|
||||
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
|
||||
* @param {string} subscriptionId - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
|
||||
* @param {string} [baseUri] - The base URI of the service.
|
||||
* @param {object} [options] - The parameter options
|
||||
* @param {Array} [options.filters] - Filters to be added to the request pipeline
|
||||
* @param {object} [options.requestOptions] - Options for the underlying request object
|
||||
* {@link https://github.com/request/request#requestoptions-callback Options doc}
|
||||
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
|
||||
* @param {string} [options.acceptLanguage] - The preferred language for the response.
|
||||
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
|
||||
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
|
||||
*/
|
||||
constructor(credentials, subscriptionId, baseUri, options) {
|
||||
if (credentials === null || credentials === undefined) {
|
||||
throw new Error('\'credentials\' cannot be null.');
|
||||
}
|
||||
if (subscriptionId === null || subscriptionId === undefined) {
|
||||
throw new Error('\'subscriptionId\' cannot be null.');
|
||||
}
|
||||
|
||||
if (!options) options = {};
|
||||
|
||||
super(credentials, options);
|
||||
|
||||
this.apiVersion = '2018-09-07-preview';
|
||||
this.acceptLanguage = 'en-US';
|
||||
this.longRunningOperationRetryTimeout = 30;
|
||||
this.generateClientRequestId = true;
|
||||
this.baseUri = baseUri;
|
||||
if (!this.baseUri) {
|
||||
this.baseUri = 'https://management.azure.com';
|
||||
}
|
||||
this.credentials = credentials;
|
||||
this.subscriptionId = subscriptionId;
|
||||
|
||||
let packageInfo = this.getPackageJsonInfo(__dirname);
|
||||
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
|
||||
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
|
||||
this.acceptLanguage = options.acceptLanguage;
|
||||
}
|
||||
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
|
||||
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
|
||||
}
|
||||
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
|
||||
this.generateClientRequestId = options.generateClientRequestId;
|
||||
}
|
||||
this.clusters = new operations.Clusters(this);
|
||||
this.databases = new operations.Databases(this);
|
||||
this.eventHubConnections = new operations.EventHubConnections(this);
|
||||
this.operations = new operations.Operations(this);
|
||||
this.models = models;
|
||||
msRest.addSerializationMixin(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = KustoManagementClient;
|
||||
module.exports['default'] = KustoManagementClient;
|
||||
module.exports.KustoManagementClient = KustoManagementClient;
|
||||
module.exports.KustoManagementModels = models;
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a AzureCapacity.
|
||||
*/
|
||||
class AzureCapacity {
|
||||
/**
|
||||
* Create a AzureCapacity.
|
||||
* @property {string} scaleType Scale type. Possible values include:
|
||||
* 'automatic', 'manual', 'none'
|
||||
* @property {number} minimum Minimum allowed capacity.
|
||||
* @property {number} maximum Maximum allowed capacity.
|
||||
* @property {number} default The default capacity that would be used.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of AzureCapacity
|
||||
*
|
||||
* @returns {object} metadata of AzureCapacity
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'AzureCapacity',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureCapacity',
|
||||
modelProperties: {
|
||||
scaleType: {
|
||||
required: true,
|
||||
serializedName: 'scaleType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
minimum: {
|
||||
required: true,
|
||||
serializedName: 'minimum',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
maximum: {
|
||||
required: true,
|
||||
serializedName: 'maximum',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
default: {
|
||||
required: true,
|
||||
serializedName: 'default',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AzureCapacity;
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* The resource model definition for a Azure Resource Manager resource with an
|
||||
* etag.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class AzureEntityResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a AzureEntityResource.
|
||||
* @property {string} [etag] Resource Etag.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of AzureEntityResource
|
||||
*
|
||||
* @returns {object} metadata of AzureEntityResource
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'AzureEntityResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureEntityResource',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
etag: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'etag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AzureEntityResource;
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a AzureResourceSku.
|
||||
*/
|
||||
class AzureResourceSku {
|
||||
/**
|
||||
* Create a AzureResourceSku.
|
||||
* @property {string} [resourceType] Resource Namespace and Type.
|
||||
* @property {object} [sku] The SKU details.
|
||||
* @property {string} [sku.name] SKU name. Possible values include: 'KC8',
|
||||
* 'KC16', 'KS8', 'KS16', 'D13_v2', 'D14_v2', 'L8', 'L16'
|
||||
* @property {number} [sku.capacity] SKU capacity.
|
||||
* @property {object} [capacity] The SKU capacity.
|
||||
* @property {string} [capacity.scaleType] Scale type. Possible values
|
||||
* include: 'automatic', 'manual', 'none'
|
||||
* @property {number} [capacity.minimum] Minimum allowed capacity.
|
||||
* @property {number} [capacity.maximum] Maximum allowed capacity.
|
||||
* @property {number} [capacity.default] The default capacity that would be
|
||||
* used.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of AzureResourceSku
|
||||
*
|
||||
* @returns {object} metadata of AzureResourceSku
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'AzureResourceSku',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureResourceSku',
|
||||
modelProperties: {
|
||||
resourceType: {
|
||||
required: false,
|
||||
serializedName: 'resourceType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
sku: {
|
||||
required: false,
|
||||
serializedName: 'sku',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureSku'
|
||||
}
|
||||
},
|
||||
capacity: {
|
||||
required: false,
|
||||
serializedName: 'capacity',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureCapacity'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AzureResourceSku;
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a AzureSku.
|
||||
*/
|
||||
class AzureSku {
|
||||
/**
|
||||
* Create a AzureSku.
|
||||
* @property {string} name SKU name. Possible values include: 'KC8', 'KC16',
|
||||
* 'KS8', 'KS16', 'D13_v2', 'D14_v2', 'L8', 'L16'
|
||||
* @property {number} [capacity] SKU capacity.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of AzureSku
|
||||
*
|
||||
* @returns {object} metadata of AzureSku
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'AzureSku',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureSku',
|
||||
modelProperties: {
|
||||
name: {
|
||||
required: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
capacity: {
|
||||
required: false,
|
||||
serializedName: 'capacity',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
tier: {
|
||||
required: true,
|
||||
isConstant: true,
|
||||
serializedName: 'tier',
|
||||
defaultValue: 'Standard',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AzureSku;
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a CheckNameResult.
|
||||
*/
|
||||
class CheckNameResult {
|
||||
/**
|
||||
* Create a CheckNameResult.
|
||||
* @property {boolean} [nameAvailable] Specifies a Boolean value that
|
||||
* indicates if the name is available.
|
||||
* @property {string} [name] The name that was checked.
|
||||
* @property {string} [message] Message indicating an unavailable name due to
|
||||
* a conflict, or a description of the naming rules that are violated.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of CheckNameResult
|
||||
*
|
||||
* @returns {object} metadata of CheckNameResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'CheckNameResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'CheckNameResult',
|
||||
modelProperties: {
|
||||
nameAvailable: {
|
||||
required: false,
|
||||
serializedName: 'nameAvailable',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
message: {
|
||||
required: false,
|
||||
serializedName: 'message',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CheckNameResult;
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing a Kusto cluster.
|
||||
*
|
||||
* @extends models['TrackedResource']
|
||||
*/
|
||||
class Cluster extends models['TrackedResource'] {
|
||||
/**
|
||||
* Create a Cluster.
|
||||
* @property {string} [etag] An ETag of the resource created.
|
||||
* @property {object} sku The SKU of the cluster.
|
||||
* @property {string} [sku.name] SKU name. Possible values include: 'KC8',
|
||||
* 'KC16', 'KS8', 'KS16', 'D13_v2', 'D14_v2', 'L8', 'L16'
|
||||
* @property {number} [sku.capacity] SKU capacity.
|
||||
* @property {string} [state] The state of the resource. Possible values
|
||||
* include: 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted',
|
||||
* 'Stopping', 'Stopped', 'Starting'
|
||||
* @property {string} [provisioningState] The provisioned state of the
|
||||
* resource. Possible values include: 'Running', 'Creating', 'Deleting',
|
||||
* 'Succeeded', 'Failed'
|
||||
* @property {string} [uri] The cluster URI.
|
||||
* @property {string} [dataIngestionUri] The cluster data ingestion URI.
|
||||
* @property {array} [trustedExternalTenants] The cluster's external tenants.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of Cluster
|
||||
*
|
||||
* @returns {object} metadata of Cluster
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'Cluster',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Cluster',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: true,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
etag: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'etag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
sku: {
|
||||
required: true,
|
||||
serializedName: 'sku',
|
||||
defaultValue: {},
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureSku'
|
||||
}
|
||||
},
|
||||
state: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.state',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
uri: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.uri',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dataIngestionUri: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.dataIngestionUri',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
trustedExternalTenants: {
|
||||
required: false,
|
||||
serializedName: 'properties.trustedExternalTenants',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'TrustedExternalTenantElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'TrustedExternalTenant'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Cluster;
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a ClusterCheckNameRequest.
|
||||
*/
|
||||
class ClusterCheckNameRequest {
|
||||
/**
|
||||
* Create a ClusterCheckNameRequest.
|
||||
* @property {string} name Cluster name.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ClusterCheckNameRequest
|
||||
*
|
||||
* @returns {object} metadata of ClusterCheckNameRequest
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ClusterCheckNameRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ClusterCheckNameRequest',
|
||||
modelProperties: {
|
||||
name: {
|
||||
required: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: true,
|
||||
isConstant: true,
|
||||
serializedName: 'type',
|
||||
defaultValue: 'Microsoft.Kusto/clusters',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ClusterCheckNameRequest;
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The list Kusto clusters operation response.
|
||||
*/
|
||||
class ClusterListResult extends Array {
|
||||
/**
|
||||
* Create a ClusterListResult.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ClusterListResult
|
||||
*
|
||||
* @returns {object} metadata of ClusterListResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ClusterListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ClusterListResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'ClusterElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Cluster'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ClusterListResult;
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing an update to a Kusto cluster.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class ClusterUpdate extends models['Resource'] {
|
||||
/**
|
||||
* Create a ClusterUpdate.
|
||||
* @property {object} [tags] Resource tags.
|
||||
* @property {string} [location] Resource location.
|
||||
* @property {string} [etag] An ETag of the resource updated.
|
||||
* @property {object} [sku] The SKU of the cluster.
|
||||
* @property {string} [sku.name] SKU name. Possible values include: 'KC8',
|
||||
* 'KC16', 'KS8', 'KS16', 'D13_v2', 'D14_v2', 'L8', 'L16'
|
||||
* @property {number} [sku.capacity] SKU capacity.
|
||||
* @property {string} [state] The state of the resource. Possible values
|
||||
* include: 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted',
|
||||
* 'Stopping', 'Stopped', 'Starting'
|
||||
* @property {string} [provisioningState] The provisioned state of the
|
||||
* resource. Possible values include: 'Running', 'Creating', 'Deleting',
|
||||
* 'Succeeded', 'Failed'
|
||||
* @property {string} [uri] The cluster URI.
|
||||
* @property {string} [dataIngestionUri] The cluster data ingestion URI.
|
||||
* @property {array} [trustedExternalTenants] The cluster's external tenants.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ClusterUpdate
|
||||
*
|
||||
* @returns {object} metadata of ClusterUpdate
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ClusterUpdate',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ClusterUpdate',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: false,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
etag: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'etag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
sku: {
|
||||
required: false,
|
||||
serializedName: 'sku',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureSku'
|
||||
}
|
||||
},
|
||||
state: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.state',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
uri: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.uri',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dataIngestionUri: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.dataIngestionUri',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
trustedExternalTenants: {
|
||||
required: false,
|
||||
serializedName: 'properties.trustedExternalTenants',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'TrustedExternalTenantElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'TrustedExternalTenant'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ClusterUpdate;
|
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing a Kusto database.
|
||||
*
|
||||
* @extends models['TrackedResource']
|
||||
*/
|
||||
class Database extends models['TrackedResource'] {
|
||||
/**
|
||||
* Create a Database.
|
||||
* @property {string} [etag] An ETag of the resource created.
|
||||
* @property {string} [provisioningState] The provisioned state of the
|
||||
* resource. Possible values include: 'Running', 'Creating', 'Deleting',
|
||||
* 'Succeeded', 'Failed'
|
||||
* @property {number} softDeletePeriodInDays The number of days data should
|
||||
* be kept before it stops being accessible to queries.
|
||||
* @property {number} [hotCachePeriodInDays] The number of days of data that
|
||||
* should be kept in cache for fast queries.
|
||||
* @property {object} [statistics] The statistics of the database.
|
||||
* @property {number} [statistics.size] The database size - the total size of
|
||||
* compressed data and index in bytes.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of Database
|
||||
*
|
||||
* @returns {object} metadata of Database
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'Database',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Database',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: true,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
etag: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'etag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
softDeletePeriodInDays: {
|
||||
required: true,
|
||||
serializedName: 'properties.softDeletePeriodInDays',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
hotCachePeriodInDays: {
|
||||
required: false,
|
||||
serializedName: 'properties.hotCachePeriodInDays',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
statistics: {
|
||||
required: false,
|
||||
serializedName: 'properties.statistics',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabaseStatistics'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Database;
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a DatabaseCheckNameRequest.
|
||||
*/
|
||||
class DatabaseCheckNameRequest {
|
||||
/**
|
||||
* Create a DatabaseCheckNameRequest.
|
||||
* @property {string} name Database name.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabaseCheckNameRequest
|
||||
*
|
||||
* @returns {object} metadata of DatabaseCheckNameRequest
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabaseCheckNameRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabaseCheckNameRequest',
|
||||
modelProperties: {
|
||||
name: {
|
||||
required: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: true,
|
||||
isConstant: true,
|
||||
serializedName: 'type',
|
||||
defaultValue: 'Microsoft.Kusto/clusters/databases',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabaseCheckNameRequest;
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The list Kusto databases operation response.
|
||||
*/
|
||||
class DatabaseListResult extends Array {
|
||||
/**
|
||||
* Create a DatabaseListResult.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabaseListResult
|
||||
*
|
||||
* @returns {object} metadata of DatabaseListResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabaseListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabaseListResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'DatabaseElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Database'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabaseListResult;
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a DatabasePrincipal.
|
||||
*/
|
||||
class DatabasePrincipal {
|
||||
/**
|
||||
* Create a DatabasePrincipal.
|
||||
* @property {string} role Database principal role. Possible values include:
|
||||
* 'Admin', 'Ingestor', 'Monitor', 'User', 'UnrestrictedViewers', 'Viewer'
|
||||
* @property {string} name Database principal name.
|
||||
* @property {string} type Database principal type. Possible values include:
|
||||
* 'App', 'Group', 'User'
|
||||
* @property {string} [fqn] Database principal fully qualified name.
|
||||
* @property {string} [email] Database principal email if exists.
|
||||
* @property {string} [appId] Application id - relevant only for application
|
||||
* principal type.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabasePrincipal
|
||||
*
|
||||
* @returns {object} metadata of DatabasePrincipal
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabasePrincipal',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabasePrincipal',
|
||||
modelProperties: {
|
||||
role: {
|
||||
required: true,
|
||||
serializedName: 'role',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
fqn: {
|
||||
required: false,
|
||||
serializedName: 'fqn',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
email: {
|
||||
required: false,
|
||||
serializedName: 'email',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
appId: {
|
||||
required: false,
|
||||
serializedName: 'appId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabasePrincipal;
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The list Kusto database principals operation request.
|
||||
*
|
||||
*/
|
||||
class DatabasePrincipalListRequest {
|
||||
/**
|
||||
* Create a DatabasePrincipalListRequest.
|
||||
* @property {array} [value] The list of Kusto database principals.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabasePrincipalListRequest
|
||||
*
|
||||
* @returns {object} metadata of DatabasePrincipalListRequest
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabasePrincipalListRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabasePrincipalListRequest',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'DatabasePrincipalElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabasePrincipal'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabasePrincipalListRequest;
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The list Kusto database principals operation response.
|
||||
*/
|
||||
class DatabasePrincipalListResult extends Array {
|
||||
/**
|
||||
* Create a DatabasePrincipalListResult.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabasePrincipalListResult
|
||||
*
|
||||
* @returns {object} metadata of DatabasePrincipalListResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabasePrincipalListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabasePrincipalListResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'DatabasePrincipalElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabasePrincipal'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabasePrincipalListResult;
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a DatabaseStatistics.
|
||||
*/
|
||||
class DatabaseStatistics {
|
||||
/**
|
||||
* Create a DatabaseStatistics.
|
||||
* @property {number} [size] The database size - the total size of compressed
|
||||
* data and index in bytes.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabaseStatistics
|
||||
*
|
||||
* @returns {object} metadata of DatabaseStatistics
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabaseStatistics',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabaseStatistics',
|
||||
modelProperties: {
|
||||
size: {
|
||||
required: false,
|
||||
serializedName: 'size',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabaseStatistics;
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing an update to a Kusto database.
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class DatabaseUpdate extends models['Resource'] {
|
||||
/**
|
||||
* Create a DatabaseUpdate.
|
||||
* @property {string} [location] Resource location.
|
||||
* @property {string} [etag] An ETag of the resource updated.
|
||||
* @property {string} [provisioningState] The provisioned state of the
|
||||
* resource. Possible values include: 'Running', 'Creating', 'Deleting',
|
||||
* 'Succeeded', 'Failed'
|
||||
* @property {number} softDeletePeriodInDays The number of days data should
|
||||
* be kept before it stops being accessible to queries.
|
||||
* @property {number} [hotCachePeriodInDays] The number of days of data that
|
||||
* should be kept in cache for fast queries.
|
||||
* @property {object} [statistics] The statistics of the database.
|
||||
* @property {number} [statistics.size] The database size - the total size of
|
||||
* compressed data and index in bytes.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of DatabaseUpdate
|
||||
*
|
||||
* @returns {object} metadata of DatabaseUpdate
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'DatabaseUpdate',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabaseUpdate',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: false,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
etag: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'etag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioningState: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
softDeletePeriodInDays: {
|
||||
required: true,
|
||||
serializedName: 'properties.softDeletePeriodInDays',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
hotCachePeriodInDays: {
|
||||
required: false,
|
||||
serializedName: 'properties.hotCachePeriodInDays',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
statistics: {
|
||||
required: false,
|
||||
serializedName: 'properties.statistics',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'DatabaseStatistics'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabaseUpdate;
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing an event hub connection.
|
||||
*
|
||||
* @extends models['ProxyResource']
|
||||
*/
|
||||
class EventHubConnection extends models['ProxyResource'] {
|
||||
/**
|
||||
* Create a EventHubConnection.
|
||||
* @property {string} [location] Resource location.
|
||||
* @property {string} eventHubResourceId The resource ID of the event hub to
|
||||
* be used to create a data connection.
|
||||
* @property {string} consumerGroup The event hub consumer group.
|
||||
* @property {string} [tableName] The table where the data should be
|
||||
* ingested. Optionally the table information can be added to each message.
|
||||
* @property {string} [mappingRuleName] The mapping rule to be used to ingest
|
||||
* the data. Optionally the mapping information can be added to each message.
|
||||
* @property {string} [dataFormat] The data format of the message. Optionally
|
||||
* the data format can be added to each message. Possible values include:
|
||||
* 'MULTIJSON', 'JSON', 'CSV'
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of EventHubConnection
|
||||
*
|
||||
* @returns {object} metadata of EventHubConnection
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnection',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: false,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
eventHubResourceId: {
|
||||
required: true,
|
||||
serializedName: 'properties.eventHubResourceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
consumerGroup: {
|
||||
required: true,
|
||||
serializedName: 'properties.consumerGroup',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tableName: {
|
||||
required: false,
|
||||
serializedName: 'properties.tableName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
mappingRuleName: {
|
||||
required: false,
|
||||
serializedName: 'properties.mappingRuleName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dataFormat: {
|
||||
required: false,
|
||||
serializedName: 'properties.dataFormat',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EventHubConnection;
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The list Kusto event hub connections operation response.
|
||||
*/
|
||||
class EventHubConnectionListResult extends Array {
|
||||
/**
|
||||
* Create a EventHubConnectionListResult.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of EventHubConnectionListResult
|
||||
*
|
||||
* @returns {object} metadata of EventHubConnectionListResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnectionListResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnection'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EventHubConnectionListResult;
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing an update to event hub connection.
|
||||
*
|
||||
* @extends models['ProxyResource']
|
||||
*/
|
||||
class EventHubConnectionUpdate extends models['ProxyResource'] {
|
||||
/**
|
||||
* Create a EventHubConnectionUpdate.
|
||||
* @property {string} [location] Resource location.
|
||||
* @property {string} eventHubResourceId The resource ID of the event hub to
|
||||
* be used to create a data connection.
|
||||
* @property {string} consumerGroup The event hub consumer group.
|
||||
* @property {string} [tableName] The table where the data should be
|
||||
* ingested. Optionally the table information can be added to each message.
|
||||
* @property {string} [mappingRuleName] The mapping rule to be used to ingest
|
||||
* the data. Optionally the mapping information can be added to each message.
|
||||
* @property {string} [dataFormat] The data format of the message. Optionally
|
||||
* the data format can be added to each message. Possible values include:
|
||||
* 'MULTIJSON', 'JSON', 'CSV'
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of EventHubConnectionUpdate
|
||||
*
|
||||
* @returns {object} metadata of EventHubConnectionUpdate
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionUpdate',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnectionUpdate',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: false,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
eventHubResourceId: {
|
||||
required: true,
|
||||
serializedName: 'properties.eventHubResourceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
consumerGroup: {
|
||||
required: true,
|
||||
serializedName: 'properties.consumerGroup',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tableName: {
|
||||
required: false,
|
||||
serializedName: 'properties.tableName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
mappingRuleName: {
|
||||
required: false,
|
||||
serializedName: 'properties.mappingRuleName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dataFormat: {
|
||||
required: false,
|
||||
serializedName: 'properties.dataFormat',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EventHubConnectionUpdate;
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing an event hub connection validation.
|
||||
*
|
||||
*/
|
||||
class EventHubConnectionValidation {
|
||||
/**
|
||||
* Create a EventHubConnectionValidation.
|
||||
* @property {string} [eventhubConnectionName] The name of the event hub
|
||||
* connection.
|
||||
* @property {string} eventHubResourceId The resource ID of the event hub to
|
||||
* be used to create a data connection.
|
||||
* @property {string} consumerGroup The event hub consumer group.
|
||||
* @property {string} [tableName] The table where the data should be
|
||||
* ingested. Optionally the table information can be added to each message.
|
||||
* @property {string} [mappingRuleName] The mapping rule to be used to ingest
|
||||
* the data. Optionally the mapping information can be added to each message.
|
||||
* @property {string} [dataFormat] The data format of the message. Optionally
|
||||
* the data format can be added to each message. Possible values include:
|
||||
* 'MULTIJSON', 'JSON', 'CSV'
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of EventHubConnectionValidation
|
||||
*
|
||||
* @returns {object} metadata of EventHubConnectionValidation
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionValidation',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnectionValidation',
|
||||
modelProperties: {
|
||||
eventhubConnectionName: {
|
||||
required: false,
|
||||
serializedName: 'eventhubConnectionName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
eventHubResourceId: {
|
||||
required: true,
|
||||
serializedName: 'properties.eventHubResourceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
consumerGroup: {
|
||||
required: true,
|
||||
serializedName: 'properties.consumerGroup',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tableName: {
|
||||
required: false,
|
||||
serializedName: 'properties.tableName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
mappingRuleName: {
|
||||
required: false,
|
||||
serializedName: 'properties.mappingRuleName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dataFormat: {
|
||||
required: false,
|
||||
serializedName: 'properties.dataFormat',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EventHubConnectionValidation;
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The list Kusto event hub connection validation result.
|
||||
*
|
||||
*/
|
||||
class EventHubConnectionValidationListResult {
|
||||
/**
|
||||
* Create a EventHubConnectionValidationListResult.
|
||||
* @property {array} [value] The list of Kusto event hub connection
|
||||
* validation errors.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of EventHubConnectionValidationListResult
|
||||
*
|
||||
* @returns {object} metadata of EventHubConnectionValidationListResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionValidationListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnectionValidationListResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionValidationResultElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnectionValidationResult'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EventHubConnectionValidationListResult;
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a EventHubConnectionValidationResult.
|
||||
*/
|
||||
class EventHubConnectionValidationResult {
|
||||
/**
|
||||
* Create a EventHubConnectionValidationResult.
|
||||
* @property {string} [errorMessage] A message which indicates a problem in
|
||||
* event hub connection validation.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of EventHubConnectionValidationResult
|
||||
*
|
||||
* @returns {object} metadata of EventHubConnectionValidationResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'EventHubConnectionValidationResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'EventHubConnectionValidationResult',
|
||||
modelProperties: {
|
||||
errorMessage: {
|
||||
required: false,
|
||||
serializedName: 'errorMessage',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = EventHubConnectionValidationResult;
|
|
@ -0,0 +1,539 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import { BaseResource, CloudError } from "ms-rest-azure";
|
||||
import * as moment from "moment";
|
||||
|
||||
export {
|
||||
|
||||
BaseResource,
|
||||
CloudError
|
||||
};
|
||||
|
||||
export interface TrustedExternalTenant {
|
||||
/**
|
||||
* GUID representing an external tenant.
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export interface AzureSku {
|
||||
/**
|
||||
* SKU name. Possible values include: 'KC8', 'KC16', 'KS8', 'KS16', 'D13_v2', 'D14_v2', 'L8',
|
||||
* 'L16'
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* SKU capacity.
|
||||
*/
|
||||
capacity?: number;
|
||||
}
|
||||
|
||||
export interface AzureCapacity {
|
||||
/**
|
||||
* Scale type. Possible values include: 'automatic', 'manual', 'none'
|
||||
*/
|
||||
scaleType: string;
|
||||
/**
|
||||
* Minimum allowed capacity.
|
||||
*/
|
||||
minimum: number;
|
||||
/**
|
||||
* Maximum allowed capacity.
|
||||
*/
|
||||
maximum: number;
|
||||
/**
|
||||
* The default capacity that would be used.
|
||||
*/
|
||||
default: number;
|
||||
}
|
||||
|
||||
export interface AzureResourceSku {
|
||||
/**
|
||||
* Resource Namespace and Type.
|
||||
*/
|
||||
resourceType?: string;
|
||||
/**
|
||||
* The SKU details.
|
||||
*/
|
||||
sku?: AzureSku;
|
||||
/**
|
||||
* The SKU capacity.
|
||||
*/
|
||||
capacity?: AzureCapacity;
|
||||
}
|
||||
|
||||
export interface DatabaseStatistics {
|
||||
/**
|
||||
* The database size - the total size of compressed data and index in bytes.
|
||||
*/
|
||||
size?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing an event hub connection validation.
|
||||
*/
|
||||
export interface EventHubConnectionValidation {
|
||||
/**
|
||||
* The name of the event hub connection.
|
||||
*/
|
||||
eventhubConnectionName?: string;
|
||||
/**
|
||||
* The resource ID of the event hub to be used to create a data connection.
|
||||
*/
|
||||
eventHubResourceId: string;
|
||||
/**
|
||||
* The event hub consumer group.
|
||||
*/
|
||||
consumerGroup: string;
|
||||
/**
|
||||
* The table where the data should be ingested. Optionally the table information can be added to
|
||||
* each message.
|
||||
*/
|
||||
tableName?: string;
|
||||
/**
|
||||
* The mapping rule to be used to ingest the data. Optionally the mapping information can be
|
||||
* added to each message.
|
||||
*/
|
||||
mappingRuleName?: string;
|
||||
/**
|
||||
* The data format of the message. Optionally the data format can be added to each message.
|
||||
* Possible values include: 'MULTIJSON', 'JSON', 'CSV'
|
||||
*/
|
||||
dataFormat?: string;
|
||||
}
|
||||
|
||||
export interface Resource extends BaseResource {
|
||||
/**
|
||||
* Fully qualified resource Id for the resource. Ex -
|
||||
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The name of the resource
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* The type of the resource. Ex- Microsoft.Compute/virtualMachines or
|
||||
* Microsoft.Storage/storageAccounts.
|
||||
*/
|
||||
readonly type?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The resource model definition for a ARM tracked top level resource
|
||||
*/
|
||||
export interface TrackedResource extends Resource {
|
||||
/**
|
||||
* Resource tags.
|
||||
*/
|
||||
tags?: { [propertyName: string]: string };
|
||||
/**
|
||||
* The geo-location where the resource lives
|
||||
*/
|
||||
location: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing a Kusto cluster.
|
||||
*/
|
||||
export interface Cluster extends TrackedResource {
|
||||
/**
|
||||
* An ETag of the resource created.
|
||||
*/
|
||||
readonly etag?: string;
|
||||
/**
|
||||
* The SKU of the cluster.
|
||||
*/
|
||||
sku: AzureSku;
|
||||
/**
|
||||
* The state of the resource. Possible values include: 'Creating', 'Unavailable', 'Running',
|
||||
* 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting'
|
||||
*/
|
||||
readonly state?: string;
|
||||
/**
|
||||
* The provisioned state of the resource. Possible values include: 'Running', 'Creating',
|
||||
* 'Deleting', 'Succeeded', 'Failed'
|
||||
*/
|
||||
readonly provisioningState?: string;
|
||||
/**
|
||||
* The cluster URI.
|
||||
*/
|
||||
readonly uri?: string;
|
||||
/**
|
||||
* The cluster data ingestion URI.
|
||||
*/
|
||||
readonly dataIngestionUri?: string;
|
||||
/**
|
||||
* The cluster's external tenants.
|
||||
*/
|
||||
trustedExternalTenants?: TrustedExternalTenant[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing an update to a Kusto cluster.
|
||||
*/
|
||||
export interface ClusterUpdate extends Resource {
|
||||
/**
|
||||
* Resource tags.
|
||||
*/
|
||||
tags?: { [propertyName: string]: string };
|
||||
/**
|
||||
* Resource location.
|
||||
*/
|
||||
location?: string;
|
||||
/**
|
||||
* An ETag of the resource updated.
|
||||
*/
|
||||
readonly etag?: string;
|
||||
/**
|
||||
* The SKU of the cluster.
|
||||
*/
|
||||
sku?: AzureSku;
|
||||
/**
|
||||
* The state of the resource. Possible values include: 'Creating', 'Unavailable', 'Running',
|
||||
* 'Deleting', 'Deleted', 'Stopping', 'Stopped', 'Starting'
|
||||
*/
|
||||
readonly state?: string;
|
||||
/**
|
||||
* The provisioned state of the resource. Possible values include: 'Running', 'Creating',
|
||||
* 'Deleting', 'Succeeded', 'Failed'
|
||||
*/
|
||||
readonly provisioningState?: string;
|
||||
/**
|
||||
* The cluster URI.
|
||||
*/
|
||||
readonly uri?: string;
|
||||
/**
|
||||
* The cluster data ingestion URI.
|
||||
*/
|
||||
readonly dataIngestionUri?: string;
|
||||
/**
|
||||
* The cluster's external tenants.
|
||||
*/
|
||||
trustedExternalTenants?: TrustedExternalTenant[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing a Kusto database.
|
||||
*/
|
||||
export interface Database extends TrackedResource {
|
||||
/**
|
||||
* An ETag of the resource created.
|
||||
*/
|
||||
readonly etag?: string;
|
||||
/**
|
||||
* The provisioned state of the resource. Possible values include: 'Running', 'Creating',
|
||||
* 'Deleting', 'Succeeded', 'Failed'
|
||||
*/
|
||||
readonly provisioningState?: string;
|
||||
/**
|
||||
* The number of days data should be kept before it stops being accessible to queries.
|
||||
*/
|
||||
softDeletePeriodInDays: number;
|
||||
/**
|
||||
* The number of days of data that should be kept in cache for fast queries.
|
||||
*/
|
||||
hotCachePeriodInDays?: number;
|
||||
/**
|
||||
* The statistics of the database.
|
||||
*/
|
||||
statistics?: DatabaseStatistics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing an update to a Kusto database.
|
||||
*/
|
||||
export interface DatabaseUpdate extends Resource {
|
||||
/**
|
||||
* Resource location.
|
||||
*/
|
||||
location?: string;
|
||||
/**
|
||||
* An ETag of the resource updated.
|
||||
*/
|
||||
readonly etag?: string;
|
||||
/**
|
||||
* The provisioned state of the resource. Possible values include: 'Running', 'Creating',
|
||||
* 'Deleting', 'Succeeded', 'Failed'
|
||||
*/
|
||||
readonly provisioningState?: string;
|
||||
/**
|
||||
* The number of days data should be kept before it stops being accessible to queries.
|
||||
*/
|
||||
softDeletePeriodInDays: number;
|
||||
/**
|
||||
* The number of days of data that should be kept in cache for fast queries.
|
||||
*/
|
||||
hotCachePeriodInDays?: number;
|
||||
/**
|
||||
* The statistics of the database.
|
||||
*/
|
||||
statistics?: DatabaseStatistics;
|
||||
}
|
||||
|
||||
export interface DatabasePrincipal {
|
||||
/**
|
||||
* Database principal role. Possible values include: 'Admin', 'Ingestor', 'Monitor', 'User',
|
||||
* 'UnrestrictedViewers', 'Viewer'
|
||||
*/
|
||||
role: string;
|
||||
/**
|
||||
* Database principal name.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Database principal type. Possible values include: 'App', 'Group', 'User'
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Database principal fully qualified name.
|
||||
*/
|
||||
fqn?: string;
|
||||
/**
|
||||
* Database principal email if exists.
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* Application id - relevant only for application principal type.
|
||||
*/
|
||||
appId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The resource model definition for a ARM proxy resource. It will have everything other than
|
||||
* required location and tags
|
||||
*/
|
||||
export interface ProxyResource extends Resource {
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing an update to event hub connection.
|
||||
*/
|
||||
export interface EventHubConnectionUpdate extends ProxyResource {
|
||||
/**
|
||||
* Resource location.
|
||||
*/
|
||||
location?: string;
|
||||
/**
|
||||
* The resource ID of the event hub to be used to create a data connection.
|
||||
*/
|
||||
eventHubResourceId: string;
|
||||
/**
|
||||
* The event hub consumer group.
|
||||
*/
|
||||
consumerGroup: string;
|
||||
/**
|
||||
* The table where the data should be ingested. Optionally the table information can be added to
|
||||
* each message.
|
||||
*/
|
||||
tableName?: string;
|
||||
/**
|
||||
* The mapping rule to be used to ingest the data. Optionally the mapping information can be
|
||||
* added to each message.
|
||||
*/
|
||||
mappingRuleName?: string;
|
||||
/**
|
||||
* The data format of the message. Optionally the data format can be added to each message.
|
||||
* Possible values include: 'MULTIJSON', 'JSON', 'CSV'
|
||||
*/
|
||||
dataFormat?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing an event hub connection.
|
||||
*/
|
||||
export interface EventHubConnection extends ProxyResource {
|
||||
/**
|
||||
* Resource location.
|
||||
*/
|
||||
location?: string;
|
||||
/**
|
||||
* The resource ID of the event hub to be used to create a data connection.
|
||||
*/
|
||||
eventHubResourceId: string;
|
||||
/**
|
||||
* The event hub consumer group.
|
||||
*/
|
||||
consumerGroup: string;
|
||||
/**
|
||||
* The table where the data should be ingested. Optionally the table information can be added to
|
||||
* each message.
|
||||
*/
|
||||
tableName?: string;
|
||||
/**
|
||||
* The mapping rule to be used to ingest the data. Optionally the mapping information can be
|
||||
* added to each message.
|
||||
*/
|
||||
mappingRuleName?: string;
|
||||
/**
|
||||
* The data format of the message. Optionally the data format can be added to each message.
|
||||
* Possible values include: 'MULTIJSON', 'JSON', 'CSV'
|
||||
*/
|
||||
dataFormat?: string;
|
||||
}
|
||||
|
||||
export interface EventHubConnectionValidationResult {
|
||||
/**
|
||||
* A message which indicates a problem in event hub connection validation.
|
||||
*/
|
||||
errorMessage?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The list Kusto database principals operation request.
|
||||
*/
|
||||
export interface DatabasePrincipalListRequest {
|
||||
/**
|
||||
* The list of Kusto database principals.
|
||||
*/
|
||||
value?: DatabasePrincipal[];
|
||||
}
|
||||
|
||||
/**
|
||||
* The list Kusto event hub connection validation result.
|
||||
*/
|
||||
export interface EventHubConnectionValidationListResult {
|
||||
/**
|
||||
* The list of Kusto event hub connection validation errors.
|
||||
*/
|
||||
value?: EventHubConnectionValidationResult[];
|
||||
}
|
||||
|
||||
export interface ClusterCheckNameRequest {
|
||||
/**
|
||||
* Cluster name.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface DatabaseCheckNameRequest {
|
||||
/**
|
||||
* Database name.
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface CheckNameResult {
|
||||
/**
|
||||
* Specifies a Boolean value that indicates if the name is available.
|
||||
*/
|
||||
nameAvailable?: boolean;
|
||||
/**
|
||||
* The name that was checked.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Message indicating an unavailable name due to a conflict, or a description of the naming rules
|
||||
* that are violated.
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary The object that describes the operation.
|
||||
*/
|
||||
export interface OperationDisplay {
|
||||
/**
|
||||
* @summary Friendly name of the resource provider.
|
||||
*/
|
||||
provider?: string;
|
||||
/**
|
||||
* @summary The operation type.
|
||||
* @description For example: read, write, delete.
|
||||
*/
|
||||
operation?: string;
|
||||
/**
|
||||
* @summary The resource type on which the operation is performed.
|
||||
*/
|
||||
resource?: string;
|
||||
/**
|
||||
* @summary The friendly name of the operation.
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary A REST API operation
|
||||
*/
|
||||
export interface Operation {
|
||||
/**
|
||||
* @summary The operation name.
|
||||
* @description This is of the format {provider}/{resource}/{operation}.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* @summary The object that describes the operation.
|
||||
*/
|
||||
display?: OperationDisplay;
|
||||
/**
|
||||
* @summary The intended executor of the operation.
|
||||
*/
|
||||
origin?: string;
|
||||
/**
|
||||
* @summary Properties of the operation.
|
||||
*/
|
||||
properties?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* The resource model definition for a Azure Resource Manager resource with an etag.
|
||||
*/
|
||||
export interface AzureEntityResource extends Resource {
|
||||
/**
|
||||
* Resource Etag.
|
||||
*/
|
||||
readonly etag?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The list Kusto clusters operation response.
|
||||
*/
|
||||
export interface ClusterListResult extends Array<Cluster> {
|
||||
}
|
||||
|
||||
/**
|
||||
* List of available SKUs for a new Kusto Cluster.
|
||||
*/
|
||||
export interface ListSkusResult extends Array<AzureSku> {
|
||||
}
|
||||
|
||||
/**
|
||||
* List of available SKUs for an existing Kusto Cluster.
|
||||
*/
|
||||
export interface ListResourceSkusResult extends Array<AzureResourceSku> {
|
||||
}
|
||||
|
||||
/**
|
||||
* The list Kusto databases operation response.
|
||||
*/
|
||||
export interface DatabaseListResult extends Array<Database> {
|
||||
}
|
||||
|
||||
/**
|
||||
* The list Kusto database principals operation response.
|
||||
*/
|
||||
export interface DatabasePrincipalListResult extends Array<DatabasePrincipal> {
|
||||
}
|
||||
|
||||
/**
|
||||
* The list Kusto event hub connections operation response.
|
||||
*/
|
||||
export interface EventHubConnectionListResult extends Array<EventHubConnection> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Result of the request to list REST API operations. It contains a list of operations and
|
||||
* a URL nextLink to get the next set of results.
|
||||
*/
|
||||
export interface OperationListResult extends Array<Operation> {
|
||||
/**
|
||||
* @summary The URL to get the next set of operation list results if there are any.
|
||||
*/
|
||||
nextLink?: string;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
/* jshint latedef:false */
|
||||
/* jshint forin:false */
|
||||
/* jshint noempty:false */
|
||||
|
||||
'use strict';
|
||||
|
||||
var msRestAzure = require('ms-rest-azure');
|
||||
|
||||
exports.BaseResource = msRestAzure.BaseResource;
|
||||
exports.CloudError = msRestAzure.CloudError;
|
||||
exports.TrustedExternalTenant = require('./trustedExternalTenant');
|
||||
exports.AzureSku = require('./azureSku');
|
||||
exports.AzureCapacity = require('./azureCapacity');
|
||||
exports.AzureResourceSku = require('./azureResourceSku');
|
||||
exports.DatabaseStatistics = require('./databaseStatistics');
|
||||
exports.EventHubConnectionValidation = require('./eventHubConnectionValidation');
|
||||
exports.Resource = require('./resource');
|
||||
exports.TrackedResource = require('./trackedResource');
|
||||
exports.Cluster = require('./cluster');
|
||||
exports.ClusterUpdate = require('./clusterUpdate');
|
||||
exports.Database = require('./database');
|
||||
exports.DatabaseUpdate = require('./databaseUpdate');
|
||||
exports.DatabasePrincipal = require('./databasePrincipal');
|
||||
exports.ProxyResource = require('./proxyResource');
|
||||
exports.EventHubConnectionUpdate = require('./eventHubConnectionUpdate');
|
||||
exports.EventHubConnection = require('./eventHubConnection');
|
||||
exports.EventHubConnectionValidationResult = require('./eventHubConnectionValidationResult');
|
||||
exports.DatabasePrincipalListRequest = require('./databasePrincipalListRequest');
|
||||
exports.EventHubConnectionValidationListResult = require('./eventHubConnectionValidationListResult');
|
||||
exports.ClusterCheckNameRequest = require('./clusterCheckNameRequest');
|
||||
exports.DatabaseCheckNameRequest = require('./databaseCheckNameRequest');
|
||||
exports.CheckNameResult = require('./checkNameResult');
|
||||
exports.OperationDisplay = require('./operationDisplay');
|
||||
exports.Operation = require('./operation');
|
||||
exports.AzureEntityResource = require('./azureEntityResource');
|
||||
exports.ClusterListResult = require('./clusterListResult');
|
||||
exports.ListSkusResult = require('./listSkusResult');
|
||||
exports.ListResourceSkusResult = require('./listResourceSkusResult');
|
||||
exports.DatabaseListResult = require('./databaseListResult');
|
||||
exports.DatabasePrincipalListResult = require('./databasePrincipalListResult');
|
||||
exports.EventHubConnectionListResult = require('./eventHubConnectionListResult');
|
||||
exports.OperationListResult = require('./operationListResult');
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* List of available SKUs for an existing Kusto Cluster.
|
||||
*/
|
||||
class ListResourceSkusResult extends Array {
|
||||
/**
|
||||
* Create a ListResourceSkusResult.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ListResourceSkusResult
|
||||
*
|
||||
* @returns {object} metadata of ListResourceSkusResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ListResourceSkusResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ListResourceSkusResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'AzureResourceSkuElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureResourceSku'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ListResourceSkusResult;
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* List of available SKUs for a new Kusto Cluster.
|
||||
*/
|
||||
class ListSkusResult extends Array {
|
||||
/**
|
||||
* Create a ListSkusResult.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ListSkusResult
|
||||
*
|
||||
* @returns {object} metadata of ListSkusResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ListSkusResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ListSkusResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'AzureSkuElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'AzureSku'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ListSkusResult;
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @summary A REST API operation
|
||||
*
|
||||
*/
|
||||
class Operation {
|
||||
/**
|
||||
* Create a Operation.
|
||||
* @property {string} [name] The operation name. This is of the format
|
||||
* {provider}/{resource}/{operation}.
|
||||
* @property {object} [display] The object that describes the operation.
|
||||
* @property {string} [display.provider]
|
||||
* @property {string} [display.operation] For example: read, write, delete.
|
||||
* @property {string} [display.resource]
|
||||
* @property {string} [display.description]
|
||||
* @property {string} [origin] The intended executor of the operation.
|
||||
* @property {object} [properties] Properties of the operation.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of Operation
|
||||
*
|
||||
* @returns {object} metadata of Operation
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'Operation',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Operation',
|
||||
modelProperties: {
|
||||
name: {
|
||||
required: false,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display: {
|
||||
required: false,
|
||||
serializedName: 'display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'OperationDisplay'
|
||||
}
|
||||
},
|
||||
origin: {
|
||||
required: false,
|
||||
serializedName: 'origin',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
properties: {
|
||||
required: false,
|
||||
serializedName: 'properties',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Operation;
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @summary The object that describes the operation.
|
||||
*
|
||||
*/
|
||||
class OperationDisplay {
|
||||
/**
|
||||
* Create a OperationDisplay.
|
||||
* @property {string} [provider] Friendly name of the resource provider.
|
||||
* @property {string} [operation] The operation type. For example: read,
|
||||
* write, delete.
|
||||
* @property {string} [resource] The resource type on which the operation is
|
||||
* performed.
|
||||
* @property {string} [description] The friendly name of the operation.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of OperationDisplay
|
||||
*
|
||||
* @returns {object} metadata of OperationDisplay
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'Operation_display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'OperationDisplay',
|
||||
modelProperties: {
|
||||
provider: {
|
||||
required: false,
|
||||
serializedName: 'provider',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
required: false,
|
||||
serializedName: 'operation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
required: false,
|
||||
serializedName: 'resource',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
required: false,
|
||||
serializedName: 'description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = OperationDisplay;
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @summary Result of the request to list REST API operations. It contains a
|
||||
* list of operations and a URL nextLink to get the next set of results.
|
||||
*/
|
||||
class OperationListResult extends Array {
|
||||
/**
|
||||
* Create a OperationListResult.
|
||||
* @property {string} [nextLink]
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of OperationListResult
|
||||
*
|
||||
* @returns {object} metadata of OperationListResult
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'OperationListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'OperationListResult',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: '',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
required: false,
|
||||
serializedName: 'OperationElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Operation'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
nextLink: {
|
||||
required: false,
|
||||
serializedName: 'nextLink',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = OperationListResult;
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* The resource model definition for a ARM proxy resource. It will have
|
||||
* everything other than required location and tags
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class ProxyResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a ProxyResource.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of ProxyResource
|
||||
*
|
||||
* @returns {object} metadata of ProxyResource
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'ProxyResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'ProxyResource',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ProxyResource;
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* Class representing a Resource.
|
||||
* @extends models['BaseResource']
|
||||
*/
|
||||
class Resource extends models['BaseResource'] {
|
||||
/**
|
||||
* Create a Resource.
|
||||
* @property {string} [id] Fully qualified resource Id for the resource. Ex -
|
||||
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
||||
* @property {string} [name] The name of the resource
|
||||
* @property {string} [type] The type of the resource. Ex-
|
||||
* Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of Resource
|
||||
*
|
||||
* @returns {object} metadata of Resource
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'Resource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'Resource',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Resource;
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const models = require('./index');
|
||||
|
||||
/**
|
||||
* The resource model definition for a ARM tracked top level resource
|
||||
*
|
||||
* @extends models['Resource']
|
||||
*/
|
||||
class TrackedResource extends models['Resource'] {
|
||||
/**
|
||||
* Create a TrackedResource.
|
||||
* @property {object} [tags] Resource tags.
|
||||
* @property {string} location The geo-location where the resource lives
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of TrackedResource
|
||||
*
|
||||
* @returns {object} metadata of TrackedResource
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'TrackedResource',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'TrackedResource',
|
||||
modelProperties: {
|
||||
id: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
required: false,
|
||||
readOnly: true,
|
||||
serializedName: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
required: false,
|
||||
serializedName: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
location: {
|
||||
required: true,
|
||||
serializedName: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TrackedResource;
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Class representing a TrustedExternalTenant.
|
||||
*/
|
||||
class TrustedExternalTenant {
|
||||
/**
|
||||
* Create a TrustedExternalTenant.
|
||||
* @property {string} [value] GUID representing an external tenant.
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the metadata of TrustedExternalTenant
|
||||
*
|
||||
* @returns {object} metadata of TrustedExternalTenant
|
||||
*
|
||||
*/
|
||||
mapper() {
|
||||
return {
|
||||
required: false,
|
||||
serializedName: 'TrustedExternalTenant',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
className: 'TrustedExternalTenant',
|
||||
modelProperties: {
|
||||
value: {
|
||||
required: false,
|
||||
serializedName: 'value',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TrustedExternalTenant;
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
/* jshint latedef:false */
|
||||
/* jshint forin:false */
|
||||
/* jshint noempty:false */
|
||||
|
||||
'use strict';
|
||||
|
||||
exports.Clusters = require('./clusters');
|
||||
exports.Databases = require('./databases');
|
||||
exports.EventHubConnections = require('./eventHubConnections');
|
||||
exports.Operations = require('./operations');
|
|
@ -0,0 +1,449 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for
|
||||
* license information.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is
|
||||
* regenerated.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const msRest = require('ms-rest');
|
||||
const msRestAzure = require('ms-rest-azure');
|
||||
const WebResource = msRest.WebResource;
|
||||
|
||||
/**
|
||||
* Lists available operations for the Microsoft.Kusto provider.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link OperationListResult} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _list(options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') {
|
||||
throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let baseUrl = this.client.baseUri;
|
||||
let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'providers/Microsoft.Kusto/operations';
|
||||
let queryParameters = [];
|
||||
queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion));
|
||||
if (queryParameters.length > 0) {
|
||||
requestUrl += '?' + queryParameters.join('&');
|
||||
}
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'GET';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['OperationListResult']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists available operations for the Microsoft.Kusto provider.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} callback - The callback.
|
||||
*
|
||||
* @returns {function} callback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link OperationListResult} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
function _listNext(nextPageLink, options, callback) {
|
||||
/* jshint validthis: true */
|
||||
let client = this.client;
|
||||
if(!callback && typeof options === 'function') {
|
||||
callback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!callback) {
|
||||
throw new Error('callback cannot be null.');
|
||||
}
|
||||
// Validate
|
||||
try {
|
||||
if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') {
|
||||
throw new Error('nextPageLink cannot be null or undefined and it must be of type string.');
|
||||
}
|
||||
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
|
||||
throw new Error('this.client.acceptLanguage must be of type string.');
|
||||
}
|
||||
} catch (error) {
|
||||
return callback(error);
|
||||
}
|
||||
|
||||
// Construct URL
|
||||
let requestUrl = '{nextLink}';
|
||||
requestUrl = requestUrl.replace('{nextLink}', nextPageLink);
|
||||
|
||||
// Create HTTP transport objects
|
||||
let httpRequest = new WebResource();
|
||||
httpRequest.method = 'GET';
|
||||
httpRequest.url = requestUrl;
|
||||
httpRequest.headers = {};
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
if (this.client.generateClientRequestId) {
|
||||
httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid();
|
||||
}
|
||||
if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) {
|
||||
httpRequest.headers['accept-language'] = this.client.acceptLanguage;
|
||||
}
|
||||
if(options) {
|
||||
for(let headerName in options['customHeaders']) {
|
||||
if (options['customHeaders'].hasOwnProperty(headerName)) {
|
||||
httpRequest.headers[headerName] = options['customHeaders'][headerName];
|
||||
}
|
||||
}
|
||||
}
|
||||
httpRequest.body = null;
|
||||
// Send Request
|
||||
return client.pipeline(httpRequest, (err, response, responseBody) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
let statusCode = response.statusCode;
|
||||
if (statusCode !== 200) {
|
||||
let error = new Error(responseBody);
|
||||
error.statusCode = response.statusCode;
|
||||
error.request = msRest.stripRequest(httpRequest);
|
||||
error.response = msRest.stripResponse(response);
|
||||
if (responseBody === '') responseBody = null;
|
||||
let parsedErrorResponse;
|
||||
try {
|
||||
parsedErrorResponse = JSON.parse(responseBody);
|
||||
if (parsedErrorResponse) {
|
||||
if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error;
|
||||
if (parsedErrorResponse.code) error.code = parsedErrorResponse.code;
|
||||
if (parsedErrorResponse.message) error.message = parsedErrorResponse.message;
|
||||
}
|
||||
if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) {
|
||||
let resultMapper = new client.models['CloudError']().mapper();
|
||||
error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body');
|
||||
}
|
||||
} catch (defaultError) {
|
||||
error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` +
|
||||
`- "${responseBody}" for the default response.`;
|
||||
return callback(error);
|
||||
}
|
||||
return callback(error);
|
||||
}
|
||||
// Create Result
|
||||
let result = null;
|
||||
if (responseBody === '') responseBody = null;
|
||||
// Deserialize Response
|
||||
if (statusCode === 200) {
|
||||
let parsedResponse = null;
|
||||
try {
|
||||
parsedResponse = JSON.parse(responseBody);
|
||||
result = JSON.parse(responseBody);
|
||||
if (parsedResponse !== null && parsedResponse !== undefined) {
|
||||
let resultMapper = new client.models['OperationListResult']().mapper();
|
||||
result = client.deserialize(resultMapper, parsedResponse, 'result');
|
||||
}
|
||||
} catch (error) {
|
||||
let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
|
||||
deserializationError.request = msRest.stripRequest(httpRequest);
|
||||
deserializationError.response = msRest.stripResponse(response);
|
||||
return callback(deserializationError);
|
||||
}
|
||||
}
|
||||
|
||||
return callback(null, result, httpRequest, response);
|
||||
});
|
||||
}
|
||||
|
||||
/** Class representing a Operations. */
|
||||
class Operations {
|
||||
/**
|
||||
* Create a Operations.
|
||||
* @param {KustoManagementClient} client Reference to the service client.
|
||||
*/
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
this._list = _list;
|
||||
this._listNext = _listNext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists available operations for the Microsoft.Kusto provider.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<OperationListResult>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listWithHttpOperationResponse(options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._list(options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists available operations for the Microsoft.Kusto provider.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {OperationListResult} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link OperationListResult} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
list(options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._list(options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._list(options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists available operations for the Microsoft.Kusto provider.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @returns {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {HttpOperationResponse<OperationListResult>} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*/
|
||||
listNextWithHttpOperationResponse(nextPageLink, options) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listNext(nextPageLink, options, (err, result, request, response) => {
|
||||
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
|
||||
httpOperationResponse.body = result;
|
||||
if (err) { reject(err); }
|
||||
else { resolve(httpOperationResponse); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists available operations for the Microsoft.Kusto provider.
|
||||
*
|
||||
* @param {string} nextPageLink The NextLink from the previous successful call
|
||||
* to List operation.
|
||||
*
|
||||
* @param {object} [options] Optional Parameters.
|
||||
*
|
||||
* @param {object} [options.customHeaders] Headers that will be added to the
|
||||
* request
|
||||
*
|
||||
* @param {function} [optionalCallback] - The optional callback.
|
||||
*
|
||||
* @returns {function|Promise} If a callback was passed as the last parameter
|
||||
* then it returns the callback else returns a Promise.
|
||||
*
|
||||
* {Promise} A promise is returned
|
||||
*
|
||||
* @resolve {OperationListResult} - The deserialized result object.
|
||||
*
|
||||
* @reject {Error} - The error object.
|
||||
*
|
||||
* {function} optionalCallback(err, result, request, response)
|
||||
*
|
||||
* {Error} err - The Error object if an error occurred, null otherwise.
|
||||
*
|
||||
* {object} [result] - The deserialized result object if an error did not occur.
|
||||
* See {@link OperationListResult} for more information.
|
||||
*
|
||||
* {object} [request] - The HTTP Request object if an error did not occur.
|
||||
*
|
||||
* {stream} [response] - The HTTP Response stream if an error did not occur.
|
||||
*/
|
||||
listNext(nextPageLink, options, optionalCallback) {
|
||||
let client = this.client;
|
||||
let self = this;
|
||||
if (!optionalCallback && typeof options === 'function') {
|
||||
optionalCallback = options;
|
||||
options = null;
|
||||
}
|
||||
if (!optionalCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
self._listNext(nextPageLink, options, (err, result, request, response) => {
|
||||
if (err) { reject(err); }
|
||||
else { resolve(result); }
|
||||
return;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return self._listNext(nextPageLink, options, optionalCallback);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Operations;
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "azure-arm-kusto",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "KustoManagementClient Library with typescript type definitions for node",
|
||||
"version": "1.0.0-preview",
|
||||
"dependencies": {
|
||||
"ms-rest": "^2.3.3",
|
||||
"ms-rest-azure": "^2.5.5"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/kustoManagementClient.js",
|
||||
"types": "./lib/kustoManagementClient.d.ts",
|
||||
"homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/kustoManagement",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/azure/azure-sdk-for-node.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/azure/azure-sdk-for-node/issues"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче