diff --git a/packages/@azure/arm-cosmosdb/LICENSE.txt b/packages/@azure/arm-cosmosdb/LICENSE.txt
new file mode 100644
index 000000000000..b73b4a1293c3
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 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.
diff --git a/packages/@azure/arm-cosmosdb/README.md b/packages/@azure/arm-cosmosdb/README.md
new file mode 100644
index 000000000000..34d35f6daecc
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/README.md
@@ -0,0 +1,100 @@
+## Azure CosmosDBManagementClient SDK for JavaScript
+
+This package contains an isomorphic SDK for CosmosDBManagementClient.
+
+### Currently supported environments
+
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+### How to Install
+
+```bash
+npm install @azure/arm-cosmosdb
+```
+
+### How to use
+
+#### nodejs - Authentication, client creation and get databaseAccounts as an example written in TypeScript.
+
+##### Install @azure/ms-rest-nodeauth
+
+```bash
+npm install @azure/ms-rest-nodeauth
+```
+
+##### Sample code
+
+```typescript
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
+import { CosmosDBManagementClient, CosmosDBManagementModels, CosmosDBManagementMappers } from "@azure/arm-cosmosdb";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new CosmosDBManagementClient(creds, subscriptionId);
+ const resourceGroupName = "testresourceGroupName";
+ const accountName = "testaccountName";
+ client.databaseAccounts.get(resourceGroupName, accountName).then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+#### browser - Authentication, client creation and get databaseAccounts as an example written in JavaScript.
+
+##### Install @azure/ms-rest-browserauth
+
+```bash
+npm install @azure/ms-rest-browserauth
+```
+
+##### Sample code
+
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-cosmosdb sample
+
+
+
+
+
+
+
+
+```
+
+## Related projects
+
+- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/arm-cosmosdb/lib/cosmosDBManagementClient.ts b/packages/@azure/arm-cosmosdb/lib/cosmosDBManagementClient.ts
new file mode 100644
index 000000000000..93072dc8ebb5
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/cosmosDBManagementClient.ts
@@ -0,0 +1,66 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as operations from "./operations";
+import { CosmosDBManagementClientContext } from "./cosmosDBManagementClientContext";
+
+
+class CosmosDBManagementClient extends CosmosDBManagementClientContext {
+ // Operation groups
+ databaseAccounts: operations.DatabaseAccounts;
+ operations: operations.Operations;
+ database: operations.Database;
+ collection: operations.Collection;
+ collectionRegion: operations.CollectionRegion;
+ databaseAccountRegion: operations.DatabaseAccountRegion;
+ percentileSourceTarget: operations.PercentileSourceTarget;
+ percentileTarget: operations.PercentileTarget;
+ percentile: operations.Percentile;
+ collectionPartitionRegion: operations.CollectionPartitionRegion;
+ collectionPartition: operations.CollectionPartition;
+ partitionKeyRangeId: operations.PartitionKeyRangeId;
+ partitionKeyRangeIdRegion: operations.PartitionKeyRangeIdRegion;
+
+ /**
+ * Initializes a new instance of the CosmosDBManagementClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId Azure subscription ID.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CosmosDBManagementClientOptions) {
+ super(credentials, subscriptionId, options);
+ this.databaseAccounts = new operations.DatabaseAccounts(this);
+ this.operations = new operations.Operations(this);
+ this.database = new operations.Database(this);
+ this.collection = new operations.Collection(this);
+ this.collectionRegion = new operations.CollectionRegion(this);
+ this.databaseAccountRegion = new operations.DatabaseAccountRegion(this);
+ this.percentileSourceTarget = new operations.PercentileSourceTarget(this);
+ this.percentileTarget = new operations.PercentileTarget(this);
+ this.percentile = new operations.Percentile(this);
+ this.collectionPartitionRegion = new operations.CollectionPartitionRegion(this);
+ this.collectionPartition = new operations.CollectionPartition(this);
+ this.partitionKeyRangeId = new operations.PartitionKeyRangeId(this);
+ this.partitionKeyRangeIdRegion = new operations.PartitionKeyRangeIdRegion(this);
+ }
+}
+
+// Operation Specifications
+
+export {
+ CosmosDBManagementClient,
+ CosmosDBManagementClientContext,
+ Models as CosmosDBManagementModels,
+ Mappers as CosmosDBManagementMappers
+};
+export * from "./operations";
diff --git a/packages/@azure/arm-cosmosdb/lib/cosmosDBManagementClientContext.ts b/packages/@azure/arm-cosmosdb/lib/cosmosDBManagementClientContext.ts
new file mode 100644
index 000000000000..d843de9fb73d
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/cosmosDBManagementClientContext.ts
@@ -0,0 +1,62 @@
+/*
+ * 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 * as Models from "./models";
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+
+const packageName = "@azure/arm-cosmosdb";
+const packageVersion = "2.3.0";
+
+export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceClient {
+ credentials: msRest.ServiceClientCredentials;
+ subscriptionId: string;
+ apiVersion?: string;
+
+ /**
+ * Initializes a new instance of the CosmosDBManagementClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId Azure subscription ID.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CosmosDBManagementClientOptions) {
+ if (credentials == undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+ if (subscriptionId == undefined) {
+ throw new Error('\'subscriptionId\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+ if(!options.userAgent) {
+ const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
+ options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
+ }
+
+ super(credentials, options);
+
+ this.apiVersion = '2015-04-08';
+ this.acceptLanguage = 'en-US';
+ this.longRunningOperationRetryTimeout = 30;
+ this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
+ this.requestContentType = "application/json; charset=utf-8";
+ this.credentials = credentials;
+ this.subscriptionId = subscriptionId;
+
+ if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
+ this.acceptLanguage = options.acceptLanguage;
+ }
+ if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
+ this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
+ }
+ }
+}
diff --git a/packages/@azure/arm-cosmosdb/lib/models/collectionMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/collectionMappers.ts
new file mode 100644
index 000000000000..4b2934f1b237
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/collectionMappers.ts
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+export {
+ MetricListResult,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ UsagesResult,
+ Usage,
+ MetricDefinitionsListResult,
+ MetricDefinition,
+ MetricAvailability,
+ PartitionUsage,
+ PercentileMetricValue,
+ PartitionMetric
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/collectionPartitionMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/collectionPartitionMappers.ts
new file mode 100644
index 000000000000..35b2d6172947
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/collectionPartitionMappers.ts
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+export {
+ PartitionMetricListResult,
+ PartitionMetric,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ PartitionUsagesResult,
+ PartitionUsage,
+ Usage,
+ PercentileMetricValue
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/collectionPartitionRegionMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/collectionPartitionRegionMappers.ts
new file mode 100644
index 000000000000..a0b31db71d0f
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/collectionPartitionRegionMappers.ts
@@ -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.
+ */
+
+export {
+ PartitionMetricListResult,
+ PartitionMetric,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ PercentileMetricValue
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/collectionRegionMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/collectionRegionMappers.ts
new file mode 100644
index 000000000000..7fa443e0fd5a
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/collectionRegionMappers.ts
@@ -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.
+ */
+
+export {
+ MetricListResult,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ PercentileMetricValue,
+ PartitionMetric
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/databaseAccountRegionMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/databaseAccountRegionMappers.ts
new file mode 100644
index 000000000000..7fa443e0fd5a
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/databaseAccountRegionMappers.ts
@@ -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.
+ */
+
+export {
+ MetricListResult,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ PercentileMetricValue,
+ PartitionMetric
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/databaseAccountsMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/databaseAccountsMappers.ts
new file mode 100644
index 000000000000..a0ad0dc8e67f
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/databaseAccountsMappers.ts
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+export {
+ DatabaseAccount,
+ Resource,
+ BaseResource,
+ ConsistencyPolicy,
+ Capability,
+ Location,
+ FailoverPolicy,
+ VirtualNetworkRule,
+ CloudError,
+ DatabaseAccountPatchParameters,
+ DatabaseAccountCreateUpdateParameters,
+ FailoverPolicies,
+ DatabaseAccountsListResult,
+ DatabaseAccountListKeysResult,
+ DatabaseAccountListConnectionStringsResult,
+ DatabaseAccountConnectionString,
+ RegionForOnlineOffline,
+ ErrorResponse,
+ DatabaseAccountListReadOnlyKeysResult,
+ DatabaseAccountRegenerateKeyParameters,
+ MetricListResult,
+ Metric,
+ MetricName,
+ MetricValue,
+ UsagesResult,
+ Usage,
+ MetricDefinitionsListResult,
+ MetricDefinition,
+ MetricAvailability,
+ SqlDatabaseListResult,
+ SqlDatabase,
+ SqlDatabaseCreateUpdateParameters,
+ SqlDatabaseResource,
+ SqlContainerListResult,
+ SqlContainer,
+ IndexingPolicy,
+ IncludedPaths,
+ Indexes,
+ SqlPartitionKey,
+ UniqueKeyPolicy,
+ UniqueKey,
+ ConflictResolutionPolicy,
+ SqlContainerCreateUpdateParameters,
+ SqlContainerResource,
+ MongoDatabaseListResult,
+ MongoDatabase,
+ MongoDatabaseCreateUpdateParameters,
+ MongoDatabaseResource,
+ MongoCollectionListResult,
+ MongoCollection,
+ MongoIndex,
+ MongoIndexKeys,
+ MongoIndexOptions,
+ MongoCollectionCreateUpdateParameters,
+ MongoCollectionResource,
+ TableListResult,
+ Table,
+ TableCreateUpdateParameters,
+ TableResource,
+ CassandraKeyspaceListResult,
+ CassandraKeyspace,
+ CassandraKeyspaceCreateUpdateParameters,
+ CassandraKeyspaceResource,
+ CassandraTableListResult,
+ CassandraTable,
+ CassandraSchema,
+ Column,
+ CassandraPartitionKey,
+ ClusterKey,
+ CassandraTableCreateUpdateParameters,
+ CassandraTableResource,
+ PartitionUsage,
+ PercentileMetricValue,
+ PartitionMetric
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/databaseMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/databaseMappers.ts
new file mode 100644
index 000000000000..4b2934f1b237
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/databaseMappers.ts
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+export {
+ MetricListResult,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ UsagesResult,
+ Usage,
+ MetricDefinitionsListResult,
+ MetricDefinition,
+ MetricAvailability,
+ PartitionUsage,
+ PercentileMetricValue,
+ PartitionMetric
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/index.ts b/packages/@azure/arm-cosmosdb/lib/models/index.ts
new file mode 100644
index 000000000000..0c069c9987af
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/index.ts
@@ -0,0 +1,3476 @@
+/*
+ * 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, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
+import * as msRest from "@azure/ms-rest-js";
+
+export { BaseResource, CloudError };
+
+
+/**
+ * @interface
+ * An interface representing ConsistencyPolicy.
+ * The consistency policy for the Cosmos DB database account.
+ *
+ */
+export interface ConsistencyPolicy {
+ /**
+ * @member {DefaultConsistencyLevel} defaultConsistencyLevel The default
+ * consistency level and configuration settings of the Cosmos DB account.
+ * Possible values include: 'Eventual', 'Session', 'BoundedStaleness',
+ * 'Strong', 'ConsistentPrefix'
+ */
+ defaultConsistencyLevel: DefaultConsistencyLevel;
+ /**
+ * @member {number} [maxStalenessPrefix] When used with the Bounded Staleness
+ * consistency level, this value represents the number of stale requests
+ * tolerated. Accepted range for this value is 1 – 2,147,483,647. Required
+ * when defaultConsistencyPolicy is set to 'BoundedStaleness'.
+ */
+ maxStalenessPrefix?: number;
+ /**
+ * @member {number} [maxIntervalInSeconds] When used with the Bounded
+ * Staleness consistency level, this value represents the time amount of
+ * staleness (in seconds) tolerated. Accepted range for this value is 5 -
+ * 86400. Required when defaultConsistencyPolicy is set to
+ * 'BoundedStaleness'.
+ */
+ maxIntervalInSeconds?: number;
+}
+
+/**
+ * @interface
+ * An interface representing Capability.
+ * Cosmos DB capability object
+ *
+ */
+export interface Capability {
+ /**
+ * @member {string} [name] Name of the Cosmos DB capability. For example,
+ * "name": "EnableCassandra". Current values also include "EnableTable" and
+ * "EnableGremlin".
+ */
+ name?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Location.
+ * A region in which the Azure Cosmos DB database account is deployed.
+ *
+ */
+export interface Location {
+ /**
+ * @member {string} [id] The unique identifier of the region within the
+ * database account. Example: <accountName>-<locationName>.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [locationName] The name of the region.
+ */
+ locationName?: string;
+ /**
+ * @member {string} [documentEndpoint] The connection endpoint for the
+ * specific region. Example:
+ * https://<accountName>-<locationName>.documents.azure.com:443/
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly documentEndpoint?: string;
+ /**
+ * @member {string} [provisioningState]
+ */
+ provisioningState?: string;
+ /**
+ * @member {number} [failoverPriority] The failover priority of the region. A
+ * failover priority of 0 indicates a write region. The maximum value for a
+ * failover priority = (total number of regions - 1). Failover priority
+ * values must be unique for each of the regions in which the database
+ * account exists.
+ */
+ failoverPriority?: number;
+}
+
+/**
+ * @interface
+ * An interface representing FailoverPolicy.
+ * The failover policy for a given region of a database account.
+ *
+ */
+export interface FailoverPolicy {
+ /**
+ * @member {string} [id] The unique identifier of the region in which the
+ * database account replicates to. Example:
+ * <accountName>-<locationName>.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [locationName] The name of the region in which the
+ * database account exists.
+ */
+ locationName?: string;
+ /**
+ * @member {number} [failoverPriority] The failover priority of the region. A
+ * failover priority of 0 indicates a write region. The maximum value for a
+ * failover priority = (total number of regions - 1). Failover priority
+ * values must be unique for each of the regions in which the database
+ * account exists.
+ */
+ failoverPriority?: number;
+}
+
+/**
+ * @interface
+ * An interface representing VirtualNetworkRule.
+ * Virtual Network ACL Rule object
+ *
+ */
+export interface VirtualNetworkRule {
+ /**
+ * @member {string} [id] Resource ID of a subnet, for example:
+ * /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
+ */
+ id?: string;
+ /**
+ * @member {boolean} [ignoreMissingVNetServiceEndpoint] Create firewall rule
+ * before the virtual network has vnet service endpoint enabled.
+ */
+ ignoreMissingVNetServiceEndpoint?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing Resource.
+ * The core properties of ARM resources.
+ *
+ * @extends BaseResource
+ */
+export interface Resource extends BaseResource {
+ /**
+ * @member {string} [id] The unique resource identifier of the database
+ * account.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [name] The name of the database account.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [type] The type of Azure resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly type?: string;
+ /**
+ * @member {string} location The location of the resource group to which the
+ * resource belongs.
+ */
+ location: string;
+ /**
+ * @member {{ [propertyName: string]: string }} [tags]
+ */
+ tags?: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccount.
+ * An Azure Cosmos DB database account.
+ *
+ * @extends Resource
+ */
+export interface DatabaseAccount extends Resource {
+ /**
+ * @member {DatabaseAccountKind} [kind] Indicates the type of database
+ * account. This can only be set at database account creation. Possible
+ * values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value:
+ * 'GlobalDocumentDB' .
+ */
+ kind?: DatabaseAccountKind;
+ /**
+ * @member {string} [provisioningState]
+ */
+ provisioningState?: string;
+ /**
+ * @member {string} [documentEndpoint] The connection endpoint for the Cosmos
+ * DB database account.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly documentEndpoint?: string;
+ /**
+ * @member {DatabaseAccountOfferType} [databaseAccountOfferType] The offer
+ * type for the Cosmos DB database account. Default value: Standard. Possible
+ * values include: 'Standard'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly databaseAccountOfferType?: DatabaseAccountOfferType;
+ /**
+ * @member {string} [ipRangeFilter] Cosmos DB Firewall Support: This value
+ * specifies the set of IP addresses or IP address ranges in CIDR form to be
+ * included as the allowed list of client IPs for a given database account.
+ * IP addresses/ranges must be comma separated and must not contain any
+ * spaces.
+ */
+ ipRangeFilter?: string;
+ /**
+ * @member {boolean} [isVirtualNetworkFilterEnabled] Flag to indicate whether
+ * to enable/disable Virtual Network ACL rules.
+ */
+ isVirtualNetworkFilterEnabled?: boolean;
+ /**
+ * @member {boolean} [enableAutomaticFailover] Enables automatic failover of
+ * the write region in the rare event that the region is unavailable due to
+ * an outage. Automatic failover will result in a new write region for the
+ * account and is chosen based on the failover priorities configured for the
+ * account.
+ */
+ enableAutomaticFailover?: boolean;
+ /**
+ * @member {ConsistencyPolicy} [consistencyPolicy] The consistency policy for
+ * the Cosmos DB database account.
+ */
+ consistencyPolicy?: ConsistencyPolicy;
+ /**
+ * @member {Capability[]} [capabilities] List of Cosmos DB capabilities for
+ * the account
+ */
+ capabilities?: Capability[];
+ /**
+ * @member {Location[]} [writeLocations] An array that contains the write
+ * location for the Cosmos DB account.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly writeLocations?: Location[];
+ /**
+ * @member {Location[]} [readLocations] An array that contains of the read
+ * locations enabled for the Cosmos DB account.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLocations?: Location[];
+ /**
+ * @member {FailoverPolicy[]} [failoverPolicies] An array that contains the
+ * regions ordered by their failover priorities.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly failoverPolicies?: FailoverPolicy[];
+ /**
+ * @member {VirtualNetworkRule[]} [virtualNetworkRules] List of Virtual
+ * Network ACL rules configured for the Cosmos DB account.
+ */
+ virtualNetworkRules?: VirtualNetworkRule[];
+ /**
+ * @member {boolean} [enableMultipleWriteLocations] Enables the account to
+ * write in multiple locations
+ */
+ enableMultipleWriteLocations?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing SqlDatabase.
+ * An Azure Cosmos DB SQL database.
+ *
+ * @extends Resource
+ */
+export interface SqlDatabase extends Resource {
+ /**
+ * @member {string} sqlDatabaseId Name of the Cosmos DB SQL database
+ */
+ sqlDatabaseId: string;
+ /**
+ * @member {string} [_rid] A system generated property. A unique identifier.
+ */
+ _rid?: string;
+ /**
+ * @member {any} [_ts] A system generated property that denotes the last
+ * updated timestamp of the resource.
+ */
+ _ts?: any;
+ /**
+ * @member {string} [_self] A system generated property. It is the unique
+ * addressable URI for the resource.
+ */
+ _self?: string;
+ /**
+ * @member {string} [_etag] A system generated property representing the
+ * resource etag required for optimistic concurrency control.
+ */
+ _etag?: string;
+ /**
+ * @member {string} [_colls] A system generated property that specified the
+ * addressable path of the collections resource.
+ */
+ _colls?: string;
+ /**
+ * @member {string} [_users] A system generated property that specifies the
+ * addressable path of the users resource.
+ */
+ _users?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Indexes.
+ * The indexes for the path.
+ *
+ */
+export interface Indexes {
+ /**
+ * @member {DataType} [dataType] The datatype for which the indexing behavior
+ * is applied to. Possible values include: 'String', 'Number', 'Point',
+ * 'Polygon', 'LineString', 'MultiPolygon'. Default value: 'String' .
+ */
+ dataType?: DataType;
+ /**
+ * @member {number} [precision] The precision of the index. -1 is maximum
+ * precision.
+ */
+ precision?: number;
+ /**
+ * @member {IndexKind} [kind] Indicates the type of index. Possible values
+ * include: 'Hash', 'Range', 'Spatial'. Default value: 'Hash' .
+ */
+ kind?: IndexKind;
+}
+
+/**
+ * @interface
+ * An interface representing IncludedPaths.
+ * The paths that are included in indexing
+ *
+ */
+export interface IncludedPaths {
+ /**
+ * @member {string} [path] The path for which the indexing behavior applies
+ * to. Index paths typically start with root and end with wildcard (/path/*)
+ */
+ path?: string;
+ /**
+ * @member {Indexes[]} [indexes] List of indexes for this path
+ */
+ indexes?: Indexes[];
+}
+
+/**
+ * @interface
+ * An interface representing IndexingPolicy.
+ * Cosmos DB indexing policy
+ *
+ */
+export interface IndexingPolicy {
+ /**
+ * @member {boolean} [automatic] Indicates if the indexing policy is
+ * automatic
+ */
+ automatic?: boolean;
+ /**
+ * @member {IndexingMode} [indexingMode] Indicates the indexing mode.
+ * Possible values include: 'Consistent', 'Lazy', 'None'. Default value:
+ * 'Consistent' .
+ */
+ indexingMode?: IndexingMode;
+ /**
+ * @member {IncludedPaths[]} [includedPaths] List of paths to include in the
+ * indexing
+ */
+ includedPaths?: IncludedPaths[];
+ /**
+ * @member {string[]} [excludedPaths] List of paths to exclude from indexing
+ */
+ excludedPaths?: string[];
+}
+
+/**
+ * @interface
+ * An interface representing SqlPartitionKey.
+ * The configuration of the partition key to be used for partitioning data into
+ * multiple partitions
+ *
+ */
+export interface SqlPartitionKey {
+ /**
+ * @member {string[]} [paths] List of paths using which data within the SQL
+ * container can be partitioned
+ */
+ paths?: string[];
+ /**
+ * @member {PartitionKind} [kind] Indicates the kind of algorithm used for
+ * partitioning. Possible values include: 'Hash', 'Range'. Default value:
+ * 'Hash' .
+ */
+ kind?: PartitionKind;
+}
+
+/**
+ * @interface
+ * An interface representing UniqueKey.
+ * The unique key on that enforces uniqueness constraint on documents in the
+ * collection in the Azure Cosmos DB service.
+ *
+ */
+export interface UniqueKey {
+ /**
+ * @member {string[]} [paths] List of paths must be unique for each document
+ * in the Azure Cosmos DB service
+ */
+ paths?: string[];
+}
+
+/**
+ * @interface
+ * An interface representing UniqueKeyPolicy.
+ * The unique key policy configuration for specifying uniqueness constraints on
+ * documents in the collection in the Azure Cosmos DB service.
+ *
+ */
+export interface UniqueKeyPolicy {
+ /**
+ * @member {UniqueKey[]} [uniqueKeys] List of unique keys on that enforces
+ * uniqueness constraint on documents in the collection in the Azure Cosmos
+ * DB service.
+ */
+ uniqueKeys?: UniqueKey[];
+}
+
+/**
+ * @interface
+ * An interface representing ConflictResolutionPolicy.
+ * The conflict resolution policy for the SQL container.
+ *
+ */
+export interface ConflictResolutionPolicy {
+ /**
+ * @member {ConflictResolutionMode} [mode] Indicates the conflict resolution
+ * mode. Possible values include: 'LastWriterWins', 'Custom'. Default value:
+ * 'LastWriterWins' .
+ */
+ mode?: ConflictResolutionMode;
+ /**
+ * @member {string} [conflictResolutionPath] The conflict resolution path in
+ * the case of LastWriterWins mode.
+ */
+ conflictResolutionPath?: string;
+ /**
+ * @member {string} [conflictResolutionProcedure] The procedure to resolve
+ * conflicts in the case of custom mode.
+ */
+ conflictResolutionProcedure?: string;
+}
+
+/**
+ * @interface
+ * An interface representing SqlContainer.
+ * An Azure Cosmos DB SQL container.
+ *
+ * @extends Resource
+ */
+export interface SqlContainer extends Resource {
+ /**
+ * @member {string} sqlContainerId Name of the Cosmos DB SQL container
+ */
+ sqlContainerId: string;
+ /**
+ * @member {IndexingPolicy} [indexingPolicy] The configuration of the
+ * indexing policy. By default, the indexing is automatic for all document
+ * paths within the SQL container
+ */
+ indexingPolicy?: IndexingPolicy;
+ /**
+ * @member {SqlPartitionKey} [partitionKey] The configuration of the
+ * partition key to be used for partitioning data into multiple partitions
+ */
+ partitionKey?: SqlPartitionKey;
+ /**
+ * @member {number} [defaultTtl] Default time to live
+ */
+ defaultTtl?: number;
+ /**
+ * @member {UniqueKeyPolicy} [uniqueKeyPolicy] The unique key policy
+ * configuration for specifying uniqueness constraints on documents in the
+ * collection in the Azure Cosmos DB service.
+ */
+ uniqueKeyPolicy?: UniqueKeyPolicy;
+ /**
+ * @member {ConflictResolutionPolicy} [conflictResolutionPolicy] The conflict
+ * resolution policy for the SQL container.
+ */
+ conflictResolutionPolicy?: ConflictResolutionPolicy;
+ /**
+ * @member {string} [_rid] A system generated property. A unique identifier.
+ */
+ _rid?: string;
+ /**
+ * @member {any} [_ts] A system generated property that denotes the last
+ * updated timestamp of the resource.
+ */
+ _ts?: any;
+ /**
+ * @member {string} [_self] A system generated property. It is the unique
+ * addressable URI for the resource.
+ */
+ _self?: string;
+ /**
+ * @member {string} [_etag] A system generated property representing the
+ * resource etag required for optimistic concurrency control.
+ */
+ _etag?: string;
+ /**
+ * @member {string} [_doc] A system generated property that specifies the
+ * addressable path of the documents resource.
+ */
+ _doc?: string;
+ /**
+ * @member {string} [_sprocs] A system generated property that specifies the
+ * addressable path of the stored procedures (sprocs) resource.
+ */
+ _sprocs?: string;
+ /**
+ * @member {string} [_triggers] A system generated property that specifies
+ * the addressable path of the triggers resource.
+ */
+ _triggers?: string;
+ /**
+ * @member {string} [_udfs] A system generated property that specifies the
+ * addressable path of the user-defined functions (udfs) resource.
+ */
+ _udfs?: string;
+ /**
+ * @member {string} [_conflicts] A system generated property that specifies
+ * the addressable path of the conflicts resource.
+ */
+ _conflicts?: string;
+}
+
+/**
+ * @interface
+ * An interface representing MongoDatabase.
+ * An Azure Cosmos DB Mongo database.
+ *
+ * @extends Resource
+ */
+export interface MongoDatabase extends Resource {
+ /**
+ * @member {string} mongoDatabaseId Name of the Cosmos DB Mongo database
+ */
+ mongoDatabaseId: string;
+}
+
+/**
+ * @interface
+ * An interface representing MongoCollection.
+ * An Azure Cosmos DB Mongo collection.
+ *
+ * @extends Resource
+ */
+export interface MongoCollection extends Resource {
+ /**
+ * @member {string} mongoCollectionId Name of the Cosmos DB Mongo collection
+ */
+ mongoCollectionId: string;
+ /**
+ * @member {{ [propertyName: string]: string }} [shardKey] A key-value pair
+ * of shard keys to be applied for the request.
+ */
+ shardKey?: { [propertyName: string]: string };
+ /**
+ * @member {MongoIndex[]} [indexes] List of index keys
+ */
+ indexes?: MongoIndex[];
+}
+
+/**
+ * @interface
+ * An interface representing Table.
+ * An Azure Cosmos DB Table.
+ *
+ * @extends Resource
+ */
+export interface Table extends Resource {
+ /**
+ * @member {string} tableId Name of the Cosmos DB table
+ */
+ tableId: string;
+}
+
+/**
+ * @interface
+ * An interface representing CassandraKeyspace.
+ * An Azure Cosmos DB Cassandra keyspace.
+ *
+ * @extends Resource
+ */
+export interface CassandraKeyspace extends Resource {
+ /**
+ * @member {string} cassandraKeyspaceId Name of the Cosmos DB Cassandra
+ * keyspace
+ */
+ cassandraKeyspaceId: string;
+}
+
+/**
+ * @interface
+ * An interface representing CassandraTable.
+ * An Azure Cosmos DB Cassandra table.
+ *
+ * @extends Resource
+ */
+export interface CassandraTable extends Resource {
+ /**
+ * @member {string} cassandraTableId Name of the Cosmos DB Cassandra table
+ */
+ cassandraTableId: string;
+ /**
+ * @member {number} [defaultTtl] Time to live of the Cosmos DB Cassandra
+ * table
+ */
+ defaultTtl?: number;
+ /**
+ * @member {CassandraSchema} [schema] Schema of the Cosmos DB Cassandra table
+ */
+ schema?: CassandraSchema;
+}
+
+/**
+ * @interface
+ * An interface representing ErrorResponse.
+ * Error Response.
+ *
+ */
+export interface ErrorResponse {
+ /**
+ * @member {string} [code] Error code.
+ */
+ code?: string;
+ /**
+ * @member {string} [message] Error message indicating why the operation
+ * failed.
+ */
+ message?: string;
+}
+
+/**
+ * @interface
+ * An interface representing FailoverPolicies.
+ * The list of new failover policies for the failover priority change.
+ *
+ */
+export interface FailoverPolicies {
+ /**
+ * @member {FailoverPolicy[]} failoverPolicies List of failover policies.
+ */
+ failoverPolicies: FailoverPolicy[];
+}
+
+/**
+ * @interface
+ * An interface representing RegionForOnlineOffline.
+ * Cosmos DB region to online or offline.
+ *
+ */
+export interface RegionForOnlineOffline {
+ /**
+ * @member {string} region Cosmos DB region, with spaces between words and
+ * each word capitalized.
+ */
+ region: string;
+}
+
+/**
+ * @interface
+ * An interface representing ExtendedResourceProperties.
+ * The system generated resource properties associated with SQL databases and
+ * SQL containers.
+ *
+ */
+export interface ExtendedResourceProperties {
+ /**
+ * @member {string} [_rid] A system generated property. A unique identifier.
+ */
+ _rid?: string;
+ /**
+ * @member {any} [_ts] A system generated property that denotes the last
+ * updated timestamp of the resource.
+ */
+ _ts?: any;
+ /**
+ * @member {string} [_self] A system generated property. It is the unique
+ * addressable URI for the resource.
+ */
+ _self?: string;
+ /**
+ * @member {string} [_etag] A system generated property representing the
+ * resource etag required for optimistic concurrency control.
+ */
+ _etag?: string;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB database accounts.
+ *
+ * @extends Resource
+ */
+export interface DatabaseAccountCreateUpdateParameters extends Resource {
+ /**
+ * @member {DatabaseAccountKind} [kind] Indicates the type of database
+ * account. This can only be set at database account creation. Possible
+ * values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value:
+ * 'GlobalDocumentDB' .
+ */
+ kind?: DatabaseAccountKind;
+ /**
+ * @member {ConsistencyPolicy} [consistencyPolicy] The consistency policy for
+ * the Cosmos DB account.
+ */
+ consistencyPolicy?: ConsistencyPolicy;
+ /**
+ * @member {Location[]} locations An array that contains the georeplication
+ * locations enabled for the Cosmos DB account.
+ */
+ locations: Location[];
+ /**
+ * @member {string} [ipRangeFilter] Cosmos DB Firewall Support: This value
+ * specifies the set of IP addresses or IP address ranges in CIDR form to be
+ * included as the allowed list of client IPs for a given database account.
+ * IP addresses/ranges must be comma separated and must not contain any
+ * spaces.
+ */
+ ipRangeFilter?: string;
+ /**
+ * @member {boolean} [isVirtualNetworkFilterEnabled] Flag to indicate whether
+ * to enable/disable Virtual Network ACL rules.
+ */
+ isVirtualNetworkFilterEnabled?: boolean;
+ /**
+ * @member {boolean} [enableAutomaticFailover] Enables automatic failover of
+ * the write region in the rare event that the region is unavailable due to
+ * an outage. Automatic failover will result in a new write region for the
+ * account and is chosen based on the failover priorities configured for the
+ * account.
+ */
+ enableAutomaticFailover?: boolean;
+ /**
+ * @member {Capability[]} [capabilities] List of Cosmos DB capabilities for
+ * the account
+ */
+ capabilities?: Capability[];
+ /**
+ * @member {VirtualNetworkRule[]} [virtualNetworkRules] List of Virtual
+ * Network ACL rules configured for the Cosmos DB account.
+ */
+ virtualNetworkRules?: VirtualNetworkRule[];
+ /**
+ * @member {boolean} [enableMultipleWriteLocations] Enables the account to
+ * write in multiple locations
+ */
+ enableMultipleWriteLocations?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountPatchParameters.
+ * Parameters for patching Azure Cosmos DB database account properties.
+ *
+ */
+export interface DatabaseAccountPatchParameters {
+ /**
+ * @member {{ [propertyName: string]: string }} [tags]
+ */
+ tags?: { [propertyName: string]: string };
+ /**
+ * @member {Capability[]} [capabilities] List of Cosmos DB capabilities for
+ * the account
+ */
+ capabilities?: Capability[];
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountListReadOnlyKeysResult.
+ * The read-only access keys for the given database account.
+ *
+ */
+export interface DatabaseAccountListReadOnlyKeysResult {
+ /**
+ * @member {string} [primaryReadonlyMasterKey] Base 64 encoded value of the
+ * primary read-only key.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly primaryReadonlyMasterKey?: string;
+ /**
+ * @member {string} [secondaryReadonlyMasterKey] Base 64 encoded value of the
+ * secondary read-only key.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly secondaryReadonlyMasterKey?: string;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountListKeysResult.
+ * The access keys for the given database account.
+ *
+ */
+export interface DatabaseAccountListKeysResult {
+ /**
+ * @member {string} [primaryMasterKey] Base 64 encoded value of the primary
+ * read-write key.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly primaryMasterKey?: string;
+ /**
+ * @member {string} [secondaryMasterKey] Base 64 encoded value of the
+ * secondary read-write key.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly secondaryMasterKey?: string;
+ /**
+ * @member {string} [primaryReadonlyMasterKey] Base 64 encoded value of the
+ * primary read-only key.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly primaryReadonlyMasterKey?: string;
+ /**
+ * @member {string} [secondaryReadonlyMasterKey] Base 64 encoded value of the
+ * secondary read-only key.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly secondaryReadonlyMasterKey?: string;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountConnectionString.
+ * Connection string for the Cosmos DB account
+ *
+ */
+export interface DatabaseAccountConnectionString {
+ /**
+ * @member {string} [connectionString] Value of the connection string
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly connectionString?: string;
+ /**
+ * @member {string} [description] Description of the connection string
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountListConnectionStringsResult.
+ * The connection strings for the given database account.
+ *
+ */
+export interface DatabaseAccountListConnectionStringsResult {
+ /**
+ * @member {DatabaseAccountConnectionString[]} [connectionStrings] An array
+ * that contains the connection strings for the Cosmos DB account.
+ */
+ connectionStrings?: DatabaseAccountConnectionString[];
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountRegenerateKeyParameters.
+ * Parameters to regenerate the keys within the database account.
+ *
+ */
+export interface DatabaseAccountRegenerateKeyParameters {
+ /**
+ * @member {KeyKind} keyKind The access key to regenerate. Possible values
+ * include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly'
+ */
+ keyKind: KeyKind;
+}
+
+/**
+ * @interface
+ * An interface representing SqlDatabaseResource.
+ * Cosmos DB SQL database id object
+ *
+ */
+export interface SqlDatabaseResource {
+ /**
+ * @member {string} id Name of the Cosmos DB SQL database
+ */
+ id: string;
+}
+
+/**
+ * @interface
+ * An interface representing SqlDatabaseCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB SQL database.
+ *
+ */
+export interface SqlDatabaseCreateUpdateParameters {
+ /**
+ * @member {SqlDatabaseResource} resource The standard JSON format of a SQL
+ * database
+ */
+ resource: SqlDatabaseResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing SqlContainerResource.
+ * Cosmos DB SQL container resource object
+ *
+ */
+export interface SqlContainerResource {
+ /**
+ * @member {string} id Name of the Cosmos DB SQL container
+ */
+ id: string;
+ /**
+ * @member {IndexingPolicy} [indexingPolicy] The configuration of the
+ * indexing policy. By default, the indexing is automatic for all document
+ * paths within the SQL container
+ */
+ indexingPolicy?: IndexingPolicy;
+ /**
+ * @member {SqlPartitionKey} [partitionKey] The configuration of the
+ * partition key to be used for partitioning data into multiple partitions
+ */
+ partitionKey?: SqlPartitionKey;
+ /**
+ * @member {number} [defaultTtl] Default time to live
+ */
+ defaultTtl?: number;
+ /**
+ * @member {UniqueKeyPolicy} [uniqueKeyPolicy] The unique key policy
+ * configuration for specifying uniqueness constraints on documents in the
+ * collection in the Azure Cosmos DB service.
+ */
+ uniqueKeyPolicy?: UniqueKeyPolicy;
+ /**
+ * @member {ConflictResolutionPolicy} [conflictResolutionPolicy] The conflict
+ * resolution policy for the SQL container.
+ */
+ conflictResolutionPolicy?: ConflictResolutionPolicy;
+}
+
+/**
+ * @interface
+ * An interface representing SqlContainerCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB SQL container.
+ *
+ */
+export interface SqlContainerCreateUpdateParameters {
+ /**
+ * @member {SqlContainerResource} resource The standard JSON format of a SQL
+ * container
+ */
+ resource: SqlContainerResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing MongoDatabaseResource.
+ * Cosmos DB Mongo database id object
+ *
+ */
+export interface MongoDatabaseResource {
+ /**
+ * @member {string} id Name of the Cosmos DB Mongo database
+ */
+ id: string;
+}
+
+/**
+ * @interface
+ * An interface representing MongoDatabaseCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB Mongo database.
+ *
+ */
+export interface MongoDatabaseCreateUpdateParameters {
+ /**
+ * @member {MongoDatabaseResource} resource The standard JSON format of a
+ * Mongo database
+ */
+ resource: MongoDatabaseResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing MongoIndexKeys.
+ * Cosmos DB Mongo collection resource object
+ *
+ */
+export interface MongoIndexKeys {
+ /**
+ * @member {string[]} [keys] List of keys for each Mongo collection in the
+ * Azure Cosmos DB service
+ */
+ keys?: string[];
+}
+
+/**
+ * @interface
+ * An interface representing MongoIndexOptions.
+ * Cosmos DB Mongo collection index options
+ *
+ */
+export interface MongoIndexOptions {
+ /**
+ * @member {number} [expireAfterSeconds] Expire after seconds
+ */
+ expireAfterSeconds?: number;
+ /**
+ * @member {boolean} [unique] Is unique or not
+ */
+ unique?: boolean;
+}
+
+/**
+ * @interface
+ * An interface representing MongoIndex.
+ * Cosmos DB Mongo collection index key
+ *
+ */
+export interface MongoIndex {
+ /**
+ * @member {MongoIndexKeys} [key] Cosmos DB Mongo collection index keys
+ */
+ key?: MongoIndexKeys;
+ /**
+ * @member {MongoIndexOptions} [options] Cosmos DB Mongo collection index key
+ * options
+ */
+ options?: MongoIndexOptions;
+}
+
+/**
+ * @interface
+ * An interface representing MongoCollectionResource.
+ * Cosmos DB Mongo collection resource object
+ *
+ */
+export interface MongoCollectionResource {
+ /**
+ * @member {string} id Name of the Cosmos DB Mongo collection
+ */
+ id: string;
+ /**
+ * @member {{ [propertyName: string]: string }} [shardKey] A key-value pair
+ * of shard keys to be applied for the request.
+ */
+ shardKey?: { [propertyName: string]: string };
+ /**
+ * @member {MongoIndex[]} [indexes] List of index keys
+ */
+ indexes?: MongoIndex[];
+}
+
+/**
+ * @interface
+ * An interface representing MongoCollectionCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB Mongo collection.
+ *
+ */
+export interface MongoCollectionCreateUpdateParameters {
+ /**
+ * @member {MongoCollectionResource} resource The standard JSON format of a
+ * Mongo collection
+ */
+ resource: MongoCollectionResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing TableResource.
+ * Cosmos DB table id object
+ *
+ */
+export interface TableResource {
+ /**
+ * @member {string} id Name of the Cosmos DB table
+ */
+ id: string;
+}
+
+/**
+ * @interface
+ * An interface representing TableCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB Table.
+ *
+ */
+export interface TableCreateUpdateParameters {
+ /**
+ * @member {TableResource} resource The standard JSON format of a Table
+ */
+ resource: TableResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing CassandraKeyspaceResource.
+ * Cosmos DB Cassandra keyspace id object
+ *
+ */
+export interface CassandraKeyspaceResource {
+ /**
+ * @member {string} id Name of the Cosmos DB Cassandra keyspace
+ */
+ id: string;
+}
+
+/**
+ * @interface
+ * An interface representing CassandraKeyspaceCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB Cassandra keyspace.
+ *
+ */
+export interface CassandraKeyspaceCreateUpdateParameters {
+ /**
+ * @member {CassandraKeyspaceResource} resource The standard JSON format of a
+ * Cassandra keyspace
+ */
+ resource: CassandraKeyspaceResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing Column.
+ * Cosmos DB Cassandra table column
+ *
+ */
+export interface Column {
+ /**
+ * @member {string} [name] Name of the Cosmos DB Cassandra table column
+ */
+ name?: string;
+ /**
+ * @member {string} [type] Type of the Cosmos DB Cassandra table column
+ */
+ type?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CassandraPartitionKey.
+ * Cosmos DB Cassandra table partition key
+ *
+ */
+export interface CassandraPartitionKey {
+ /**
+ * @member {string} [name] Name of the Cosmos DB Cassandra table partition
+ * key
+ */
+ name?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ClusterKey.
+ * Cosmos DB Cassandra table cluster key
+ *
+ */
+export interface ClusterKey {
+ /**
+ * @member {string} [name] Name of the Cosmos DB Cassandra table cluster key
+ */
+ name?: string;
+ /**
+ * @member {string} [orderBy] Order of the Cosmos DB Cassandra table cluster
+ * key, only support "Asc" and "Desc"
+ */
+ orderBy?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CassandraSchema.
+ * Cosmos DB Cassandra table schema
+ *
+ */
+export interface CassandraSchema {
+ /**
+ * @member {Column[]} [columns] List of Cassandra table columns.
+ */
+ columns?: Column[];
+ /**
+ * @member {CassandraPartitionKey[]} [partitionKeys] List of partition key.
+ */
+ partitionKeys?: CassandraPartitionKey[];
+ /**
+ * @member {ClusterKey[]} [clusterKeys] List of cluster key.
+ */
+ clusterKeys?: ClusterKey[];
+}
+
+/**
+ * @interface
+ * An interface representing CassandraTableResource.
+ * Cosmos DB Cassandra table id object
+ *
+ */
+export interface CassandraTableResource {
+ /**
+ * @member {string} id Name of the Cosmos DB Cassandra table
+ */
+ id: string;
+ /**
+ * @member {number} [defaultTtl] Time to live of the Cosmos DB Cassandra
+ * table
+ */
+ defaultTtl?: number;
+ /**
+ * @member {CassandraSchema} [schema] Schema of the Cosmos DB Cassandra table
+ */
+ schema?: CassandraSchema;
+}
+
+/**
+ * @interface
+ * An interface representing CassandraTableCreateUpdateParameters.
+ * Parameters to create and update Cosmos DB Cassandra table.
+ *
+ */
+export interface CassandraTableCreateUpdateParameters {
+ /**
+ * @member {CassandraTableResource} resource The standard JSON format of a
+ * Cassandra table
+ */
+ resource: CassandraTableResource;
+ /**
+ * @member {{ [propertyName: string]: string }} options A key-value pair of
+ * options to be applied for the request. This corresponds to the headers
+ * sent with the request.
+ */
+ options: { [propertyName: string]: string };
+}
+
+/**
+ * @interface
+ * An interface representing OperationDisplay.
+ * The object that represents the operation.
+ *
+ */
+export interface OperationDisplay {
+ /**
+ * @member {string} [provider] Service provider: Microsoft.ResourceProvider
+ */
+ provider?: string;
+ /**
+ * @member {string} [resource] Resource on which the operation is performed:
+ * Profile, endpoint, etc.
+ */
+ resource?: string;
+ /**
+ * @member {string} [operation] Operation type: Read, write, delete, etc.
+ */
+ operation?: string;
+ /**
+ * @member {string} [description] Description of operation
+ */
+ description?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Operation.
+ * REST API operation
+ *
+ */
+export interface Operation {
+ /**
+ * @member {string} [name] Operation name: {provider}/{resource}/{operation}
+ */
+ name?: string;
+ /**
+ * @member {OperationDisplay} [display] The object that represents the
+ * operation.
+ */
+ display?: OperationDisplay;
+}
+
+/**
+ * @interface
+ * An interface representing MetricName.
+ * A metric name.
+ *
+ */
+export interface MetricName {
+ /**
+ * @member {string} [value] The name of the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: string;
+ /**
+ * @member {string} [localizedValue] The friendly name of the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly localizedValue?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Usage.
+ * The usage data for a usage request.
+ *
+ */
+export interface Usage {
+ /**
+ * @member {UnitType} [unit] The unit of the metric. Possible values include:
+ * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
+ * 'BytesPerSecond', 'Milliseconds'
+ */
+ unit?: UnitType;
+ /**
+ * @member {MetricName} [name] The name information for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: MetricName;
+ /**
+ * @member {string} [quotaPeriod] The quota period used to summarize the
+ * usage values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly quotaPeriod?: string;
+ /**
+ * @member {number} [limit] Maximum value for this metric
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly limit?: number;
+ /**
+ * @member {number} [currentValue] Current value for this metric
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly currentValue?: number;
+}
+
+/**
+ * @interface
+ * An interface representing PartitionUsage.
+ * The partition level usage data for a usage request.
+ *
+ * @extends Usage
+ */
+export interface PartitionUsage extends Usage {
+ /**
+ * @member {string} [partitionId] The partition id (GUID identifier) of the
+ * usages.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly partitionId?: string;
+ /**
+ * @member {string} [partitionKeyRangeId] The partition key range id (integer
+ * identifier) of the usages.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly partitionKeyRangeId?: string;
+}
+
+/**
+ * @interface
+ * An interface representing MetricAvailability.
+ * The availability of the metric.
+ *
+ */
+export interface MetricAvailability {
+ /**
+ * @member {string} [timeGrain] The time grain to be used to summarize the
+ * metric values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly timeGrain?: string;
+ /**
+ * @member {string} [retention] The retention for the metric values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly retention?: string;
+}
+
+/**
+ * @interface
+ * An interface representing MetricDefinition.
+ * The definition of a metric.
+ *
+ */
+export interface MetricDefinition {
+ /**
+ * @member {MetricAvailability[]} [metricAvailabilities] The list of metric
+ * availabilities for the account.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly metricAvailabilities?: MetricAvailability[];
+ /**
+ * @member {PrimaryAggregationType} [primaryAggregationType] The primary
+ * aggregation type of the metric. Possible values include: 'None',
+ * 'Average', 'Total', 'Minimimum', 'Maximum', 'Last'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly primaryAggregationType?: PrimaryAggregationType;
+ /**
+ * @member {UnitType} [unit] The unit of the metric. Possible values include:
+ * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
+ * 'BytesPerSecond', 'Milliseconds'
+ */
+ unit?: UnitType;
+ /**
+ * @member {string} [resourceUri] The resource uri of the database.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly resourceUri?: string;
+ /**
+ * @member {MetricName} [name] The name information for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: MetricName;
+}
+
+/**
+ * @interface
+ * An interface representing MetricValue.
+ * Represents metrics values.
+ *
+ */
+export interface MetricValue {
+ /**
+ * @member {number} [_count] The number of values for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly _count?: number;
+ /**
+ * @member {number} [average] The average value of the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly average?: number;
+ /**
+ * @member {number} [maximum] The max value of the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly maximum?: number;
+ /**
+ * @member {number} [minimum] The min value of the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly minimum?: number;
+ /**
+ * @member {Date} [timestamp] The metric timestamp (ISO-8601 format).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly timestamp?: Date;
+ /**
+ * @member {number} [total] The total value of the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly total?: number;
+}
+
+/**
+ * @interface
+ * An interface representing Metric.
+ * Metric data
+ *
+ */
+export interface Metric {
+ /**
+ * @member {Date} [startTime] The start time for the metric (ISO-8601
+ * format).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly startTime?: Date;
+ /**
+ * @member {Date} [endTime] The end time for the metric (ISO-8601 format).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly endTime?: Date;
+ /**
+ * @member {string} [timeGrain] The time grain to be used to summarize the
+ * metric values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly timeGrain?: string;
+ /**
+ * @member {UnitType} [unit] The unit of the metric. Possible values include:
+ * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
+ * 'BytesPerSecond', 'Milliseconds'
+ */
+ unit?: UnitType;
+ /**
+ * @member {MetricName} [name] The name information for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: MetricName;
+ /**
+ * @member {MetricValue[]} [metricValues] The metric values for the specified
+ * time window and timestep.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly metricValues?: MetricValue[];
+}
+
+/**
+ * @interface
+ * An interface representing PercentileMetricValue.
+ * Represents percentile metrics values.
+ *
+ * @extends MetricValue
+ */
+export interface PercentileMetricValue extends MetricValue {
+ /**
+ * @member {number} [p10] The 10th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p10?: number;
+ /**
+ * @member {number} [p25] The 25th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p25?: number;
+ /**
+ * @member {number} [p50] The 50th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p50?: number;
+ /**
+ * @member {number} [p75] The 75th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p75?: number;
+ /**
+ * @member {number} [p90] The 90th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p90?: number;
+ /**
+ * @member {number} [p95] The 95th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p95?: number;
+ /**
+ * @member {number} [p99] The 99th percentile value for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly p99?: number;
+}
+
+/**
+ * @interface
+ * An interface representing PercentileMetric.
+ * Percentile Metric data
+ *
+ */
+export interface PercentileMetric {
+ /**
+ * @member {Date} [startTime] The start time for the metric (ISO-8601
+ * format).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly startTime?: Date;
+ /**
+ * @member {Date} [endTime] The end time for the metric (ISO-8601 format).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly endTime?: Date;
+ /**
+ * @member {string} [timeGrain] The time grain to be used to summarize the
+ * metric values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly timeGrain?: string;
+ /**
+ * @member {UnitType} [unit] The unit of the metric. Possible values include:
+ * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
+ * 'BytesPerSecond', 'Milliseconds'
+ */
+ unit?: UnitType;
+ /**
+ * @member {MetricName} [name] The name information for the metric.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: MetricName;
+ /**
+ * @member {PercentileMetricValue[]} [metricValues] The percentile metric
+ * values for the specified time window and timestep.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly metricValues?: PercentileMetricValue[];
+}
+
+/**
+ * @interface
+ * An interface representing PartitionMetric.
+ * The metric values for a single partition.
+ *
+ * @extends Metric
+ */
+export interface PartitionMetric extends Metric {
+ /**
+ * @member {string} [partitionId] The partition id (GUID identifier) of the
+ * metric values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly partitionId?: string;
+ /**
+ * @member {string} [partitionKeyRangeId] The partition key range id (integer
+ * identifier) of the metric values.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly partitionKeyRangeId?: string;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseAccountsListUsagesOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface DatabaseAccountsListUsagesOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] An OData filter expression that describes a
+ * subset of usages to return. The supported parameter is name.value (name of
+ * the metric, can have an or of multiple names).
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing DatabaseListUsagesOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface DatabaseListUsagesOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] An OData filter expression that describes a
+ * subset of usages to return. The supported parameter is name.value (name of
+ * the metric, can have an or of multiple names).
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CollectionListUsagesOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface CollectionListUsagesOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] An OData filter expression that describes a
+ * subset of usages to return. The supported parameter is name.value (name of
+ * the metric, can have an or of multiple names).
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CollectionPartitionListUsagesOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface CollectionPartitionListUsagesOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] An OData filter expression that describes a
+ * subset of usages to return. The supported parameter is name.value (name of
+ * the metric, can have an or of multiple names).
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing CosmosDBManagementClientOptions.
+ * @extends AzureServiceClientOptions
+ */
+export interface CosmosDBManagementClientOptions extends AzureServiceClientOptions {
+ /**
+ * @member {string} [baseUri]
+ */
+ baseUri?: string;
+}
+
+
+/**
+ * @interface
+ * An interface representing the DatabaseAccountsListResult.
+ * The List operation response, that contains the database accounts and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface DatabaseAccountsListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the MetricListResult.
+ * The response to a list metrics request.
+ *
+ * @extends Array
+ */
+export interface MetricListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the UsagesResult.
+ * The response to a list usage request.
+ *
+ * @extends Array
+ */
+export interface UsagesResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the MetricDefinitionsListResult.
+ * The response to a list metric definitions request.
+ *
+ * @extends Array
+ */
+export interface MetricDefinitionsListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the SqlDatabaseListResult.
+ * The List operation response, that contains the SQL databases and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface SqlDatabaseListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the SqlContainerListResult.
+ * The List operation response, that contains the SQL containers and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface SqlContainerListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the MongoDatabaseListResult.
+ * The List operation response, that contains the Mongo databases and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface MongoDatabaseListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the MongoCollectionListResult.
+ * The List operation response, that contains the Mongo collections and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface MongoCollectionListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the TableListResult.
+ * The List operation response, that contains the Table and their properties.
+ *
+ * @extends Array
+ */
+export interface TableListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the CassandraKeyspaceListResult.
+ * The List operation response, that contains the Cassandra keyspaces and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface CassandraKeyspaceListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the CassandraTableListResult.
+ * The List operation response, that contains the Cassandra tables and their
+ * properties.
+ *
+ * @extends Array
+ */
+export interface CassandraTableListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the OperationListResult.
+ * Result of the request to list Resource Provider operations. It contains a
+ * list of operations and a URL link to get the next set of results.
+ *
+ * @extends Array
+ */
+export interface OperationListResult extends Array {
+ /**
+ * @member {string} [nextLink] URL to get the next set of operation list
+ * results if there are any.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the PercentileMetricListResult.
+ * The response to a list percentile metrics request.
+ *
+ * @extends Array
+ */
+export interface PercentileMetricListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the PartitionMetricListResult.
+ * The response to a list partition metrics request.
+ *
+ * @extends Array
+ */
+export interface PartitionMetricListResult extends Array {
+}
+
+/**
+ * @interface
+ * An interface representing the PartitionUsagesResult.
+ * The response to a list partition level usage request.
+ *
+ * @extends Array
+ */
+export interface PartitionUsagesResult extends Array {
+}
+
+/**
+ * Defines values for DatabaseAccountKind.
+ * Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'
+ * @readonly
+ * @enum {string}
+ */
+export type DatabaseAccountKind = 'GlobalDocumentDB' | 'MongoDB' | 'Parse';
+
+/**
+ * Defines values for DatabaseAccountOfferType.
+ * Possible values include: 'Standard'
+ * @readonly
+ * @enum {string}
+ */
+export type DatabaseAccountOfferType = 'Standard';
+
+/**
+ * Defines values for DefaultConsistencyLevel.
+ * Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix'
+ * @readonly
+ * @enum {string}
+ */
+export type DefaultConsistencyLevel = 'Eventual' | 'Session' | 'BoundedStaleness' | 'Strong' | 'ConsistentPrefix';
+
+/**
+ * Defines values for IndexingMode.
+ * Possible values include: 'Consistent', 'Lazy', 'None'
+ * @readonly
+ * @enum {string}
+ */
+export type IndexingMode = 'Consistent' | 'Lazy' | 'None';
+
+/**
+ * Defines values for DataType.
+ * Possible values include: 'String', 'Number', 'Point', 'Polygon', 'LineString', 'MultiPolygon'
+ * @readonly
+ * @enum {string}
+ */
+export type DataType = 'String' | 'Number' | 'Point' | 'Polygon' | 'LineString' | 'MultiPolygon';
+
+/**
+ * Defines values for IndexKind.
+ * Possible values include: 'Hash', 'Range', 'Spatial'
+ * @readonly
+ * @enum {string}
+ */
+export type IndexKind = 'Hash' | 'Range' | 'Spatial';
+
+/**
+ * Defines values for PartitionKind.
+ * Possible values include: 'Hash', 'Range'
+ * @readonly
+ * @enum {string}
+ */
+export type PartitionKind = 'Hash' | 'Range';
+
+/**
+ * Defines values for ConflictResolutionMode.
+ * Possible values include: 'LastWriterWins', 'Custom'
+ * @readonly
+ * @enum {string}
+ */
+export type ConflictResolutionMode = 'LastWriterWins' | 'Custom';
+
+/**
+ * Defines values for KeyKind.
+ * Possible values include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly'
+ * @readonly
+ * @enum {string}
+ */
+export type KeyKind = 'primary' | 'secondary' | 'primaryReadonly' | 'secondaryReadonly';
+
+/**
+ * Defines values for UnitType.
+ * Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
+ * 'BytesPerSecond', 'Milliseconds'
+ * @readonly
+ * @enum {string}
+ */
+export type UnitType = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'CountPerSecond' | 'BytesPerSecond' | 'Milliseconds';
+
+/**
+ * Defines values for PrimaryAggregationType.
+ * Possible values include: 'None', 'Average', 'Total', 'Minimimum', 'Maximum', 'Last'
+ * @readonly
+ * @enum {string}
+ */
+export type PrimaryAggregationType = 'None' | 'Average' | 'Total' | 'Minimimum' | 'Maximum' | 'Last';
+
+/**
+ * Contains response data for the get operation.
+ */
+export type DatabaseAccountsGetResponse = DatabaseAccount & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccount;
+ };
+};
+
+/**
+ * Contains response data for the patch operation.
+ */
+export type DatabaseAccountsPatchResponse = DatabaseAccount & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccount;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type DatabaseAccountsCreateOrUpdateResponse = DatabaseAccount & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccount;
+ };
+};
+
+/**
+ * Contains response data for the list operation.
+ */
+export type DatabaseAccountsListResponse = DatabaseAccountsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccountsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listByResourceGroup operation.
+ */
+export type DatabaseAccountsListByResourceGroupResponse = DatabaseAccountsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccountsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listKeys operation.
+ */
+export type DatabaseAccountsListKeysResponse = DatabaseAccountListKeysResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccountListKeysResult;
+ };
+};
+
+/**
+ * Contains response data for the listConnectionStrings operation.
+ */
+export type DatabaseAccountsListConnectionStringsResponse = DatabaseAccountListConnectionStringsResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccountListConnectionStringsResult;
+ };
+};
+
+/**
+ * Contains response data for the getReadOnlyKeys operation.
+ */
+export type DatabaseAccountsGetReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccountListReadOnlyKeysResult;
+ };
+};
+
+/**
+ * Contains response data for the listReadOnlyKeys operation.
+ */
+export type DatabaseAccountsListReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccountListReadOnlyKeysResult;
+ };
+};
+
+/**
+ * Contains response data for the checkNameExists operation.
+ */
+export type DatabaseAccountsCheckNameExistsResponse = {
+ /**
+ * The parsed response body.
+ */
+ body: boolean;
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: boolean;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type DatabaseAccountsListMetricsResponse = MetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listUsages operation.
+ */
+export type DatabaseAccountsListUsagesResponse = UsagesResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: UsagesResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetricDefinitions operation.
+ */
+export type DatabaseAccountsListMetricDefinitionsResponse = MetricDefinitionsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricDefinitionsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listSqlDatabases operation.
+ */
+export type DatabaseAccountsListSqlDatabasesResponse = SqlDatabaseListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlDatabaseListResult;
+ };
+};
+
+/**
+ * Contains response data for the createSqlDatabase operation.
+ */
+export type DatabaseAccountsCreateSqlDatabaseResponse = SqlDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlDatabase;
+ };
+};
+
+/**
+ * Contains response data for the getSqlDatabase operation.
+ */
+export type DatabaseAccountsGetSqlDatabaseResponse = SqlDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlDatabase;
+ };
+};
+
+/**
+ * Contains response data for the updateSqlDatabase operation.
+ */
+export type DatabaseAccountsUpdateSqlDatabaseResponse = SqlDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlDatabase;
+ };
+};
+
+/**
+ * Contains response data for the listSqlContainers operation.
+ */
+export type DatabaseAccountsListSqlContainersResponse = SqlContainerListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlContainerListResult;
+ };
+};
+
+/**
+ * Contains response data for the createSqlContainer operation.
+ */
+export type DatabaseAccountsCreateSqlContainerResponse = SqlContainer & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlContainer;
+ };
+};
+
+/**
+ * Contains response data for the getSqlContainer operation.
+ */
+export type DatabaseAccountsGetSqlContainerResponse = SqlContainer & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlContainer;
+ };
+};
+
+/**
+ * Contains response data for the updateSqlContainer operation.
+ */
+export type DatabaseAccountsUpdateSqlContainerResponse = SqlContainer & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlContainer;
+ };
+};
+
+/**
+ * Contains response data for the listMongoDatabases operation.
+ */
+export type DatabaseAccountsListMongoDatabasesResponse = MongoDatabaseListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoDatabaseListResult;
+ };
+};
+
+/**
+ * Contains response data for the createMongoDatabase operation.
+ */
+export type DatabaseAccountsCreateMongoDatabaseResponse = MongoDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoDatabase;
+ };
+};
+
+/**
+ * Contains response data for the getMongoDatabase operation.
+ */
+export type DatabaseAccountsGetMongoDatabaseResponse = MongoDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoDatabase;
+ };
+};
+
+/**
+ * Contains response data for the updateMongoDatabase operation.
+ */
+export type DatabaseAccountsUpdateMongoDatabaseResponse = MongoDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoDatabase;
+ };
+};
+
+/**
+ * Contains response data for the listMongoCollections operation.
+ */
+export type DatabaseAccountsListMongoCollectionsResponse = MongoCollectionListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoCollectionListResult;
+ };
+};
+
+/**
+ * Contains response data for the createMongoCollection operation.
+ */
+export type DatabaseAccountsCreateMongoCollectionResponse = MongoCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoCollection;
+ };
+};
+
+/**
+ * Contains response data for the getMongoCollection operation.
+ */
+export type DatabaseAccountsGetMongoCollectionResponse = MongoCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoCollection;
+ };
+};
+
+/**
+ * Contains response data for the updateMongoCollection operation.
+ */
+export type DatabaseAccountsUpdateMongoCollectionResponse = MongoCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoCollection;
+ };
+};
+
+/**
+ * Contains response data for the listTables operation.
+ */
+export type DatabaseAccountsListTablesResponse = TableListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: TableListResult;
+ };
+};
+
+/**
+ * Contains response data for the createTable operation.
+ */
+export type DatabaseAccountsCreateTableResponse = Table & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: Table;
+ };
+};
+
+/**
+ * Contains response data for the getTable operation.
+ */
+export type DatabaseAccountsGetTableResponse = Table & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: Table;
+ };
+};
+
+/**
+ * Contains response data for the updateTable operation.
+ */
+export type DatabaseAccountsUpdateTableResponse = Table & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: Table;
+ };
+};
+
+/**
+ * Contains response data for the listCassandraKeyspaces operation.
+ */
+export type DatabaseAccountsListCassandraKeyspacesResponse = CassandraKeyspaceListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraKeyspaceListResult;
+ };
+};
+
+/**
+ * Contains response data for the createCassandraKeyspace operation.
+ */
+export type DatabaseAccountsCreateCassandraKeyspaceResponse = CassandraKeyspace & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraKeyspace;
+ };
+};
+
+/**
+ * Contains response data for the getCassandraKeyspace operation.
+ */
+export type DatabaseAccountsGetCassandraKeyspaceResponse = CassandraKeyspace & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraKeyspace;
+ };
+};
+
+/**
+ * Contains response data for the updateCassandraKeyspace operation.
+ */
+export type DatabaseAccountsUpdateCassandraKeyspaceResponse = CassandraKeyspace & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraKeyspace;
+ };
+};
+
+/**
+ * Contains response data for the listCassandraTables operation.
+ */
+export type DatabaseAccountsListCassandraTablesResponse = CassandraTableListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraTableListResult;
+ };
+};
+
+/**
+ * Contains response data for the createCassandraTable operation.
+ */
+export type DatabaseAccountsCreateCassandraTableResponse = CassandraTable & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraTable;
+ };
+};
+
+/**
+ * Contains response data for the getCassandraTable operation.
+ */
+export type DatabaseAccountsGetCassandraTableResponse = CassandraTable & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraTable;
+ };
+};
+
+/**
+ * Contains response data for the updateCassandraTable operation.
+ */
+export type DatabaseAccountsUpdateCassandraTableResponse = CassandraTable & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraTable;
+ };
+};
+
+/**
+ * Contains response data for the beginPatch operation.
+ */
+export type DatabaseAccountsBeginPatchResponse = DatabaseAccount & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccount;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateOrUpdate operation.
+ */
+export type DatabaseAccountsBeginCreateOrUpdateResponse = DatabaseAccount & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DatabaseAccount;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateSqlDatabase operation.
+ */
+export type DatabaseAccountsBeginCreateSqlDatabaseResponse = SqlDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlDatabase;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateSqlDatabase operation.
+ */
+export type DatabaseAccountsBeginUpdateSqlDatabaseResponse = SqlDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlDatabase;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateSqlContainer operation.
+ */
+export type DatabaseAccountsBeginCreateSqlContainerResponse = SqlContainer & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlContainer;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateSqlContainer operation.
+ */
+export type DatabaseAccountsBeginUpdateSqlContainerResponse = SqlContainer & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: SqlContainer;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateMongoDatabase operation.
+ */
+export type DatabaseAccountsBeginCreateMongoDatabaseResponse = MongoDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoDatabase;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateMongoDatabase operation.
+ */
+export type DatabaseAccountsBeginUpdateMongoDatabaseResponse = MongoDatabase & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoDatabase;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateMongoCollection operation.
+ */
+export type DatabaseAccountsBeginCreateMongoCollectionResponse = MongoCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoCollection;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateMongoCollection operation.
+ */
+export type DatabaseAccountsBeginUpdateMongoCollectionResponse = MongoCollection & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MongoCollection;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateTable operation.
+ */
+export type DatabaseAccountsBeginCreateTableResponse = Table & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: Table;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateTable operation.
+ */
+export type DatabaseAccountsBeginUpdateTableResponse = Table & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: Table;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateCassandraKeyspace operation.
+ */
+export type DatabaseAccountsBeginCreateCassandraKeyspaceResponse = CassandraKeyspace & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraKeyspace;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateCassandraKeyspace operation.
+ */
+export type DatabaseAccountsBeginUpdateCassandraKeyspaceResponse = CassandraKeyspace & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraKeyspace;
+ };
+};
+
+/**
+ * Contains response data for the beginCreateCassandraTable operation.
+ */
+export type DatabaseAccountsBeginCreateCassandraTableResponse = CassandraTable & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraTable;
+ };
+};
+
+/**
+ * Contains response data for the beginUpdateCassandraTable operation.
+ */
+export type DatabaseAccountsBeginUpdateCassandraTableResponse = CassandraTable & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CassandraTable;
+ };
+};
+
+/**
+ * Contains response data for the list operation.
+ */
+export type OperationsListResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type OperationsListNextResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type DatabaseListMetricsResponse = MetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listUsages operation.
+ */
+export type DatabaseListUsagesResponse = UsagesResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: UsagesResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetricDefinitions operation.
+ */
+export type DatabaseListMetricDefinitionsResponse = MetricDefinitionsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricDefinitionsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type CollectionListMetricsResponse = MetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listUsages operation.
+ */
+export type CollectionListUsagesResponse = UsagesResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: UsagesResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetricDefinitions operation.
+ */
+export type CollectionListMetricDefinitionsResponse = MetricDefinitionsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricDefinitionsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type CollectionRegionListMetricsResponse = MetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type DatabaseAccountRegionListMetricsResponse = MetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: MetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type PercentileSourceTargetListMetricsResponse = PercentileMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PercentileMetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type PercentileTargetListMetricsResponse = PercentileMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PercentileMetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type PercentileListMetricsResponse = PercentileMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PercentileMetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type CollectionPartitionRegionListMetricsResponse = PartitionMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PartitionMetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type CollectionPartitionListMetricsResponse = PartitionMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PartitionMetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listUsages operation.
+ */
+export type CollectionPartitionListUsagesResponse = PartitionUsagesResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PartitionUsagesResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type PartitionKeyRangeIdListMetricsResponse = PartitionMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PartitionMetricListResult;
+ };
+};
+
+/**
+ * Contains response data for the listMetrics operation.
+ */
+export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PartitionMetricListResult;
+ };
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/models/mappers.ts b/packages/@azure/arm-cosmosdb/lib/models/mappers.ts
new file mode 100644
index 000000000000..e15ca5bc6ddc
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/mappers.ts
@@ -0,0 +1,2598 @@
+/*
+ * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
+import * as msRest from "@azure/ms-rest-js";
+
+export const CloudError = CloudErrorMapper;
+export const BaseResource = BaseResourceMapper;
+
+export const ConsistencyPolicy: msRest.CompositeMapper = {
+ serializedName: "ConsistencyPolicy",
+ type: {
+ name: "Composite",
+ className: "ConsistencyPolicy",
+ modelProperties: {
+ defaultConsistencyLevel: {
+ required: true,
+ serializedName: "defaultConsistencyLevel",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Eventual",
+ "Session",
+ "BoundedStaleness",
+ "Strong",
+ "ConsistentPrefix"
+ ]
+ }
+ },
+ maxStalenessPrefix: {
+ serializedName: "maxStalenessPrefix",
+ constraints: {
+ InclusiveMaximum: 2147483647,
+ InclusiveMinimum: 1
+ },
+ type: {
+ name: "Number"
+ }
+ },
+ maxIntervalInSeconds: {
+ serializedName: "maxIntervalInSeconds",
+ constraints: {
+ InclusiveMaximum: 86400,
+ InclusiveMinimum: 5
+ },
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const Capability: msRest.CompositeMapper = {
+ serializedName: "Capability",
+ type: {
+ name: "Composite",
+ className: "Capability",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Location: msRest.CompositeMapper = {
+ serializedName: "Location",
+ type: {
+ name: "Composite",
+ className: "Location",
+ modelProperties: {
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ locationName: {
+ serializedName: "locationName",
+ type: {
+ name: "String"
+ }
+ },
+ documentEndpoint: {
+ readOnly: true,
+ serializedName: "documentEndpoint",
+ type: {
+ name: "String"
+ }
+ },
+ provisioningState: {
+ serializedName: "provisioningState",
+ type: {
+ name: "String"
+ }
+ },
+ failoverPriority: {
+ serializedName: "failoverPriority",
+ constraints: {
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const FailoverPolicy: msRest.CompositeMapper = {
+ serializedName: "FailoverPolicy",
+ type: {
+ name: "Composite",
+ className: "FailoverPolicy",
+ modelProperties: {
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ locationName: {
+ serializedName: "locationName",
+ type: {
+ name: "String"
+ }
+ },
+ failoverPriority: {
+ serializedName: "failoverPriority",
+ constraints: {
+ InclusiveMinimum: 0
+ },
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const VirtualNetworkRule: msRest.CompositeMapper = {
+ serializedName: "VirtualNetworkRule",
+ type: {
+ name: "Composite",
+ className: "VirtualNetworkRule",
+ modelProperties: {
+ id: {
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ ignoreMissingVNetServiceEndpoint: {
+ serializedName: "ignoreMissingVNetServiceEndpoint",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const Resource: msRest.CompositeMapper = {
+ serializedName: "Resource",
+ type: {
+ name: "Composite",
+ className: "Resource",
+ modelProperties: {
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ readOnly: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ },
+ location: {
+ required: true,
+ serializedName: "location",
+ type: {
+ name: "String"
+ }
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccount: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccount",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccount",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ kind: {
+ serializedName: "kind",
+ defaultValue: 'GlobalDocumentDB',
+ type: {
+ name: "String"
+ }
+ },
+ provisioningState: {
+ serializedName: "properties.provisioningState",
+ type: {
+ name: "String"
+ }
+ },
+ documentEndpoint: {
+ readOnly: true,
+ serializedName: "properties.documentEndpoint",
+ type: {
+ name: "String"
+ }
+ },
+ databaseAccountOfferType: {
+ readOnly: true,
+ serializedName: "properties.databaseAccountOfferType",
+ type: {
+ name: "Enum",
+ allowedValues: [
+ "Standard"
+ ]
+ }
+ },
+ ipRangeFilter: {
+ serializedName: "properties.ipRangeFilter",
+ type: {
+ name: "String"
+ }
+ },
+ isVirtualNetworkFilterEnabled: {
+ serializedName: "properties.isVirtualNetworkFilterEnabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ enableAutomaticFailover: {
+ serializedName: "properties.enableAutomaticFailover",
+ type: {
+ name: "Boolean"
+ }
+ },
+ consistencyPolicy: {
+ serializedName: "properties.consistencyPolicy",
+ type: {
+ name: "Composite",
+ className: "ConsistencyPolicy"
+ }
+ },
+ capabilities: {
+ serializedName: "properties.capabilities",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Capability"
+ }
+ }
+ }
+ },
+ writeLocations: {
+ readOnly: true,
+ serializedName: "properties.writeLocations",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Location"
+ }
+ }
+ }
+ },
+ readLocations: {
+ readOnly: true,
+ serializedName: "properties.readLocations",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Location"
+ }
+ }
+ }
+ },
+ failoverPolicies: {
+ readOnly: true,
+ serializedName: "properties.failoverPolicies",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "FailoverPolicy"
+ }
+ }
+ }
+ },
+ virtualNetworkRules: {
+ serializedName: "properties.virtualNetworkRules",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "VirtualNetworkRule"
+ }
+ }
+ }
+ },
+ enableMultipleWriteLocations: {
+ serializedName: "properties.enableMultipleWriteLocations",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const SqlDatabase: msRest.CompositeMapper = {
+ serializedName: "SqlDatabase",
+ type: {
+ name: "Composite",
+ className: "SqlDatabase",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ sqlDatabaseId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ },
+ _rid: {
+ serializedName: "properties._rid",
+ type: {
+ name: "String"
+ }
+ },
+ _ts: {
+ serializedName: "properties._ts",
+ type: {
+ name: "Object"
+ }
+ },
+ _self: {
+ serializedName: "properties._self",
+ type: {
+ name: "String"
+ }
+ },
+ _etag: {
+ serializedName: "properties._etag",
+ type: {
+ name: "String"
+ }
+ },
+ _colls: {
+ serializedName: "properties._colls",
+ type: {
+ name: "String"
+ }
+ },
+ _users: {
+ serializedName: "properties._users",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Indexes: msRest.CompositeMapper = {
+ serializedName: "Indexes",
+ type: {
+ name: "Composite",
+ className: "Indexes",
+ modelProperties: {
+ dataType: {
+ serializedName: "dataType",
+ defaultValue: 'String',
+ type: {
+ name: "String"
+ }
+ },
+ precision: {
+ serializedName: "precision",
+ type: {
+ name: "Number"
+ }
+ },
+ kind: {
+ serializedName: "kind",
+ defaultValue: 'Hash',
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const IncludedPaths: msRest.CompositeMapper = {
+ serializedName: "IncludedPaths",
+ type: {
+ name: "Composite",
+ className: "IncludedPaths",
+ modelProperties: {
+ path: {
+ serializedName: "path",
+ type: {
+ name: "String"
+ }
+ },
+ indexes: {
+ serializedName: "indexes",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Indexes"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const IndexingPolicy: msRest.CompositeMapper = {
+ serializedName: "IndexingPolicy",
+ type: {
+ name: "Composite",
+ className: "IndexingPolicy",
+ modelProperties: {
+ automatic: {
+ serializedName: "automatic",
+ type: {
+ name: "Boolean"
+ }
+ },
+ indexingMode: {
+ serializedName: "indexingMode",
+ defaultValue: 'Consistent',
+ type: {
+ name: "String"
+ }
+ },
+ includedPaths: {
+ serializedName: "includedPaths",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "IncludedPaths"
+ }
+ }
+ }
+ },
+ excludedPaths: {
+ serializedName: "excludedPaths",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const SqlPartitionKey: msRest.CompositeMapper = {
+ serializedName: "SqlPartitionKey",
+ type: {
+ name: "Composite",
+ className: "SqlPartitionKey",
+ modelProperties: {
+ paths: {
+ serializedName: "paths",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ kind: {
+ serializedName: "kind",
+ defaultValue: 'Hash',
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const UniqueKey: msRest.CompositeMapper = {
+ serializedName: "UniqueKey",
+ type: {
+ name: "Composite",
+ className: "UniqueKey",
+ modelProperties: {
+ paths: {
+ serializedName: "paths",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const UniqueKeyPolicy: msRest.CompositeMapper = {
+ serializedName: "UniqueKeyPolicy",
+ type: {
+ name: "Composite",
+ className: "UniqueKeyPolicy",
+ modelProperties: {
+ uniqueKeys: {
+ serializedName: "uniqueKeys",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "UniqueKey"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ConflictResolutionPolicy: msRest.CompositeMapper = {
+ serializedName: "ConflictResolutionPolicy",
+ type: {
+ name: "Composite",
+ className: "ConflictResolutionPolicy",
+ modelProperties: {
+ mode: {
+ serializedName: "mode",
+ defaultValue: 'LastWriterWins',
+ type: {
+ name: "String"
+ }
+ },
+ conflictResolutionPath: {
+ serializedName: "conflictResolutionPath",
+ type: {
+ name: "String"
+ }
+ },
+ conflictResolutionProcedure: {
+ serializedName: "conflictResolutionProcedure",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const SqlContainer: msRest.CompositeMapper = {
+ serializedName: "SqlContainer",
+ type: {
+ name: "Composite",
+ className: "SqlContainer",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ sqlContainerId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ },
+ indexingPolicy: {
+ serializedName: "properties.indexingPolicy",
+ type: {
+ name: "Composite",
+ className: "IndexingPolicy"
+ }
+ },
+ partitionKey: {
+ serializedName: "properties.partitionKey",
+ type: {
+ name: "Composite",
+ className: "SqlPartitionKey"
+ }
+ },
+ defaultTtl: {
+ serializedName: "properties.defaultTtl",
+ type: {
+ name: "Number"
+ }
+ },
+ uniqueKeyPolicy: {
+ serializedName: "properties.uniqueKeyPolicy",
+ type: {
+ name: "Composite",
+ className: "UniqueKeyPolicy"
+ }
+ },
+ conflictResolutionPolicy: {
+ serializedName: "properties.conflictResolutionPolicy",
+ type: {
+ name: "Composite",
+ className: "ConflictResolutionPolicy"
+ }
+ },
+ _rid: {
+ serializedName: "properties._rid",
+ type: {
+ name: "String"
+ }
+ },
+ _ts: {
+ serializedName: "properties._ts",
+ type: {
+ name: "Object"
+ }
+ },
+ _self: {
+ serializedName: "properties._self",
+ type: {
+ name: "String"
+ }
+ },
+ _etag: {
+ serializedName: "properties._etag",
+ type: {
+ name: "String"
+ }
+ },
+ _doc: {
+ serializedName: "properties._doc",
+ type: {
+ name: "String"
+ }
+ },
+ _sprocs: {
+ serializedName: "properties._sprocs",
+ type: {
+ name: "String"
+ }
+ },
+ _triggers: {
+ serializedName: "properties._triggers",
+ type: {
+ name: "String"
+ }
+ },
+ _udfs: {
+ serializedName: "properties._udfs",
+ type: {
+ name: "String"
+ }
+ },
+ _conflicts: {
+ serializedName: "properties._conflicts",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MongoDatabase: msRest.CompositeMapper = {
+ serializedName: "MongoDatabase",
+ type: {
+ name: "Composite",
+ className: "MongoDatabase",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ mongoDatabaseId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MongoCollection: msRest.CompositeMapper = {
+ serializedName: "MongoCollection",
+ type: {
+ name: "Composite",
+ className: "MongoCollection",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ mongoCollectionId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ },
+ shardKey: {
+ serializedName: "properties.shardKey",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ indexes: {
+ serializedName: "properties.indexes",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MongoIndex"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Table: msRest.CompositeMapper = {
+ serializedName: "Table",
+ type: {
+ name: "Composite",
+ className: "Table",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ tableId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CassandraKeyspace: msRest.CompositeMapper = {
+ serializedName: "CassandraKeyspace",
+ type: {
+ name: "Composite",
+ className: "CassandraKeyspace",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ cassandraKeyspaceId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CassandraTable: msRest.CompositeMapper = {
+ serializedName: "CassandraTable",
+ type: {
+ name: "Composite",
+ className: "CassandraTable",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ cassandraTableId: {
+ required: true,
+ serializedName: "properties.id",
+ type: {
+ name: "String"
+ }
+ },
+ defaultTtl: {
+ serializedName: "properties.defaultTtl",
+ type: {
+ name: "Number"
+ }
+ },
+ schema: {
+ serializedName: "properties.schema",
+ type: {
+ name: "Composite",
+ className: "CassandraSchema"
+ }
+ }
+ }
+ }
+};
+
+export const ErrorResponse: msRest.CompositeMapper = {
+ serializedName: "ErrorResponse",
+ type: {
+ name: "Composite",
+ className: "ErrorResponse",
+ modelProperties: {
+ code: {
+ serializedName: "code",
+ type: {
+ name: "String"
+ }
+ },
+ message: {
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const FailoverPolicies: msRest.CompositeMapper = {
+ serializedName: "FailoverPolicies",
+ type: {
+ name: "Composite",
+ className: "FailoverPolicies",
+ modelProperties: {
+ failoverPolicies: {
+ required: true,
+ serializedName: "failoverPolicies",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "FailoverPolicy"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const RegionForOnlineOffline: msRest.CompositeMapper = {
+ serializedName: "RegionForOnlineOffline",
+ type: {
+ name: "Composite",
+ className: "RegionForOnlineOffline",
+ modelProperties: {
+ region: {
+ required: true,
+ serializedName: "region",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ExtendedResourceProperties: msRest.CompositeMapper = {
+ serializedName: "ExtendedResourceProperties",
+ type: {
+ name: "Composite",
+ className: "ExtendedResourceProperties",
+ modelProperties: {
+ _rid: {
+ serializedName: "_rid",
+ type: {
+ name: "String"
+ }
+ },
+ _ts: {
+ serializedName: "_ts",
+ type: {
+ name: "Object"
+ }
+ },
+ _self: {
+ serializedName: "_self",
+ type: {
+ name: "String"
+ }
+ },
+ _etag: {
+ serializedName: "_etag",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountCreateUpdateParameters",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ kind: {
+ serializedName: "kind",
+ defaultValue: 'GlobalDocumentDB',
+ type: {
+ name: "String"
+ }
+ },
+ consistencyPolicy: {
+ serializedName: "properties.consistencyPolicy",
+ type: {
+ name: "Composite",
+ className: "ConsistencyPolicy"
+ }
+ },
+ locations: {
+ required: true,
+ serializedName: "properties.locations",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Location"
+ }
+ }
+ }
+ },
+ databaseAccountOfferType: {
+ required: true,
+ isConstant: true,
+ serializedName: "properties.databaseAccountOfferType",
+ defaultValue: 'Standard',
+ type: {
+ name: "String"
+ }
+ },
+ ipRangeFilter: {
+ serializedName: "properties.ipRangeFilter",
+ type: {
+ name: "String"
+ }
+ },
+ isVirtualNetworkFilterEnabled: {
+ serializedName: "properties.isVirtualNetworkFilterEnabled",
+ type: {
+ name: "Boolean"
+ }
+ },
+ enableAutomaticFailover: {
+ serializedName: "properties.enableAutomaticFailover",
+ type: {
+ name: "Boolean"
+ }
+ },
+ capabilities: {
+ serializedName: "properties.capabilities",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Capability"
+ }
+ }
+ }
+ },
+ virtualNetworkRules: {
+ serializedName: "properties.virtualNetworkRules",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "VirtualNetworkRule"
+ }
+ }
+ }
+ },
+ enableMultipleWriteLocations: {
+ serializedName: "properties.enableMultipleWriteLocations",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountPatchParameters: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountPatchParameters",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountPatchParameters",
+ modelProperties: {
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ capabilities: {
+ serializedName: "properties.capabilities",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Capability"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountListReadOnlyKeysResult: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountListReadOnlyKeysResult",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountListReadOnlyKeysResult",
+ modelProperties: {
+ primaryReadonlyMasterKey: {
+ readOnly: true,
+ serializedName: "primaryReadonlyMasterKey",
+ type: {
+ name: "String"
+ }
+ },
+ secondaryReadonlyMasterKey: {
+ readOnly: true,
+ serializedName: "secondaryReadonlyMasterKey",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountListKeysResult: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountListKeysResult",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountListKeysResult",
+ modelProperties: {
+ primaryMasterKey: {
+ readOnly: true,
+ serializedName: "primaryMasterKey",
+ type: {
+ name: "String"
+ }
+ },
+ secondaryMasterKey: {
+ readOnly: true,
+ serializedName: "secondaryMasterKey",
+ type: {
+ name: "String"
+ }
+ },
+ primaryReadonlyMasterKey: {
+ readOnly: true,
+ serializedName: "properties.primaryReadonlyMasterKey",
+ type: {
+ name: "String"
+ }
+ },
+ secondaryReadonlyMasterKey: {
+ readOnly: true,
+ serializedName: "properties.secondaryReadonlyMasterKey",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountConnectionString: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountConnectionString",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountConnectionString",
+ modelProperties: {
+ connectionString: {
+ readOnly: true,
+ serializedName: "connectionString",
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ readOnly: true,
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountListConnectionStringsResult: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountListConnectionStringsResult",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountListConnectionStringsResult",
+ modelProperties: {
+ connectionStrings: {
+ serializedName: "connectionStrings",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountConnectionString"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountRegenerateKeyParameters: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountRegenerateKeyParameters",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountRegenerateKeyParameters",
+ modelProperties: {
+ keyKind: {
+ required: true,
+ serializedName: "keyKind",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const SqlDatabaseResource: msRest.CompositeMapper = {
+ serializedName: "SqlDatabaseResource",
+ type: {
+ name: "Composite",
+ className: "SqlDatabaseResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const SqlDatabaseCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "SqlDatabaseCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "SqlDatabaseCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "SqlDatabaseResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const SqlContainerResource: msRest.CompositeMapper = {
+ serializedName: "SqlContainerResource",
+ type: {
+ name: "Composite",
+ className: "SqlContainerResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ indexingPolicy: {
+ serializedName: "indexingPolicy",
+ type: {
+ name: "Composite",
+ className: "IndexingPolicy"
+ }
+ },
+ partitionKey: {
+ serializedName: "partitionKey",
+ type: {
+ name: "Composite",
+ className: "SqlPartitionKey"
+ }
+ },
+ defaultTtl: {
+ serializedName: "defaultTtl",
+ type: {
+ name: "Number"
+ }
+ },
+ uniqueKeyPolicy: {
+ serializedName: "uniqueKeyPolicy",
+ type: {
+ name: "Composite",
+ className: "UniqueKeyPolicy"
+ }
+ },
+ conflictResolutionPolicy: {
+ serializedName: "conflictResolutionPolicy",
+ type: {
+ name: "Composite",
+ className: "ConflictResolutionPolicy"
+ }
+ }
+ }
+ }
+};
+
+export const SqlContainerCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "SqlContainerCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "SqlContainerCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "SqlContainerResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MongoDatabaseResource: msRest.CompositeMapper = {
+ serializedName: "MongoDatabaseResource",
+ type: {
+ name: "Composite",
+ className: "MongoDatabaseResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MongoDatabaseCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "MongoDatabaseCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "MongoDatabaseCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "MongoDatabaseResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MongoIndexKeys: msRest.CompositeMapper = {
+ serializedName: "MongoIndexKeys",
+ type: {
+ name: "Composite",
+ className: "MongoIndexKeys",
+ modelProperties: {
+ keys: {
+ serializedName: "keys",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MongoIndexOptions: msRest.CompositeMapper = {
+ serializedName: "MongoIndexOptions",
+ type: {
+ name: "Composite",
+ className: "MongoIndexOptions",
+ modelProperties: {
+ expireAfterSeconds: {
+ serializedName: "expireAfterSeconds",
+ type: {
+ name: "Number"
+ }
+ },
+ unique: {
+ serializedName: "unique",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const MongoIndex: msRest.CompositeMapper = {
+ serializedName: "MongoIndex",
+ type: {
+ name: "Composite",
+ className: "MongoIndex",
+ modelProperties: {
+ key: {
+ serializedName: "key",
+ type: {
+ name: "Composite",
+ className: "MongoIndexKeys"
+ }
+ },
+ options: {
+ serializedName: "options",
+ type: {
+ name: "Composite",
+ className: "MongoIndexOptions"
+ }
+ }
+ }
+ }
+};
+
+export const MongoCollectionResource: msRest.CompositeMapper = {
+ serializedName: "MongoCollectionResource",
+ type: {
+ name: "Composite",
+ className: "MongoCollectionResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ shardKey: {
+ serializedName: "shardKey",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ indexes: {
+ serializedName: "indexes",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MongoIndex"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MongoCollectionCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "MongoCollectionCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "MongoCollectionCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "MongoCollectionResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const TableResource: msRest.CompositeMapper = {
+ serializedName: "TableResource",
+ type: {
+ name: "Composite",
+ className: "TableResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const TableCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "TableCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "TableCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "TableResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const CassandraKeyspaceResource: msRest.CompositeMapper = {
+ serializedName: "CassandraKeyspaceResource",
+ type: {
+ name: "Composite",
+ className: "CassandraKeyspaceResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CassandraKeyspaceCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "CassandraKeyspaceCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "CassandraKeyspaceCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "CassandraKeyspaceResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Column: msRest.CompositeMapper = {
+ serializedName: "Column",
+ type: {
+ name: "Composite",
+ className: "Column",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CassandraPartitionKey: msRest.CompositeMapper = {
+ serializedName: "CassandraPartitionKey",
+ type: {
+ name: "Composite",
+ className: "CassandraPartitionKey",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ClusterKey: msRest.CompositeMapper = {
+ serializedName: "ClusterKey",
+ type: {
+ name: "Composite",
+ className: "ClusterKey",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ orderBy: {
+ serializedName: "orderBy",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const CassandraSchema: msRest.CompositeMapper = {
+ serializedName: "CassandraSchema",
+ type: {
+ name: "Composite",
+ className: "CassandraSchema",
+ modelProperties: {
+ columns: {
+ serializedName: "columns",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Column"
+ }
+ }
+ }
+ },
+ partitionKeys: {
+ serializedName: "partitionKeys",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "CassandraPartitionKey"
+ }
+ }
+ }
+ },
+ clusterKeys: {
+ serializedName: "clusterKeys",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ClusterKey"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const CassandraTableResource: msRest.CompositeMapper = {
+ serializedName: "CassandraTableResource",
+ type: {
+ name: "Composite",
+ className: "CassandraTableResource",
+ modelProperties: {
+ id: {
+ required: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ defaultTtl: {
+ serializedName: "defaultTtl",
+ type: {
+ name: "Number"
+ }
+ },
+ schema: {
+ serializedName: "schema",
+ type: {
+ name: "Composite",
+ className: "CassandraSchema"
+ }
+ }
+ }
+ }
+};
+
+export const CassandraTableCreateUpdateParameters: msRest.CompositeMapper = {
+ serializedName: "CassandraTableCreateUpdateParameters",
+ type: {
+ name: "Composite",
+ className: "CassandraTableCreateUpdateParameters",
+ modelProperties: {
+ resource: {
+ required: true,
+ serializedName: "properties.resource",
+ type: {
+ name: "Composite",
+ className: "CassandraTableResource"
+ }
+ },
+ options: {
+ required: true,
+ serializedName: "properties.options",
+ type: {
+ name: "Dictionary",
+ value: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: msRest.CompositeMapper = {
+ serializedName: "Operation_display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay",
+ modelProperties: {
+ provider: {
+ serializedName: "Provider",
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "Resource",
+ type: {
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "Operation",
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ serializedName: "Description",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Operation: msRest.CompositeMapper = {
+ serializedName: "Operation",
+ type: {
+ name: "Composite",
+ className: "Operation",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay"
+ }
+ }
+ }
+ }
+};
+
+export const MetricName: msRest.CompositeMapper = {
+ serializedName: "MetricName",
+ type: {
+ name: "Composite",
+ className: "MetricName",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "String"
+ }
+ },
+ localizedValue: {
+ readOnly: true,
+ serializedName: "localizedValue",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Usage: msRest.CompositeMapper = {
+ serializedName: "Usage",
+ type: {
+ name: "Composite",
+ className: "Usage",
+ modelProperties: {
+ unit: {
+ serializedName: "unit",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "Composite",
+ className: "MetricName"
+ }
+ },
+ quotaPeriod: {
+ readOnly: true,
+ serializedName: "quotaPeriod",
+ type: {
+ name: "String"
+ }
+ },
+ limit: {
+ readOnly: true,
+ serializedName: "limit",
+ type: {
+ name: "Number"
+ }
+ },
+ currentValue: {
+ readOnly: true,
+ serializedName: "currentValue",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const PartitionUsage: msRest.CompositeMapper = {
+ serializedName: "PartitionUsage",
+ type: {
+ name: "Composite",
+ className: "PartitionUsage",
+ modelProperties: {
+ ...Usage.type.modelProperties,
+ partitionId: {
+ readOnly: true,
+ serializedName: "partitionId",
+ type: {
+ name: "String"
+ }
+ },
+ partitionKeyRangeId: {
+ readOnly: true,
+ serializedName: "partitionKeyRangeId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MetricAvailability: msRest.CompositeMapper = {
+ serializedName: "MetricAvailability",
+ type: {
+ name: "Composite",
+ className: "MetricAvailability",
+ modelProperties: {
+ timeGrain: {
+ readOnly: true,
+ serializedName: "timeGrain",
+ type: {
+ name: "String"
+ }
+ },
+ retention: {
+ readOnly: true,
+ serializedName: "retention",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MetricDefinition: msRest.CompositeMapper = {
+ serializedName: "MetricDefinition",
+ type: {
+ name: "Composite",
+ className: "MetricDefinition",
+ modelProperties: {
+ metricAvailabilities: {
+ readOnly: true,
+ serializedName: "metricAvailabilities",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MetricAvailability"
+ }
+ }
+ }
+ },
+ primaryAggregationType: {
+ readOnly: true,
+ serializedName: "primaryAggregationType",
+ type: {
+ name: "String"
+ }
+ },
+ unit: {
+ serializedName: "unit",
+ type: {
+ name: "String"
+ }
+ },
+ resourceUri: {
+ readOnly: true,
+ serializedName: "resourceUri",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "Composite",
+ className: "MetricName"
+ }
+ }
+ }
+ }
+};
+
+export const MetricValue: msRest.CompositeMapper = {
+ serializedName: "MetricValue",
+ type: {
+ name: "Composite",
+ className: "MetricValue",
+ modelProperties: {
+ _count: {
+ readOnly: true,
+ serializedName: "_count",
+ type: {
+ name: "Number"
+ }
+ },
+ average: {
+ readOnly: true,
+ serializedName: "average",
+ type: {
+ name: "Number"
+ }
+ },
+ maximum: {
+ readOnly: true,
+ serializedName: "maximum",
+ type: {
+ name: "Number"
+ }
+ },
+ minimum: {
+ readOnly: true,
+ serializedName: "minimum",
+ type: {
+ name: "Number"
+ }
+ },
+ timestamp: {
+ readOnly: true,
+ serializedName: "timestamp",
+ type: {
+ name: "DateTime"
+ }
+ },
+ total: {
+ readOnly: true,
+ serializedName: "total",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const Metric: msRest.CompositeMapper = {
+ serializedName: "Metric",
+ type: {
+ name: "Composite",
+ className: "Metric",
+ modelProperties: {
+ startTime: {
+ readOnly: true,
+ serializedName: "startTime",
+ type: {
+ name: "DateTime"
+ }
+ },
+ endTime: {
+ readOnly: true,
+ serializedName: "endTime",
+ type: {
+ name: "DateTime"
+ }
+ },
+ timeGrain: {
+ readOnly: true,
+ serializedName: "timeGrain",
+ type: {
+ name: "String"
+ }
+ },
+ unit: {
+ serializedName: "unit",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "Composite",
+ className: "MetricName"
+ }
+ },
+ metricValues: {
+ readOnly: true,
+ serializedName: "metricValues",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MetricValue"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const PercentileMetricValue: msRest.CompositeMapper = {
+ serializedName: "PercentileMetricValue",
+ type: {
+ name: "Composite",
+ className: "PercentileMetricValue",
+ modelProperties: {
+ ...MetricValue.type.modelProperties,
+ p10: {
+ readOnly: true,
+ serializedName: "P10",
+ type: {
+ name: "Number"
+ }
+ },
+ p25: {
+ readOnly: true,
+ serializedName: "P25",
+ type: {
+ name: "Number"
+ }
+ },
+ p50: {
+ readOnly: true,
+ serializedName: "P50",
+ type: {
+ name: "Number"
+ }
+ },
+ p75: {
+ readOnly: true,
+ serializedName: "P75",
+ type: {
+ name: "Number"
+ }
+ },
+ p90: {
+ readOnly: true,
+ serializedName: "P90",
+ type: {
+ name: "Number"
+ }
+ },
+ p95: {
+ readOnly: true,
+ serializedName: "P95",
+ type: {
+ name: "Number"
+ }
+ },
+ p99: {
+ readOnly: true,
+ serializedName: "P99",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const PercentileMetric: msRest.CompositeMapper = {
+ serializedName: "PercentileMetric",
+ type: {
+ name: "Composite",
+ className: "PercentileMetric",
+ modelProperties: {
+ startTime: {
+ readOnly: true,
+ serializedName: "startTime",
+ type: {
+ name: "DateTime"
+ }
+ },
+ endTime: {
+ readOnly: true,
+ serializedName: "endTime",
+ type: {
+ name: "DateTime"
+ }
+ },
+ timeGrain: {
+ readOnly: true,
+ serializedName: "timeGrain",
+ type: {
+ name: "String"
+ }
+ },
+ unit: {
+ serializedName: "unit",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "Composite",
+ className: "MetricName"
+ }
+ },
+ metricValues: {
+ readOnly: true,
+ serializedName: "metricValues",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PercentileMetricValue"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const PartitionMetric: msRest.CompositeMapper = {
+ serializedName: "PartitionMetric",
+ type: {
+ name: "Composite",
+ className: "PartitionMetric",
+ modelProperties: {
+ ...Metric.type.modelProperties,
+ partitionId: {
+ readOnly: true,
+ serializedName: "partitionId",
+ type: {
+ name: "String"
+ }
+ },
+ partitionKeyRangeId: {
+ readOnly: true,
+ serializedName: "partitionKeyRangeId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const DatabaseAccountsListResult: msRest.CompositeMapper = {
+ serializedName: "DatabaseAccountsListResult",
+ type: {
+ name: "Composite",
+ className: "DatabaseAccountsListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "DatabaseAccount"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MetricListResult: msRest.CompositeMapper = {
+ serializedName: "MetricListResult",
+ type: {
+ name: "Composite",
+ className: "MetricListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Metric"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const UsagesResult: msRest.CompositeMapper = {
+ serializedName: "UsagesResult",
+ type: {
+ name: "Composite",
+ className: "UsagesResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Usage"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MetricDefinitionsListResult: msRest.CompositeMapper = {
+ serializedName: "MetricDefinitionsListResult",
+ type: {
+ name: "Composite",
+ className: "MetricDefinitionsListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MetricDefinition"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const SqlDatabaseListResult: msRest.CompositeMapper = {
+ serializedName: "SqlDatabaseListResult",
+ type: {
+ name: "Composite",
+ className: "SqlDatabaseListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "SqlDatabase"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const SqlContainerListResult: msRest.CompositeMapper = {
+ serializedName: "SqlContainerListResult",
+ type: {
+ name: "Composite",
+ className: "SqlContainerListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "SqlContainer"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MongoDatabaseListResult: msRest.CompositeMapper = {
+ serializedName: "MongoDatabaseListResult",
+ type: {
+ name: "Composite",
+ className: "MongoDatabaseListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MongoDatabase"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const MongoCollectionListResult: msRest.CompositeMapper = {
+ serializedName: "MongoCollectionListResult",
+ type: {
+ name: "Composite",
+ className: "MongoCollectionListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "MongoCollection"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const TableListResult: msRest.CompositeMapper = {
+ serializedName: "TableListResult",
+ type: {
+ name: "Composite",
+ className: "TableListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Table"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const CassandraKeyspaceListResult: msRest.CompositeMapper = {
+ serializedName: "CassandraKeyspaceListResult",
+ type: {
+ name: "Composite",
+ className: "CassandraKeyspaceListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "CassandraKeyspace"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const CassandraTableListResult: msRest.CompositeMapper = {
+ serializedName: "CassandraTableListResult",
+ type: {
+ name: "Composite",
+ className: "CassandraTableListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "CassandraTable"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const OperationListResult: msRest.CompositeMapper = {
+ serializedName: "OperationListResult",
+ type: {
+ name: "Composite",
+ className: "OperationListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const PercentileMetricListResult: msRest.CompositeMapper = {
+ serializedName: "PercentileMetricListResult",
+ type: {
+ name: "Composite",
+ className: "PercentileMetricListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PercentileMetric"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const PartitionMetricListResult: msRest.CompositeMapper = {
+ serializedName: "PartitionMetricListResult",
+ type: {
+ name: "Composite",
+ className: "PartitionMetricListResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PartitionMetric"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const PartitionUsagesResult: msRest.CompositeMapper = {
+ serializedName: "PartitionUsagesResult",
+ type: {
+ name: "Composite",
+ className: "PartitionUsagesResult",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PartitionUsage"
+ }
+ }
+ }
+ }
+ }
+ }
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/models/operationsMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/operationsMappers.ts
new file mode 100644
index 000000000000..2edcc577920e
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/operationsMappers.ts
@@ -0,0 +1,17 @@
+/*
+ * 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.
+ */
+
+export {
+ OperationListResult,
+ Operation,
+ OperationDisplay,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/parameters.ts b/packages/@azure/arm-cosmosdb/lib/models/parameters.ts
new file mode 100644
index 000000000000..5cc9d9ec3ca2
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/parameters.ts
@@ -0,0 +1,194 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: "acceptLanguage",
+ mapper: {
+ serializedName: "accept-language",
+ defaultValue: 'en-US',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const accountName: msRest.OperationURLParameter = {
+ parameterPath: "accountName",
+ mapper: {
+ required: true,
+ serializedName: "accountName",
+ constraints: {
+ MaxLength: 50,
+ MinLength: 3
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const collectionRid: msRest.OperationURLParameter = {
+ parameterPath: "collectionRid",
+ mapper: {
+ required: true,
+ serializedName: "collectionRid",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const containerRid: msRest.OperationURLParameter = {
+ parameterPath: "containerRid",
+ mapper: {
+ required: true,
+ serializedName: "containerRid",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const databaseRid: msRest.OperationURLParameter = {
+ parameterPath: "databaseRid",
+ mapper: {
+ required: true,
+ serializedName: "databaseRid",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const filter0: msRest.OperationQueryParameter = {
+ parameterPath: "filter",
+ mapper: {
+ required: true,
+ serializedName: "$filter",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const filter1: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "filter"
+ ],
+ mapper: {
+ serializedName: "$filter",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const keyspaceRid: msRest.OperationURLParameter = {
+ parameterPath: "keyspaceRid",
+ mapper: {
+ required: true,
+ serializedName: "keyspaceRid",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const nextPageLink: msRest.OperationURLParameter = {
+ parameterPath: "nextPageLink",
+ mapper: {
+ required: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const partitionKeyRangeId: msRest.OperationURLParameter = {
+ parameterPath: "partitionKeyRangeId",
+ mapper: {
+ required: true,
+ serializedName: "partitionKeyRangeId",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const region: msRest.OperationURLParameter = {
+ parameterPath: "region",
+ mapper: {
+ required: true,
+ serializedName: "region",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const resourceGroupName: msRest.OperationURLParameter = {
+ parameterPath: "resourceGroupName",
+ mapper: {
+ required: true,
+ serializedName: "resourceGroupName",
+ constraints: {
+ MaxLength: 90,
+ MinLength: 1,
+ Pattern: /^[-\w\._\(\)]+$/
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const sourceRegion: msRest.OperationURLParameter = {
+ parameterPath: "sourceRegion",
+ mapper: {
+ required: true,
+ serializedName: "sourceRegion",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const subscriptionId: msRest.OperationURLParameter = {
+ parameterPath: "subscriptionId",
+ mapper: {
+ required: true,
+ serializedName: "subscriptionId",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const tableRid: msRest.OperationURLParameter = {
+ parameterPath: "tableRid",
+ mapper: {
+ required: true,
+ serializedName: "tableRid",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const targetRegion: msRest.OperationURLParameter = {
+ parameterPath: "targetRegion",
+ mapper: {
+ required: true,
+ serializedName: "targetRegion",
+ type: {
+ name: "String"
+ }
+ }
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/models/partitionKeyRangeIdMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/partitionKeyRangeIdMappers.ts
new file mode 100644
index 000000000000..a0b31db71d0f
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/partitionKeyRangeIdMappers.ts
@@ -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.
+ */
+
+export {
+ PartitionMetricListResult,
+ PartitionMetric,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ PercentileMetricValue
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/partitionKeyRangeIdRegionMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/partitionKeyRangeIdRegionMappers.ts
new file mode 100644
index 000000000000..a0b31db71d0f
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/partitionKeyRangeIdRegionMappers.ts
@@ -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.
+ */
+
+export {
+ PartitionMetricListResult,
+ PartitionMetric,
+ Metric,
+ MetricName,
+ MetricValue,
+ CloudError,
+ PercentileMetricValue
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/percentileMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/percentileMappers.ts
new file mode 100644
index 000000000000..9399a370caff
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/percentileMappers.ts
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+export {
+ PercentileMetricListResult,
+ PercentileMetric,
+ MetricName,
+ PercentileMetricValue,
+ MetricValue,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/percentileSourceTargetMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/percentileSourceTargetMappers.ts
new file mode 100644
index 000000000000..9399a370caff
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/percentileSourceTargetMappers.ts
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+export {
+ PercentileMetricListResult,
+ PercentileMetric,
+ MetricName,
+ PercentileMetricValue,
+ MetricValue,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/models/percentileTargetMappers.ts b/packages/@azure/arm-cosmosdb/lib/models/percentileTargetMappers.ts
new file mode 100644
index 000000000000..9399a370caff
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/models/percentileTargetMappers.ts
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+export {
+ PercentileMetricListResult,
+ PercentileMetric,
+ MetricName,
+ PercentileMetricValue,
+ MetricValue,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/collection.ts b/packages/@azure/arm-cosmosdb/lib/operations/collection.ts
new file mode 100644
index 000000000000..1171fd01e545
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/collection.ts
@@ -0,0 +1,244 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/collectionMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a Collection. */
+export class Collection {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a Collection.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and
+ * collection.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ collectionRid,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves the usages (most recent storage data) for the given collection.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: Models.CollectionListUsagesOptionalParams): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options: Models.CollectionListUsagesOptionalParams, callback: msRest.ServiceCallback): void;
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: Models.CollectionListUsagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ collectionRid,
+ options
+ },
+ listUsagesOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves metric definitions for the given collection.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param callback The callback
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ collectionRid,
+ options
+ },
+ listMetricDefinitionsOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listMetricsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter0
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listUsagesOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter1
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.UsagesResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listMetricDefinitionsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricDefinitionsListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/collectionPartition.ts b/packages/@azure/arm-cosmosdb/lib/operations/collectionPartition.ts
new file mode 100644
index 000000000000..40f75fb5947e
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/collectionPartition.ts
@@ -0,0 +1,177 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/collectionPartitionMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a CollectionPartition. */
+export class CollectionPartition {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a CollectionPartition.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given collection, split by
+ * partition.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ collectionRid,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves the usages (most recent storage data) for the given collection, split by partition.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: Models.CollectionPartitionListUsagesOptionalParams): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options: Models.CollectionPartitionListUsagesOptionalParams, callback: msRest.ServiceCallback): void;
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: Models.CollectionPartitionListUsagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ collectionRid,
+ options
+ },
+ listUsagesOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listMetricsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter0
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PartitionMetricListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listUsagesOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter1
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PartitionUsagesResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/collectionPartitionRegion.ts b/packages/@azure/arm-cosmosdb/lib/operations/collectionPartitionRegion.ts
new file mode 100644
index 000000000000..fd93d778824f
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/collectionPartitionRegion.ts
@@ -0,0 +1,114 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/collectionPartitionRegionMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a CollectionPartitionRegion. */
+export class CollectionPartitionRegion {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a CollectionPartitionRegion.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given collection and region, split
+ * by partition.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ region,
+ databaseRid,
+ collectionRid,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listMetricsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.region,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter0
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PartitionMetricListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/collectionRegion.ts b/packages/@azure/arm-cosmosdb/lib/operations/collectionRegion.ts
new file mode 100644
index 000000000000..3dcd4150416f
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/collectionRegion.ts
@@ -0,0 +1,114 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/collectionRegionMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a CollectionRegion. */
+export class CollectionRegion {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a CollectionRegion.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account, collection
+ * and region.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param databaseRid Cosmos DB database rid.
+ * @param collectionRid Cosmos DB collection rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, region: string, databaseRid: string, collectionRid: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ region,
+ databaseRid,
+ collectionRid,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listMetricsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.region,
+ Parameters.databaseRid,
+ Parameters.collectionRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter0
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/database.ts b/packages/@azure/arm-cosmosdb/lib/operations/database.ts
new file mode 100644
index 000000000000..067e391c72cd
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/database.ts
@@ -0,0 +1,229 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/databaseMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a Database. */
+export class Database {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a Database.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and
+ * database.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves the usages (most recent data) for the given database.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, options?: Models.DatabaseListUsagesOptionalParams): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, options: Models.DatabaseListUsagesOptionalParams, callback: msRest.ServiceCallback): void;
+ listUsages(resourceGroupName: string, accountName: string, databaseRid: string, options?: Models.DatabaseListUsagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ options
+ },
+ listUsagesOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves metric definitions for the given database.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param callback The callback
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ options
+ },
+ listMetricDefinitionsOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listMetricsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter0
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listUsagesOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter1
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.UsagesResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listMetricDefinitionsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.databaseRid
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricDefinitionsListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/databaseAccountRegion.ts b/packages/@azure/arm-cosmosdb/lib/operations/databaseAccountRegion.ts
new file mode 100644
index 000000000000..91612a2ba085
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/databaseAccountRegion.ts
@@ -0,0 +1,103 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/databaseAccountRegionMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a DatabaseAccountRegion. */
+export class DatabaseAccountRegion {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a DatabaseAccountRegion.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account and region.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param region Cosmos DB region, with spaces between words and each word capitalized.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, region: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, region: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ region,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listMetricsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics",
+ urlParameters: [
+ Parameters.subscriptionId,
+ Parameters.resourceGroupName,
+ Parameters.accountName,
+ Parameters.region
+ ],
+ queryParameters: [
+ Parameters.apiVersion,
+ Parameters.filter0
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.MetricListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-cosmosdb/lib/operations/databaseAccounts.ts b/packages/@azure/arm-cosmosdb/lib/operations/databaseAccounts.ts
new file mode 100644
index 000000000000..09026e18b0bd
--- /dev/null
+++ b/packages/@azure/arm-cosmosdb/lib/operations/databaseAccounts.ts
@@ -0,0 +1,3341 @@
+/*
+ * 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 * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as Models from "../models";
+import * as Mappers from "../models/databaseAccountsMappers";
+import * as Parameters from "../models/parameters";
+import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext";
+
+/** Class representing a DatabaseAccounts. */
+export class DatabaseAccounts {
+ private readonly client: CosmosDBManagementClientContext;
+
+ /**
+ * Create a DatabaseAccounts.
+ * @param {CosmosDBManagementClientContext} client Reference to the service client.
+ */
+ constructor(client: CosmosDBManagementClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Retrieves the properties of an existing Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Patches the properties of an existing Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param updateParameters The tags parameter to patch for the current database account.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ patch(resourceGroupName: string, accountName: string, updateParameters: Models.DatabaseAccountPatchParameters, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginPatch(resourceGroupName,accountName,updateParameters,options)
+ .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ }
+
+ /**
+ * Creates or updates an Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param createUpdateParameters The parameters to provide for the current database account.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdate(resourceGroupName: string, accountName: string, createUpdateParameters: Models.DatabaseAccountCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginCreateOrUpdate(resourceGroupName,accountName,createUpdateParameters,options)
+ .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ }
+
+ /**
+ * Deletes an existing Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginDeleteMethod(resourceGroupName,accountName,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0
+ * indicates a write region. The maximum value for a failover priority = (total number of regions -
+ * 1). Failover priority values must be unique for each of the regions in which the database
+ * account exists.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param failoverParameters The new failover policies for the database account.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ failoverPriorityChange(resourceGroupName: string, accountName: string, failoverParameters: Models.FailoverPolicies, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginFailoverPriorityChange(resourceGroupName,accountName,failoverParameters,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Lists all the Azure Cosmos DB database accounts available under the subscription.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ list(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists all the Azure Cosmos DB database accounts available under the given resource group.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param callback The callback
+ */
+ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ options
+ },
+ listByResourceGroupOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists the access keys for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ listKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists the connection strings for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listConnectionStrings(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ listConnectionStrings(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listConnectionStrings(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listConnectionStrings(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ listConnectionStringsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Offline the specified region for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOffline Cosmos DB region to offline for the database account.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ offlineRegion(resourceGroupName: string, accountName: string, regionParameterForOffline: Models.RegionForOnlineOffline, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginOfflineRegion(resourceGroupName,accountName,regionParameterForOffline,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Online the specified region for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param regionParameterForOnline Cosmos DB region to online for the database account.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ onlineRegion(resourceGroupName: string, accountName: string, regionParameterForOnline: Models.RegionForOnlineOffline, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginOnlineRegion(resourceGroupName,accountName,regionParameterForOnline,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Lists the read-only access keys for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getReadOnlyKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ getReadOnlyKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getReadOnlyKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getReadOnlyKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ getReadOnlyKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists the read-only access keys for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listReadOnlyKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ listReadOnlyKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listReadOnlyKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listReadOnlyKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ listReadOnlyKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Regenerates an access key for the specified Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param keyToRegenerate The name of the key to regenerate.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ regenerateKey(resourceGroupName: string, accountName: string, keyToRegenerate: Models.DatabaseAccountRegenerateKeyParameters, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginRegenerateKey(resourceGroupName,accountName,keyToRegenerate,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Checks that the Azure Cosmos DB account name already exists. A valid account name may contain
+ * only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ checkNameExists(accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ checkNameExists(accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ checkNameExists(accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ checkNameExists(accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ accountName,
+ options
+ },
+ checkNameExistsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves the metrics determined by the given filter for the given database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetrics(resourceGroupName: string, accountName: string, filter: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, filter: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param filter An OData filter expression that describes a subset of metrics to return. The
+ * parameters that can be filtered are name.value (name of the metric, can have an or of multiple
+ * names), startTime, endTime, and timeGrain. The supported operator is eq.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetrics(resourceGroupName: string, accountName: string, filter: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetrics(resourceGroupName: string, accountName: string, filter: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ filter,
+ options
+ },
+ listMetricsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves the usages (most recent data) for the given database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listUsages(resourceGroupName: string, accountName: string, options?: Models.DatabaseAccountsListUsagesOptionalParams): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listUsages(resourceGroupName: string, accountName: string, options: Models.DatabaseAccountsListUsagesOptionalParams, callback: msRest.ServiceCallback): void;
+ listUsages(resourceGroupName: string, accountName: string, options?: Models.DatabaseAccountsListUsagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ listUsagesOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves metric definitions for the given database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listMetricDefinitions(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listMetricDefinitions(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ listMetricDefinitionsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists the SQL databases under an existing Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listSqlDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param callback The callback
+ */
+ listSqlDatabases(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listSqlDatabases(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listSqlDatabases(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ options
+ },
+ listSqlDatabasesOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Creates an Azure Cosmos DB SQL database
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param createSqlDatabaseParameters The parameters to provide for the current SQL database.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createSqlDatabase(resourceGroupName: string, accountName: string, createSqlDatabaseParameters: Models.SqlDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginCreateSqlDatabase(resourceGroupName,accountName,createSqlDatabaseParameters,options)
+ .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ }
+
+ /**
+ * Gets the SQL databases under an existing Azure Cosmos DB database account with the provided id.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getSqlDatabase(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param callback The callback
+ */
+ getSqlDatabase(resourceGroupName: string, accountName: string, databaseRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getSqlDatabase(resourceGroupName: string, accountName: string, databaseRid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getSqlDatabase(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ options
+ },
+ getSqlDatabaseOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Updates an existing Azure Cosmos DB SQL database
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param updateSqlDatabaseParameters The parameters to provide for the current SQL database.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ updateSqlDatabase(resourceGroupName: string, accountName: string, databaseRid: string, updateSqlDatabaseParameters: Models.SqlDatabaseCreateUpdateParameters, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginUpdateSqlDatabase(resourceGroupName,accountName,databaseRid,updateSqlDatabaseParameters,options)
+ .then(lroPoller => lroPoller.pollUntilFinished()) as Promise;
+ }
+
+ /**
+ * Deletes an existing Azure Cosmos DB SQL database.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteSqlDatabase(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase): Promise {
+ return this.beginDeleteSqlDatabase(resourceGroupName,accountName,databaseRid,options)
+ .then(lroPoller => lroPoller.pollUntilFinished());
+ }
+
+ /**
+ * Lists the SQL container under an existing Azure Cosmos DB database account.
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listSqlContainers(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param callback The callback
+ */
+ listSqlContainers(resourceGroupName: string, accountName: string, databaseRid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName Name of an Azure resource group.
+ * @param accountName Cosmos DB database account name.
+ * @param databaseRid Cosmos DB database rid.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listSqlContainers(resourceGroupName: string, accountName: string, databaseRid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listSqlContainers(resourceGroupName: string, accountName: string, databaseRid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ accountName,
+ databaseRid,
+ options
+ },
+ listSqlContainersOperationSpec,
+ callback) as Promise