Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 60fff3d

Browse files
committed
samples: Add examples on adding tags to instances
1 parent be51db4 commit 60fff3d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public void createProdInstance() {
107107
CreateInstanceRequest.of(instanceId)
108108
.addCluster(clusterId, "us-central1-f", 3, StorageType.SSD)
109109
.setType(Instance.Type.PRODUCTION)
110-
.addLabel("department", "accounting");
110+
.addLabel("department", "accounting")
111+
.addTag("tagKeys/12345", "tagValues/45678");
111112
// Creates a production instance with the given request.
112113
try {
113114
Instance instance = adminClient.createInstance(createInstanceRequest);

0 commit comments

Comments
 (0)