mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-03-29 13:09:07 +00:00
* Adding computed properties to Settings tab for containers * Fixing files for prettier and a test snapshot
26 lines
1.2 KiB
TypeScript
26 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/preview/2024-02-15-preview/cosmos-db.json
|
|
*/
|
|
|
|
import { configContext } from "../../../../ConfigContext";
|
|
import { armRequest } from "../../request";
|
|
import * as Types from "./types";
|
|
const apiVersion = "2024-02-15-preview";
|
|
|
|
/* 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> {
|
|
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/region/${region}/databases/${databaseRid}/collections/${collectionRid}/partitions/metrics`;
|
|
return armRequest({ host: configContext.ARM_ENDPOINT, path, method: "GET", apiVersion });
|
|
}
|