edbctl catalog v1.3.3

The edbctl catalog command is the entry point for all operations related to managing database catalog resources within a Hybrid Manager cluster. It allows you to perform various tasks such as listing, adding, updating, and removing database catalogs.

Commands

The following commands fall under the edbctl catalog namespace and provide specific catalog management functionality:

edbctl catalog create

The edbctl catalog create command provisions and registers a new database catalog resource within the Hybrid Manager cluster. This command supports creating both project catalogs for resource grouping and cluster catalogs specifically for EDB Postgres Distributed (PGD) and Advanced High Availability (AHA) clusters, with ability to assign custom tags for organization and metadata.

edbctl catalog create [options]

Where options are:

      --type string               Type of catalog to create. The valid values are `project`, `pgd`, `aha`. The default is `project`  (required).
      --tags strings              Comma-separated list of tags to assign to the catalog in `name=value` format, where `value` is optional.
      --cluster-id string         The unique ID of the cluster associated with the catalog (required for `pgd` and `aha` cluster types).
      --datagroup-id string       The unique ID of the Data Group associated with the catalog (required for `pgd` and `aha` cluster types).
      --database-name string      The name of the database associated with the catalog (required for `pgd` and `aha` cluster types).
  -P, --project string            The name of the project associated with the catalog (required for `pgd` and `aha` cluster types).
  -y, --yes                       Auto-confirms all prompts and confirmations, enabling non-interactive operation.
  -h, --help                      Displays help information for the `create` command.

This example shows how to create a default project catalog and assign a tag to it:

edbctl catalog create --tags env=dev

This example shows how to create a project catalog within a specific project:

edbctl catalog create --project "prj_123" --tags name1=blue --type project

This example shows how to create a PGD cluster catalog associated with a specific project, cluster, Data Group, and database:

edbctl catalog create --tags env=prod --type pgd --cluster-id "p-123" --datagroup-id "p-123-a" --database-name "mydb"

This example shows how to create a PGD type catalog within a specified project:

edbctl catalog create --project "prj_123" --tags env=prod --type pgd --cluster-id "p-456" --datagroup-id "p-456-b" --database-name "bdrdb"

edbctl catalog delete

The edbctl catalog delete command is used to permanently remove a specified catalog from a registered catalog resource by providing its unique identifier. This action is irreversible and should be used with caution.

This command requires the unique catalog ID to ensure the correct resource is deleted.

edbctl catalog delete --id [options]

Where options are:

      --id string                 The unique ID of the catalog to delete (required).
  -P, --project string            The name of the project that groups your clusters and other resources. The default is taken from the current configuration context (required).
  -c, --credential string         The name of the credential to use for authentication. The default is taken from the current configuration context (required).
  -y, --yes                       Auto-confirms all prompts and confirmations, enabling non-interactive operation.
  -h, --help                      Displays help information for the `delete` command.

This example shows how to delete a catalog by providing its unique ID:

edbctl catalog delete --id 11ee9cd2-7696-11f0-800c-b7b1f62bfc07

This example shows how to delete a catalog by providing its unique ID using non-interactive operation:

edbctl catalog delete --id 11ee9cd2-7696-11f0-800c-b7b1f62bfc07 -y

edbctl catalog edit

The edbctl catalog edit command is used to modify the configuration of an existing catalog, primarily by updating its tags and other metadata.

This command requires the unique catalog ID to ensure the correct resource is edited and the mandatory --tags option to specify the new tags.

edbctl catalog edit [options]

Where options are:

  -i, --id string                 The unique ID of the catalog to edit (required).
      --tags strings              Comma-separated list of tags to assign to the catalog in `name=value` format, where `value` is optional.
  -P, --project string            The name of the project that groups your clusters and other resources. The default is taken from the current configuration context (required).
  -c, --credential string         The name of the credential to use for authentication. The default is taken from the current configuration context (required).
  -I, --interactive               Enables interactive mode for editing.
  -y, --yes                       Auto-confirms all prompts and confirmations, enabling non-interactive operation.
  -h, --help                      Displays help information for the `edit` command.
Important

The --tags option is replacement based. Any existing tags on the catalog that are not included in the command will be removed. To maitain existing tags, you must explicitly list them along with any new tags you wish to add. To remove all tags, use the empty string --tags "".

This example shows how to replace all exsiting tags with a new list (env=blue and team) for a catalog by providing its unique ID:

edbctl catalog edit --id 12c4-7c4a-11f0-932a-cd765vg --tags env=blue,team

This example shows how to remove all tags from a catalog by providing its unique ID:

edbctl catalog edit --id 12c4-7c4a-11f0-932a-cd765vg --tags ""

edbctl catalog list

The edbctl catalog list command is used to display a list of all registered catalogs. This command provides filtering options based on catalog type, ID, cluster information, and the scope (current project or entire estate).

By default, this command lists all catalogs within the current project context.

edbctl catalog list [options]

Where options are:

      --type string               Filter the list by catalog type. Valid values: `project`, `pgd`.
  -i, --id string                 The unique ID of a specific catalog to display.
      --cluster-id string         Filter PGD-type catalogs by a comma-separated list of Cluster IDs.
      --datagroup-id string       Filter PGD-type catalogs by a comma-separated list of Data Group IDs.
      --estate                    If present, lists catalogs across all projects in the estate, rather than just the current project. You will see catalogs for projects where they have a role.
  -P, --project string            Specifies the project to query. The default project is taken from the current configuration context.
  -o, --output string             Sets the output format. The valid values are `table` (default), `json`, `yaml`, `xml`, and `json-raw`.
  -h, --help                      Displays help information for the `list` command.

These examples show how to use different options of edbctl catalog list command.

# List all catalogs in the current project context:
edbctl catalog list

# Filter the list to show only catalogs of type `project`:
edbctl catalog list --type project

# Filter the list to show only catalogs of type `pgd`:
edbctl catalog list --type pgd

# List the details of a single catalog by its unique ID:
edbctl catalog list --id "12c4-7c4a-11f0-932a-cd765vg"

# List catalogs specifically in the project with ID `prj_123`:
edbctl catalog list --project "prj_123"

# List catalogs across all projects in the entire estate:
edbctl catalog list --estate

# List only PGD catalogs associated with the cluster ID `p-123`:
edbctl catalog list --type pgd --cluster-id "p-123"

# List catalogs in JSON format instead of the default table view:
edbctl catalog list --output json