List PCU groups (Python)
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 an unordered list of PCUGroupDescriptor objects.
Each object describes a PCU group in the organization.
Parameters
Use the list_pcu_groups method, which belongs to the AstraDBAdmin class.
Method signature
list_pcu_groups(
*,
cloud_provider: str,
region: str,
database_admin_timeout_ms: int,
request_timeout_ms: int,
timeout_ms: int
) -> list[PCUGroupDescriptor]
| Name | Type | Summary |
|---|---|---|
|
|
Required if you specify Only returns PCU groups for this cloud provider. Can be one of: |
|
|
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 (Python). |
|
|
Optional.
A timeout, in milliseconds, to impose on the underlying API request.
If not provided, the This parameter is aliased as |
Examples
The following examples demonstrate how to list PCU groups.
List all PCU groups
from astrapy import DataAPIClient
client = DataAPIClient("APPLICATION_TOKEN")
admin = client.get_admin()
groups = admin.list_pcu_groups()
print(groups)
List PCU groups for a cloud provider region
from astrapy import DataAPIClient
client = DataAPIClient("APPLICATION_TOKEN")
admin = client.get_admin()
groups = admin.list_pcu_groups(cloud_provider="aws", region="us-west-2")
print(groups)
Client reference
For more information, see the client reference.