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())
}