Creating and Managing Labels

Cloud Bigtable provides the option to add labels to your instances. Labels are key-value pairs that you can use to group related instances and store metadata about an instance.

This page explains how you can use labels with your Cloud Bigtable instances. It also describes how to add, update, and remove the labels for an instance.

What are labels?

A label is a key-value pair that helps you organize your Google Cloud Platform Cloud Bigtable instances. You can attach a label to each resource, then filter the resources based on their labels. Information about labels is forwarded to the billing system, so you can break down your billing charges by label.

Common uses of labels

Here are some common use cases for labels:

  • Team or cost center labels: Add labels based on team or cost center to distinguish Cloud Bigtable instances owned by different teams (for example, team:research and team:analytics). You can use this type of label for cost accounting or budgeting.

  • Component labels: For example, component:redis, component:frontend, component:ingest, and component:dashboard.

  • Environment or stage labels: For example, environment:production and environment:test.

  • Owner or contact labels: Add labels based on the owner or a primary contact for Cloud Bigtable instances.

  • State labels: For example, state:active, state:readytodelete, and state:archive.

Requirements for labels

The labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters, and cannot be empty. Values can be empty, and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

Adding or updating an instance's labels

After you create a Cloud Bigtable instance, you can use the Google Cloud Platform Console to add labels to the instance and update existing labels. You can also use the RPC Admin API or the REST Admin API to add or update labels.

To add or update labels for a Cloud Bigtable instance using the GCP Console:

  1. Open the list of Cloud Bigtable instances in the GCP Console.

    Open the instance list

  2. Check the box next to each instance whose labels you want to modify.

  3. If the Labels panel is not visible, click Show info panel in the upper right corner to open it.
  4. Add and update labels as needed.

    To add a new label, click Add label, then type the key and value for the label.

    To modify an existing label, update its value. You cannot change the key for an existing label.

  5. Click Save to save your changes.

Removing a label from an instance

To remove a label from a Cloud Bigtable instance using the GCP Console:

  1. Open the list of Cloud Bigtable instances in the GCP Console.

    Open the instance list

  2. Check the box next to each instance whose labels you want to remove.

  3. If the Labels panel is not visible, click Show info panel in the upper right corner to open it.
  4. Click the X next to each label that you want to remove.
  5. Click Save to save your changes.

What's next

Learn how to modify other properties of a Cloud Bigtable instance.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Bigtable Documentation