List PCU groups (TypeScript)
Lists all Provisioned Capacity Units (PCU) groups in an organization.
|
You need an application token with the Organization Administrator or Billing Administrator role. For more information, see Get endpoint and token. |
Result
Returns a promise that resolves to an unordered list of AstraPCUGroupDescriptor objects.
Each object describes a PCU group in the organization.
Parameters
Use the listPCUGroups method, which belongs to the AstraAdmin class.
Method signature
async listPCUGroups(
options?: {
cloudProvider?: AstraDatabaseCloudProvider,
region?: string,
timeout?: number | TimeoutDescriptor,
}): AstraPCUGroupDescriptor[]
| Name | Type | Summary |
|---|---|---|
|
Optional.
The options for this operation.
See Properties of |
| Name | Type | Summary |
|---|---|---|
|
|
Required if you specify Only returns PCU groups for this cloud provider. |
|
|
Required if you specify Only returns PCU groups in this cloud provider region. The available regions depend on your plan and the database type. To find available regions, see Find available regions (TypeScript). |
|
|
Optional. A timeout to impose on the underlying API request. |
Examples
The following examples demonstrate how to list PCU groups.
List all PCU groups
import { DataAPIClient } from "@datastax/astra-db-ts";
const client = new DataAPIClient("APPLICATION_TOKEN");
const admin = client.admin();
(async function () {
const groups = await admin.listPCUGroups();
console.log(groups);
})();
List PCU groups for a cloud provider region
import { DataAPIClient } from "@datastax/astra-db-ts";
const client = new DataAPIClient("APPLICATION_TOKEN");
const admin = client.admin();
(async function () {
const groups = await admin.listPCUGroups({
cloudProvider: "AWS",
region: "us-west-2",
});
console.log(groups);
})();
Client reference
For more information, see the client reference.