Split up generators

This commit is contained in:
Steve Faulkner
2020-07-23 16:35:05 -05:00
parent cfe9bd8303
commit f1812077e9
25 changed files with 2983 additions and 2859 deletions

View File

@@ -0,0 +1,167 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. */
export async function listCassandraKeyspaces (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.CassandraKeyspaceListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces`, { method: "get", }).then((response) => response.json())
}
/* Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided name. */
export async function getCassandraKeyspace (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string
) : Promise<Types.CassandraKeyspaceGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB Cassandra keyspace */
export async function createUpdateCassandraKeyspace (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string
,body: Types.CassandraKeyspaceCreateUpdateParameters
) : Promise<Types.CassandraKeyspaceGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB Cassandra keyspace. */
export async function deleteCassandraKeyspace (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}`, { 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. */
export async function getCassandraKeyspaceThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB Cassandra Keyspace */
export async function updateCassandraKeyspaceThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Lists the Cassandra table under an existing Azure Cosmos DB database account. */
export async function listCassandraTables (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string
) : Promise<Types.CassandraTableListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables`, { method: "get", }).then((response) => response.json())
}
/* Gets the Cassandra table under an existing Azure Cosmos DB database account. */
export async function getCassandraTable (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string,
tableName: string
) : Promise<Types.CassandraTableGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB Cassandra Table */
export async function createUpdateCassandraTable (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string,
tableName: string
,body: Types.CassandraTableCreateUpdateParameters
) : Promise<Types.CassandraTableGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB Cassandra table. */
export async function deleteCassandraTable (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string,
tableName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}`, { 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. */
export async function getCassandraTableThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string,
tableName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB Cassandra table */
export async function updateCassandraTableThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
keyspaceName: string,
tableName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/cassandraKeyspaces/${keyspaceName}/tables/${tableName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}

View File

@@ -0,0 +1,49 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given database account and collection. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.MetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/metrics`, { method: "get", }).then((response) => response.json())
}
/* Retrieves the usages (most recent storage data) for the given collection. */
export async function listUsages (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.UsagesResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/usages`, { method: "get", }).then((response) => response.json())
}
/* Retrieves metric definitions for the given collection. */
export async function listMetricDefinitions (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.MetricDefinitionsListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/metricDefinitions`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,35 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given collection, split by partition. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.PartitionMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`, { method: "get", }).then((response) => response.json())
}
/* Retrieves the usages (most recent storage data) for the given collection, split by partition. */
export async function listUsages (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.PartitionUsagesResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitions/usages`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,22 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given collection and region, split by partition. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
region: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.PartitionMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,22 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given database account, collection and region. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
region: string,
databaseRid: string,
collectionRid: string
) : Promise<Types.MetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/metrics`, { method: "get", }).then((response) => response.json())
}

52
src/Utils/arm/Database.ts Normal file
View File

@@ -0,0 +1,52 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types";
/* Retrieves the metrics determined by the given filter for the given database account and database. */
export async function listMetrics(
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string
): Promise<Types.MetricListResult> {
return window
.fetch(
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/metrics`,
{ method: "get" }
)
.then(response => response.json());
}
/* Retrieves the usages (most recent data) for the given database. */
export async function listUsages(
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string
): Promise<Types.UsagesResult> {
return window
.fetch(
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/usages`,
{ method: "get" }
)
.then(response => response.json());
}
/* Retrieves metric definitions for the given database. */
export async function listMetricDefinitions(
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string
): Promise<Types.MetricDefinitionsListResult> {
return window
.fetch(
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/metricDefinitions`,
{ method: "get" }
)
.then(response => response.json());
}

View File

@@ -0,0 +1,22 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types";
/* Retrieves the metrics determined by the given filter for the given database account and region. */
export async function listMetrics(
subscriptionId: string,
resourceGroupName: string,
accountName: string,
region: string
): Promise<Types.MetricListResult> {
return window
.fetch(
`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/metrics`,
{ method: "get" }
)
.then(response => response.json());
}

View File

@@ -0,0 +1,218 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the properties of an existing Azure Cosmos DB database account. */
export async function get (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.DatabaseAccountGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`, { method: "get", }).then((response) => response.json())
}
/* Updates the properties of an existing Azure Cosmos DB database account. */
export async function update (
subscriptionId: string,
resourceGroupName: string,
accountName: string
,body: Types.DatabaseAccountUpdateParameters
) : Promise<Types.DatabaseAccountGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`, { method: "patch", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. */
export async function createOrUpdate (
subscriptionId: string,
resourceGroupName: string,
accountName: string
,body: Types.DatabaseAccountCreateUpdateParameters
) : Promise<Types.DatabaseAccountGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB database account. */
export async function delete (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}`, { 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. */
export async function failoverPriorityChange (
subscriptionId: string,
resourceGroupName: string,
accountName: string
,body: Types.FailoverPolicies
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/failoverPriorityChange`, { 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> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts`, { method: "get", }).then((response) => response.json())
}
/* Lists all the Azure Cosmos DB database accounts available under the given resource group. */
export async function listByResourceGroup (
subscriptionId: string,
resourceGroupName: string
) : Promise<Types.DatabaseAccountsListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts`, { method: "get", }).then((response) => response.json())
}
/* Lists the access keys for the specified Azure Cosmos DB database account. */
export async function listKeys (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.DatabaseAccountListKeysResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/listKeys`, { method: "post", }).then((response) => response.json())
}
/* Lists the connection strings for the specified Azure Cosmos DB database account. */
export async function listConnectionStrings (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.DatabaseAccountListConnectionStringsResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/listConnectionStrings`, { method: "post", }).then((response) => response.json())
}
/* Offline the specified region for the specified Azure Cosmos DB database account. */
export async function offlineRegion (
subscriptionId: string,
resourceGroupName: string,
accountName: string
,body: Types.RegionForOnlineOffline
) : Promise<void | void | Types.ErrorResponse> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/offlineRegion`, { method: "post", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Online the specified region for the specified Azure Cosmos DB database account. */
export async function onlineRegion (
subscriptionId: string,
resourceGroupName: string,
accountName: string
,body: Types.RegionForOnlineOffline
) : Promise<void | void | Types.ErrorResponse> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/onlineRegion`, { method: "post", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Lists the read-only access keys for the specified Azure Cosmos DB database account. */
export async function getReadOnlyKeys (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.DatabaseAccountListReadOnlyKeysResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/readonlykeys`, { method: "get", }).then((response) => response.json())
}
/* Lists the read-only access keys for the specified Azure Cosmos DB database account. */
export async function listReadOnlyKeys (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.DatabaseAccountListReadOnlyKeysResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/readonlykeys`, { method: "post", }).then((response) => response.json())
}
/* Regenerates an access key for the specified Azure Cosmos DB database account. */
export async function regenerateKey (
subscriptionId: string,
resourceGroupName: string,
accountName: string
,body: Types.DatabaseAccountRegenerateKeyParameters
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/regenerateKey`, { 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> {
return window.fetch(`https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/${accountName}`, { method: "head", }).then((response) => response.json())
}
/* Retrieves the metrics determined by the given filter for the given database account. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.MetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/metrics`, { method: "get", }).then((response) => response.json())
}
/* Retrieves the usages (most recent data) for the given database account. */
export async function listUsages (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.UsagesResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/usages`, { method: "get", }).then((response) => response.json())
}
/* Retrieves metric definitions for the given database account. */
export async function listMetricDefinitions (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.MetricDefinitionsListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/metricDefinitions`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,167 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists the Gremlin databases under an existing Azure Cosmos DB database account. */
export async function listGremlinDatabases (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.GremlinDatabaseListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases`, { method: "get", }).then((response) => response.json())
}
/* Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided name. */
export async function getGremlinDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.GremlinDatabaseGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB Gremlin database */
export async function createUpdateGremlinDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
,body: Types.GremlinDatabaseCreateUpdateParameters
) : Promise<Types.GremlinDatabaseGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB Gremlin database. */
export async function deleteGremlinDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}`, { 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. */
export async function getGremlinDatabaseThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB Gremlin database */
export async function updateGremlinDatabaseThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Lists the Gremlin graph under an existing Azure Cosmos DB database account. */
export async function listGremlinGraphs (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.GremlinGraphListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs`, { method: "get", }).then((response) => response.json())
}
/* Gets the Gremlin graph under an existing Azure Cosmos DB database account. */
export async function getGremlinGraph (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
graphName: string
) : Promise<Types.GremlinGraphGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB Gremlin graph */
export async function createUpdateGremlinGraph (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
graphName: string
,body: Types.GremlinGraphCreateUpdateParameters
) : Promise<Types.GremlinGraphGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB Gremlin graph. */
export async function deleteGremlinGraph (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
graphName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}`, { method: "delete", }).then((response) => response.json())
}
/* Gets the Gremlin graph throughput under an existing Azure Cosmos DB database account with the provided name. */
export async function getGremlinGraphThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
graphName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB Gremlin graph */
export async function updateGremlinGraphThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
graphName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/gremlinDatabases/${databaseName}/graphs/${graphName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}

View File

@@ -0,0 +1,167 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists the MongoDB databases under an existing Azure Cosmos DB database account. */
export async function listMongoDBDatabases (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.MongoDBDatabaseListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases`, { method: "get", }).then((response) => response.json())
}
/* Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name. */
export async function getMongoDBDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.MongoDBDatabaseGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`, { method: "get", }).then((response) => response.json())
}
/* Create or updates Azure Cosmos DB MongoDB database */
export async function createUpdateMongoDBDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
,body: Types.MongoDBDatabaseCreateUpdateParameters
) : Promise<Types.MongoDBDatabaseGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB MongoDB database. */
export async function deleteMongoDBDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}`, { 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. */
export async function getMongoDBDatabaseThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of the an Azure Cosmos DB MongoDB database */
export async function updateMongoDBDatabaseThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Lists the MongoDB collection under an existing Azure Cosmos DB database account. */
export async function listMongoDBCollections (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.MongoDBCollectionListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections`, { method: "get", }).then((response) => response.json())
}
/* Gets the MongoDB collection under an existing Azure Cosmos DB database account. */
export async function getMongoDBCollection (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
collectionName: string
) : Promise<Types.MongoDBCollectionGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB MongoDB Collection */
export async function createUpdateMongoDBCollection (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
collectionName: string
,body: Types.MongoDBCollectionCreateUpdateParameters
) : Promise<Types.MongoDBCollectionGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB MongoDB Collection. */
export async function deleteMongoDBCollection (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
collectionName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}`, { 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. */
export async function getMongoDBCollectionThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
collectionName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update the RUs per second of an Azure Cosmos DB MongoDB collection */
export async function updateMongoDBCollectionThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
collectionName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/mongodbDatabases/${databaseName}/collections/${collectionName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}

View File

@@ -0,0 +1,17 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists all of the available Cosmos DB Resource Provider operations. */
export async function list (
) : Promise<Types.OperationListResult> {
return window.fetch(`https://management.azure.com/providers/Microsoft.DocumentDB/operations`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,22 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given partition key range id. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseRid: string,
collectionRid: string,
partitionKeyRangeId: string
) : Promise<Types.PartitionMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/databases/${databaseRid}/collections/${collectionRid}/partitionKeyRangeId/${partitionKeyRangeId}/metrics`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,23 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given partition key range id and region. */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
region: string,
databaseRid: string,
collectionRid: string,
partitionKeyRangeId: string
) : Promise<Types.PartitionMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitionKeyRangeId/${partitionKeyRangeId}/metrics`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,19 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.PercentileMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/percentile/metrics`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,21 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given account, source and target region. This url is only for PBS and Replication Latency data */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
sourceRegion: string,
targetRegion: string
) : Promise<Types.PercentileMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sourceRegion/${sourceRegion}/targetRegion/${targetRegion}/percentile/metrics`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,20 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Retrieves the metrics determined by the given filter for the given account target region. This url is only for PBS and Replication Latency data */
export async function listMetrics (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
targetRegion: string
) : Promise<Types.PercentileMetricListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/targetRegion/${targetRegion}/percentile/metrics`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,40 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region. */
export async function listByLocation (
subscriptionId: string,
location: string
) : Promise<Types.RestorableDatabaseAccountsListResult | Types.ErrorResponseUpdatedFormat> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}/restorableDatabaseAccounts`, { method: "get", }).then((response) => response.json())
}
/* Lists all the restorable Azure Cosmos DB database accounts available under the subscription. */
export async function list (
subscriptionId: string
) : Promise<Types.RestorableDatabaseAccountsListResult | Types.ErrorResponseUpdatedFormat> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts`, { method: "get", }).then((response) => response.json())
}
/* Retrieves the properties of an existing Azure Cosmos DB restorable database account. */
export async function getByLocation (
subscriptionId: string,
location: string,
instanceId: string
) : Promise<Types.RestorableDatabaseAccountGetResult | Types.ErrorResponseUpdatedFormat> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}/restorableDatabaseAccounts/${instanceId}`, { method: "get", }).then((response) => response.json())
}

View File

@@ -0,0 +1,344 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists the SQL databases under an existing Azure Cosmos DB database account. */
export async function listSqlDatabases (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.SqlDatabaseListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases`, { method: "get", }).then((response) => response.json())
}
/* Gets the SQL database under an existing Azure Cosmos DB database account with the provided name. */
export async function getSqlDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.SqlDatabaseGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB SQL database */
export async function createUpdateSqlDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
,body: Types.SqlDatabaseCreateUpdateParameters
) : Promise<Types.SqlDatabaseGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB SQL database. */
export async function deleteSqlDatabase (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}`, { 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. */
export async function getSqlDatabaseThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB SQL database */
export async function updateSqlDatabaseThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Lists the SQL container under an existing Azure Cosmos DB database account. */
export async function listSqlContainers (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string
) : Promise<Types.SqlContainerListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers`, { method: "get", }).then((response) => response.json())
}
/* Gets the SQL container under an existing Azure Cosmos DB database account. */
export async function getSqlContainer (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
) : Promise<Types.SqlContainerGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB SQL container */
export async function createUpdateSqlContainer (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
,body: Types.SqlContainerCreateUpdateParameters
) : Promise<Types.SqlContainerGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB SQL container. */
export async function deleteSqlContainer (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}`, { method: "delete", }).then((response) => response.json())
}
/* Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. */
export async function getSqlContainerThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB SQL container */
export async function updateSqlContainerThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. */
export async function listSqlStoredProcedures (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
) : Promise<Types.SqlStoredProcedureListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures`, { method: "get", }).then((response) => response.json())
}
/* Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. */
export async function getSqlStoredProcedure (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
storedProcedureName: string
) : Promise<Types.SqlStoredProcedureGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB SQL storedProcedure */
export async function createUpdateSqlStoredProcedure (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
storedProcedureName: string
,body: Types.SqlStoredProcedureCreateUpdateParameters
) : Promise<Types.SqlStoredProcedureGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB SQL storedProcedure. */
export async function deleteSqlStoredProcedure (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
storedProcedureName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/storedProcedures/${storedProcedureName}`, { method: "delete", }).then((response) => response.json())
}
/* Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. */
export async function listSqlUserDefinedFunctions (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
) : Promise<Types.SqlUserDefinedFunctionListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions`, { method: "get", }).then((response) => response.json())
}
/* Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. */
export async function getSqlUserDefinedFunction (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
userDefinedFunctionName: string
) : Promise<Types.SqlUserDefinedFunctionGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB SQL userDefinedFunction */
export async function createUpdateSqlUserDefinedFunction (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
userDefinedFunctionName: string
,body: Types.SqlUserDefinedFunctionCreateUpdateParameters
) : Promise<Types.SqlUserDefinedFunctionGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB SQL userDefinedFunction. */
export async function deleteSqlUserDefinedFunction (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
userDefinedFunctionName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/userDefinedFunctions/${userDefinedFunctionName}`, { method: "delete", }).then((response) => response.json())
}
/* Lists the SQL trigger under an existing Azure Cosmos DB database account. */
export async function listSqlTriggers (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string
) : Promise<Types.SqlTriggerListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers`, { method: "get", }).then((response) => response.json())
}
/* Gets the SQL trigger under an existing Azure Cosmos DB database account. */
export async function getSqlTrigger (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
triggerName: string
) : Promise<Types.SqlTriggerGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB SQL trigger */
export async function createUpdateSqlTrigger (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
triggerName: string
,body: Types.SqlTriggerCreateUpdateParameters
) : Promise<Types.SqlTriggerGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB SQL trigger. */
export async function deleteSqlTrigger (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
databaseName: string,
containerName: string,
triggerName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/sqlDatabases/${databaseName}/containers/${containerName}/triggers/${triggerName}`, { method: "delete", }).then((response) => response.json())
}

View File

@@ -0,0 +1,84 @@
/*
AUTOGENERATED FILE
Do not manually edit
Run "npm run generateARMClients" to regenerate
*/
import * as Types from "./types"
/* Lists the Tables under an existing Azure Cosmos DB database account. */
export async function listTables (
subscriptionId: string,
resourceGroupName: string,
accountName: string
) : Promise<Types.TableListResult> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables`, { method: "get", }).then((response) => response.json())
}
/* Gets the Tables under an existing Azure Cosmos DB database account with the provided name. */
export async function getTable (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
tableName: string
) : Promise<Types.TableGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`, { method: "get", }).then((response) => response.json())
}
/* Create or update an Azure Cosmos DB Table */
export async function createUpdateTable (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
tableName: string
,body: Types.TableCreateUpdateParameters
) : Promise<Types.TableGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}
/* Deletes an existing Azure Cosmos DB Table. */
export async function deleteTable (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
tableName: string
) : Promise<void | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}`, { 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. */
export async function getTableThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
tableName: string
) : Promise<Types.ThroughputSettingsGetResults> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}/throughputSettings/default`, { method: "get", }).then((response) => response.json())
}
/* Update RUs per second of an Azure Cosmos DB Table */
export async function updateTableThroughput (
subscriptionId: string,
resourceGroupName: string,
accountName: string,
tableName: string
,body: Types.ThroughputSettingsUpdateParameters
) : Promise<Types.ThroughputSettingsGetResults | void> {
return window.fetch(`https://management.azure.com/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/tables/${tableName}/throughputSettings/default`, { method: "put", body: JSON.stringify(body) }).then((response) => response.json())
}

1261
src/Utils/arm/types.ts Normal file

File diff suppressed because it is too large Load Diff