This commit is contained in:
Steve Faulkner 2020-07-23 21:52:05 -05:00
parent ee6f635458
commit 8aeff8fb45
19 changed files with 104 additions and 104 deletions

View File

@ -13,7 +13,7 @@ export async function listCassandraKeyspaces(
accountName: string
): Promise<Types.CassandraKeyspaceListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. */
@ -24,7 +24,7 @@ export async function getCassandraKeyspace(
keyspaceName: string
): Promise<Types.CassandraKeyspaceGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB Cassandra keyspace */
@ -37,7 +37,7 @@ export async function createUpdateCassandraKeyspace(
): Promise<Types.CassandraKeyspaceGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -49,7 +49,7 @@ export async function deleteCassandraKeyspace(
keyspaceName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the Cassandra Keyspace under an existing Azure Cosmos DB database account with the provided name. */
@ -60,7 +60,7 @@ export async function getCassandraKeyspaceThroughput(
keyspaceName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace */
@ -73,7 +73,7 @@ export async function updateCassandraKeyspaceThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -85,7 +85,7 @@ export async function listCassandraTables(
keyspaceName: string
): Promise<Types.CassandraTableListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the Cassandra table under an existing Azure Cosmos DB database account. */
@ -97,7 +97,7 @@ export async function getCassandraTable(
tableName: string
): Promise<Types.CassandraTableGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB Cassandra Table */
@ -111,7 +111,7 @@ export async function createUpdateCassandraTable(
): Promise<Types.CassandraTableGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -124,7 +124,7 @@ export async function deleteCassandraTable(
tableName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name. */
@ -136,7 +136,7 @@ export async function getCassandraTableThroughput(
tableName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB Cassandra table */
@ -150,6 +150,6 @@ export async function updateCassandraTableThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}

View File

@ -15,7 +15,7 @@ export async function listMetrics(
collectionRid: string
): Promise<Types.MetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves the usages (most recent storage data) for the given collection. */
@ -27,7 +27,7 @@ export async function listUsages(
collectionRid: string
): Promise<Types.UsagesResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/usages`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves metric definitions for the given collection. */
@ -39,5 +39,5 @@ export async function listMetricDefinitions(
collectionRid: string
): Promise<Types.MetricDefinitionsListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/metricDefinitions`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -15,7 +15,7 @@ export async function listMetrics(
collectionRid: string
): Promise<Types.PartitionMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves the usages (most recent storage data) for the given collection, split by partition. */
@ -27,5 +27,5 @@ export async function listUsages(
collectionRid: string
): Promise<Types.PartitionUsagesResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitions/usages`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -16,5 +16,5 @@ export async function listMetrics(
collectionRid: string
): Promise<Types.PartitionMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -16,5 +16,5 @@ export async function listMetrics(
collectionRid: string
): Promise<Types.MetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -14,7 +14,7 @@ export async function listMetrics(
databaseRid: string
): Promise<Types.MetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves the usages (most recent data) for the given database. */
@ -25,7 +25,7 @@ export async function listUsages(
databaseRid: string
): Promise<Types.UsagesResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/usages`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves metric definitions for the given database. */
@ -36,5 +36,5 @@ export async function listMetricDefinitions(
databaseRid: string
): Promise<Types.MetricDefinitionsListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/metricDefinitions`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -14,5 +14,5 @@ export async function listMetrics(
region: string
): Promise<Types.MetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -13,7 +13,7 @@ export async function get(
accountName: string
): Promise<Types.DatabaseAccountGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Updates the properties of an existing Azure Cosmos DB database account. */
@ -25,7 +25,7 @@ export async function update(
): Promise<Types.DatabaseAccountGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "patch", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "patch", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -38,7 +38,7 @@ export async function createOrUpdate(
): Promise<Types.DatabaseAccountGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -49,7 +49,7 @@ export async function destroy(
accountName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* 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. */
@ -61,14 +61,14 @@ export async function failoverPriorityChange(
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/failoverPriorityChange`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "post", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "post", body: JSON.stringify(body) })
.then(response => response.json());
}
/* Lists all the Azure Cosmos DB database accounts available under the subscription. */
export async function list(subscriptionId: string): Promise<Types.DatabaseAccountsListResult> {
const path = `/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Lists all the Azure Cosmos DB database accounts available under the given resource group. */
@ -77,7 +77,7 @@ export async function listByResourceGroup(
resourceGroupName: string
): Promise<Types.DatabaseAccountsListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Lists the access keys for the specified Azure Cosmos DB database account. */
@ -87,7 +87,7 @@ export async function listKeys(
accountName: string
): Promise<Types.DatabaseAccountListKeysResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/listKeys`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "post" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "post" }).then(response => response.json());
}
/* Lists the connection strings for the specified Azure Cosmos DB database account. */
@ -97,7 +97,7 @@ export async function listConnectionStrings(
accountName: string
): Promise<Types.DatabaseAccountListConnectionStringsResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/listConnectionStrings`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "post" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "post" }).then(response => response.json());
}
/* Offline the specified region for the specified Azure Cosmos DB database account. */
@ -109,7 +109,7 @@ export async function offlineRegion(
): Promise<void | void | Types.ErrorResponse> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/offlineRegion`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "post", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "post", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -122,7 +122,7 @@ export async function onlineRegion(
): Promise<void | void | Types.ErrorResponse> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/onlineRegion`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "post", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "post", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -133,7 +133,7 @@ export async function getReadOnlyKeys(
accountName: string
): Promise<Types.DatabaseAccountListReadOnlyKeysResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/readonlykeys`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Lists the read-only access keys for the specified Azure Cosmos DB database account. */
@ -143,7 +143,7 @@ export async function listReadOnlyKeys(
accountName: string
): Promise<Types.DatabaseAccountListReadOnlyKeysResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/readonlykeys`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "post" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "post" }).then(response => response.json());
}
/* Regenerates an access key for the specified Azure Cosmos DB database account. */
@ -155,14 +155,14 @@ export async function regenerateKey(
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/regenerateKey`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "post", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "post", body: JSON.stringify(body) })
.then(response => response.json());
}
/* 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. */
export async function checkNameExists(accountName: string): Promise<void | void> {
const path = `/providers/Microsoft.DocumentDB/databaseAccountNames/${accountName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "head" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "head" }).then(response => response.json());
}
/* Retrieves the metrics determined by the given filter for the given database account. */
@ -172,7 +172,7 @@ export async function listMetrics(
accountName: string
): Promise<Types.MetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves the usages (most recent data) for the given database account. */
@ -182,7 +182,7 @@ export async function listUsages(
accountName: string
): Promise<Types.UsagesResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/usages`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves metric definitions for the given database account. */
@ -192,5 +192,5 @@ export async function listMetricDefinitions(
accountName: string
): Promise<Types.MetricDefinitionsListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/metricDefinitions`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -13,7 +13,7 @@ export async function listGremlinDatabases(
accountName: string
): Promise<Types.GremlinDatabaseListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. */
@ -24,7 +24,7 @@ export async function getGremlinDatabase(
databaseName: string
): Promise<Types.GremlinDatabaseGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB Gremlin database */
@ -37,7 +37,7 @@ export async function createUpdateGremlinDatabase(
): Promise<Types.GremlinDatabaseGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -49,7 +49,7 @@ export async function deleteGremlinDatabase(
databaseName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the Gremlin database under an existing Azure Cosmos DB database account with the provided name. */
@ -60,7 +60,7 @@ export async function getGremlinDatabaseThroughput(
databaseName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB Gremlin database */
@ -73,7 +73,7 @@ export async function updateGremlinDatabaseThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -85,7 +85,7 @@ export async function listGremlinGraphs(
databaseName: string
): Promise<Types.GremlinGraphListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the Gremlin graph under an existing Azure Cosmos DB database account. */
@ -97,7 +97,7 @@ export async function getGremlinGraph(
graphName: string
): Promise<Types.GremlinGraphGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB Gremlin graph */
@ -111,7 +111,7 @@ export async function createUpdateGremlinGraph(
): Promise<Types.GremlinGraphGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -124,7 +124,7 @@ export async function deleteGremlinGraph(
graphName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. */
@ -136,7 +136,7 @@ export async function getGremlinGraphThroughput(
graphName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB Gremlin graph */
@ -150,6 +150,6 @@ export async function updateGremlinGraphThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}

View File

@ -13,7 +13,7 @@ export async function listMongoDBDatabases(
accountName: string
): Promise<Types.MongoDBDatabaseListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. */
@ -24,7 +24,7 @@ export async function getMongoDBDatabase(
databaseName: string
): Promise<Types.MongoDBDatabaseGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or updates Azure Cosmos DB MongoDB database */
@ -37,7 +37,7 @@ export async function createUpdateMongoDBDatabase(
): Promise<Types.MongoDBDatabaseGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -49,7 +49,7 @@ export async function deleteMongoDBDatabase(
databaseName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the MongoDB database under an existing Azure Cosmos DB database account with the provided name. */
@ -60,7 +60,7 @@ export async function getMongoDBDatabaseThroughput(
databaseName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of the an Azure Cosmos DB MongoDB database */
@ -73,7 +73,7 @@ export async function updateMongoDBDatabaseThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -85,7 +85,7 @@ export async function listMongoDBCollections(
databaseName: string
): Promise<Types.MongoDBCollectionListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the MongoDB collection under an existing Azure Cosmos DB database account. */
@ -97,7 +97,7 @@ export async function getMongoDBCollection(
collectionName: string
): Promise<Types.MongoDBCollectionGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB MongoDB Collection */
@ -111,7 +111,7 @@ export async function createUpdateMongoDBCollection(
): Promise<Types.MongoDBCollectionGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -124,7 +124,7 @@ export async function deleteMongoDBCollection(
collectionName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account with the provided name. */
@ -136,7 +136,7 @@ export async function getMongoDBCollectionThroughput(
collectionName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update the RUs per second of an Azure Cosmos DB MongoDB collection */
@ -150,6 +150,6 @@ export async function updateMongoDBCollectionThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}

View File

@ -9,5 +9,5 @@ import * as Types from "./types";
/* Lists all of the available Cosmos DB Resource Provider operations. */
export async function list(): Promise<Types.OperationListResult> {
const path = `/providers/Microsoft.DocumentDB/operations`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -16,5 +16,5 @@ export async function listMetrics(
partitionKeyRangeId: string
): Promise<Types.PartitionMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitionKeyRangeId/${partitionKeyRangeId}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -17,5 +17,5 @@ export async function listMetrics(
partitionKeyRangeId: string
): Promise<Types.PartitionMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitionKeyRangeId/${partitionKeyRangeId}/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -13,5 +13,5 @@ export async function listMetrics(
accountName: string
): Promise<Types.PercentileMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/percentile/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -15,5 +15,5 @@ export async function listMetrics(
targetRegion: string
): Promise<Types.PercentileMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sourceRegion/${sourceRegion}/targetRegion/${targetRegion}/percentile/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -14,5 +14,5 @@ export async function listMetrics(
targetRegion: string
): Promise<Types.PercentileMetricListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/targetRegion/${targetRegion}/percentile/metrics`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -12,7 +12,7 @@ export async function listByLocation(
location: string
): Promise<Types.RestorableDatabaseAccountsListResult | Types.ErrorResponseUpdatedFormat> {
const path = `/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}/restorableDatabaseAccounts`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Lists all the restorable Azure Cosmos DB database accounts available under the subscription. */
@ -20,7 +20,7 @@ export async function list(
subscriptionId: string
): Promise<Types.RestorableDatabaseAccountsListResult | Types.ErrorResponseUpdatedFormat> {
const path = `/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Retrieves the properties of an existing Azure Cosmos DB restorable database account. */
@ -30,5 +30,5 @@ export async function getByLocation(
instanceId: string
): Promise<Types.RestorableDatabaseAccountGetResult | Types.ErrorResponseUpdatedFormat> {
const path = `/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}/restorableDatabaseAccounts/${instanceId}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}

View File

@ -13,7 +13,7 @@ export async function listSqlDatabases(
accountName: string
): Promise<Types.SqlDatabaseListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. */
@ -24,7 +24,7 @@ export async function getSqlDatabase(
databaseName: string
): Promise<Types.SqlDatabaseGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB SQL database */
@ -37,7 +37,7 @@ export async function createUpdateSqlDatabase(
): Promise<Types.SqlDatabaseGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -49,7 +49,7 @@ export async function deleteSqlDatabase(
databaseName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the SQL database under an existing Azure Cosmos DB database account with the provided name. */
@ -60,7 +60,7 @@ export async function getSqlDatabaseThroughput(
databaseName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB SQL database */
@ -73,7 +73,7 @@ export async function updateSqlDatabaseThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -85,7 +85,7 @@ export async function listSqlContainers(
databaseName: string
): Promise<Types.SqlContainerListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the SQL container under an existing Azure Cosmos DB database account. */
@ -97,7 +97,7 @@ export async function getSqlContainer(
containerName: string
): Promise<Types.SqlContainerGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB SQL container */
@ -111,7 +111,7 @@ export async function createUpdateSqlContainer(
): Promise<Types.SqlContainerGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -124,7 +124,7 @@ export async function deleteSqlContainer(
containerName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. */
@ -136,7 +136,7 @@ export async function getSqlContainerThroughput(
containerName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB SQL container */
@ -150,7 +150,7 @@ export async function updateSqlContainerThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -163,7 +163,7 @@ export async function listSqlStoredProcedures(
containerName: string
): Promise<Types.SqlStoredProcedureListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. */
@ -176,7 +176,7 @@ export async function getSqlStoredProcedure(
storedProcedureName: string
): Promise<Types.SqlStoredProcedureGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB SQL storedProcedure */
@ -191,7 +191,7 @@ export async function createUpdateSqlStoredProcedure(
): Promise<Types.SqlStoredProcedureGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -205,7 +205,7 @@ export async function deleteSqlStoredProcedure(
storedProcedureName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. */
@ -217,7 +217,7 @@ export async function listSqlUserDefinedFunctions(
containerName: string
): Promise<Types.SqlUserDefinedFunctionListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. */
@ -230,7 +230,7 @@ export async function getSqlUserDefinedFunction(
userDefinedFunctionName: string
): Promise<Types.SqlUserDefinedFunctionGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB SQL userDefinedFunction */
@ -245,7 +245,7 @@ export async function createUpdateSqlUserDefinedFunction(
): Promise<Types.SqlUserDefinedFunctionGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -259,7 +259,7 @@ export async function deleteSqlUserDefinedFunction(
userDefinedFunctionName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Lists the SQL trigger under an existing Azure Cosmos DB database account. */
@ -271,7 +271,7 @@ export async function listSqlTriggers(
containerName: string
): Promise<Types.SqlTriggerListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the SQL trigger under an existing Azure Cosmos DB database account. */
@ -284,7 +284,7 @@ export async function getSqlTrigger(
triggerName: string
): Promise<Types.SqlTriggerGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB SQL trigger */
@ -299,7 +299,7 @@ export async function createUpdateSqlTrigger(
): Promise<Types.SqlTriggerGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -313,5 +313,5 @@ export async function deleteSqlTrigger(
triggerName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}

View File

@ -13,7 +13,7 @@ export async function listTables(
accountName: string
): Promise<Types.TableListResult> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Gets the Tables under an existing Azure Cosmos DB database account with the provided name. */
@ -24,7 +24,7 @@ export async function getTable(
tableName: string
): Promise<Types.TableGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Create or update an Azure Cosmos DB Table */
@ -37,7 +37,7 @@ export async function createUpdateTable(
): Promise<Types.TableGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}
@ -49,7 +49,7 @@ export async function deleteTable(
tableName: string
): Promise<void | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "delete" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "delete" }).then(response => response.json());
}
/* Gets the RUs per second of the Table under an existing Azure Cosmos DB database account with the provided name. */
@ -60,7 +60,7 @@ export async function getTableThroughput(
tableName: string
): Promise<Types.ThroughputSettingsGetResults> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}/throughputSettings/default`;
return window.fetch(this.baseUrl + this.basePath + path, { method: "get" }).then(response => response.json());
return window.fetch(this.baseUrl + path, { method: "get" }).then(response => response.json());
}
/* Update RUs per second of an Azure Cosmos DB Table */
@ -73,6 +73,6 @@ export async function updateTableThroughput(
): Promise<Types.ThroughputSettingsGetResults | void> {
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}/throughputSettings/default`;
return window
.fetch(this.baseUrl + this.basePath + path, { method: "put", body: JSON.stringify(body) })
.fetch(this.baseUrl + path, { method: "put", body: JSON.stringify(body) })
.then(response => response.json());
}