milvus-logo
LFAI
< Docs

list_resource_groups()

This operation lists all resource groups in the currently connected Milvus instance.

Request Syntax

list_resource_groups(
    using: str,
    timeout: float | None,
)

PARAMETERS:

  • using (str) -

    The alias of the employed connection.

    The default value is default, indicating that this operation employs the default connection.

  • timeout (float | None)

    The timeout duration for this operation. Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.

RETURN TYPE:

list

RETURNS: A list of all resource group names.

EXAMPLE:

from pymilvus import connections, utility

# Connect to localhost:19530
connections.connect()

# Create a new resource group
utility.create_resource_group(
    name="rg_01",
    using="default"
)

# Create another resource group
utility.create_resource_group(
    name="rg_02",
    using="default"
)

# List all resource groups
utility.list_resource_groups(
    using="default"
) # ["__default_resource_group", "rg_01", "rg_02"]
Feedback

Was this page helpful?