mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-29 05:00:20 +00:00
* Adding RU thermometer to settings throughput tab * Finalizing RU thermometer on throughput settings * Updated snapshot * Fixing formatting * Fixing lint errors * Rerun prettier * Fixing Offer properties * Fixing Types * Updating ARM clients, and enabling new elasticity properties * Updating snapshots * Updating an issue caused by updating ARM client * Latest changes based on feedback * Fixing lint and unit tests * Minor fix * Minor text change * Changed some formatting
28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
/*
|
|
AUTOGENERATED FILE
|
|
Run "npm run generateARMClients" to regenerate
|
|
Edting this file directly should be done with extreme caution as not to diverge from ARM REST specs
|
|
|
|
Generated from: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2023-04-15/cosmos-db.json
|
|
*/
|
|
|
|
import { armRequest } from "../../request";
|
|
import * as Types from "./types";
|
|
import { configContext } from "../../../../ConfigContext";
|
|
const apiVersion = "2023-04-15";
|
|
|
|
/* List Cosmos DB locations and their properties */
|
|
export async function list(subscriptionId: string): Promise<Types.LocationListResult | Types.CloudError> {
|
|
const path = `/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations`;
|
|
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
|
|
}
|
|
|
|
/* Get the properties of an existing Cosmos DB location */
|
|
export async function get(
|
|
subscriptionId: string,
|
|
location: string
|
|
): Promise<Types.LocationGetResult | Types.CloudError> {
|
|
const path = `/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/locations/${location}`;
|
|
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
|
|
}
|