1. Packages
  2. Confluent Provider
  3. API Docs
  4. getTagBinding
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

confluentcloud.getTagBinding

Explore with Pulumi AI

General Availability

confluentcloud.TagBinding describes a Tag Binding data source.

Example Usage

Option #1: Manage multiple Schema Registry clusters in the same Pulumi Stack

import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";

const main = confluentcloud.getTagBinding({
    schemaRegistryCluster: {
        id: essentials.id,
    },
    restEndpoint: essentials.restEndpoint,
    credentials: {
        key: "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
        secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
    },
    tagName: "PII",
    entityName: "lsrc-8wrx70:.:100001",
    entityType: "sr_schema",
});
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

main = confluentcloud.get_tag_binding(schema_registry_cluster={
        "id": essentials["id"],
    },
    rest_endpoint=essentials["restEndpoint"],
    credentials={
        "key": "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
        "secret": "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
    },
    tag_name="PII",
    entity_name="lsrc-8wrx70:.:100001",
    entity_type="sr_schema")
Copy
package main

import (
	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := confluentcloud.LookupTagBinding(ctx, &confluentcloud.LookupTagBindingArgs{
			SchemaRegistryCluster: confluentcloud.GetTagBindingSchemaRegistryCluster{
				Id: essentials.Id,
			},
			RestEndpoint: pulumi.StringRef(essentials.RestEndpoint),
			Credentials: confluentcloud.GetTagBindingCredentials{
				Key:    "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
				Secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
			},
			TagName:    "PII",
			EntityName: "lsrc-8wrx70:.:100001",
			EntityType: "sr_schema",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var main = ConfluentCloud.GetTagBinding.Invoke(new()
    {
        SchemaRegistryCluster = new ConfluentCloud.Inputs.GetTagBindingSchemaRegistryClusterInputArgs
        {
            Id = essentials.Id,
        },
        RestEndpoint = essentials.RestEndpoint,
        Credentials = new ConfluentCloud.Inputs.GetTagBindingCredentialsInputArgs
        {
            Key = "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
            Secret = "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
        },
        TagName = "PII",
        EntityName = "lsrc-8wrx70:.:100001",
        EntityType = "sr_schema",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.ConfluentcloudFunctions;
import com.pulumi.confluentcloud.inputs.GetTagBindingArgs;
import com.pulumi.confluentcloud.inputs.GetTagBindingSchemaRegistryClusterArgs;
import com.pulumi.confluentcloud.inputs.GetTagBindingCredentialsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var main = ConfluentcloudFunctions.getTagBinding(GetTagBindingArgs.builder()
            .schemaRegistryCluster(GetTagBindingSchemaRegistryClusterArgs.builder()
                .id(essentials.id())
                .build())
            .restEndpoint(essentials.restEndpoint())
            .credentials(GetTagBindingCredentialsArgs.builder()
                .key("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>")
                .secret("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>")
                .build())
            .tagName("PII")
            .entityName("lsrc-8wrx70:.:100001")
            .entityType("sr_schema")
            .build());

    }
}
Copy
variables:
  main:
    fn::invoke:
      function: confluentcloud:getTagBinding
      arguments:
        schemaRegistryCluster:
          id: ${essentials.id}
        restEndpoint: ${essentials.restEndpoint}
        credentials:
          key: <Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>
          secret: <Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>
        tagName: PII
        entityName: lsrc-8wrx70:.:100001
        entityType: sr_schema
Copy

Option #2: Manage a single Schema Registry cluster in the same Pulumi Stack

import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";

const main = confluentcloud.getTagBinding({
    tagName: "PII",
    entityName: "lsrc-8wrx70:.:100001",
    entityType: "sr_schema",
});
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

main = confluentcloud.get_tag_binding(tag_name="PII",
    entity_name="lsrc-8wrx70:.:100001",
    entity_type="sr_schema")
Copy
package main

import (
	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := confluentcloud.LookupTagBinding(ctx, &confluentcloud.LookupTagBindingArgs{
			TagName:    "PII",
			EntityName: "lsrc-8wrx70:.:100001",
			EntityType: "sr_schema",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var main = ConfluentCloud.GetTagBinding.Invoke(new()
    {
        TagName = "PII",
        EntityName = "lsrc-8wrx70:.:100001",
        EntityType = "sr_schema",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.ConfluentcloudFunctions;
import com.pulumi.confluentcloud.inputs.GetTagBindingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var main = ConfluentcloudFunctions.getTagBinding(GetTagBindingArgs.builder()
            .tagName("PII")
            .entityName("lsrc-8wrx70:.:100001")
            .entityType("sr_schema")
            .build());

    }
}
Copy
variables:
  main:
    fn::invoke:
      function: confluentcloud:getTagBinding
      arguments:
        tagName: PII
        entityName: lsrc-8wrx70:.:100001
        entityType: sr_schema
Copy

Note: We also support schema_registry_rest_endpoint instead of catalog_rest_endpoint for the time being.

Using getTagBinding

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTagBinding(args: GetTagBindingArgs, opts?: InvokeOptions): Promise<GetTagBindingResult>
function getTagBindingOutput(args: GetTagBindingOutputArgs, opts?: InvokeOptions): Output<GetTagBindingResult>
Copy
def get_tag_binding(credentials: Optional[GetTagBindingCredentials] = None,
                    entity_name: Optional[str] = None,
                    entity_type: Optional[str] = None,
                    rest_endpoint: Optional[str] = None,
                    schema_registry_cluster: Optional[GetTagBindingSchemaRegistryCluster] = None,
                    tag_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetTagBindingResult
def get_tag_binding_output(credentials: Optional[pulumi.Input[GetTagBindingCredentialsArgs]] = None,
                    entity_name: Optional[pulumi.Input[str]] = None,
                    entity_type: Optional[pulumi.Input[str]] = None,
                    rest_endpoint: Optional[pulumi.Input[str]] = None,
                    schema_registry_cluster: Optional[pulumi.Input[GetTagBindingSchemaRegistryClusterArgs]] = None,
                    tag_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetTagBindingResult]
Copy
func LookupTagBinding(ctx *Context, args *LookupTagBindingArgs, opts ...InvokeOption) (*LookupTagBindingResult, error)
func LookupTagBindingOutput(ctx *Context, args *LookupTagBindingOutputArgs, opts ...InvokeOption) LookupTagBindingResultOutput
Copy

> Note: This function is named LookupTagBinding in the Go SDK.

public static class GetTagBinding 
{
    public static Task<GetTagBindingResult> InvokeAsync(GetTagBindingArgs args, InvokeOptions? opts = null)
    public static Output<GetTagBindingResult> Invoke(GetTagBindingInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTagBindingResult> getTagBinding(GetTagBindingArgs args, InvokeOptions options)
public static Output<GetTagBindingResult> getTagBinding(GetTagBindingArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: confluentcloud:index/getTagBinding:getTagBinding
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EntityName This property is required. string
The qualified name of the entity, for example, ${data.confluent_schema_registry_cluster.essentials.id}:.:${confluent_schema.purchase.schema_identifier}, ${data.confluent_schema_registry_cluster.essentials.id}:${confluent_kafka_cluster.basic.id}:${confluent_kafka_topic.purchase.topic_name}. Refer to the Examples of qualified names to see the full list of supported values for the entity_name attribute.
EntityType This property is required. string

The entity type, for example, sr_schema.

Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

TagName This property is required. string
The name of the tag to be applied, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.
Credentials Pulumi.ConfluentCloud.Inputs.GetTagBindingCredentials
RestEndpoint string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster Pulumi.ConfluentCloud.Inputs.GetTagBindingSchemaRegistryCluster
EntityName This property is required. string
The qualified name of the entity, for example, ${data.confluent_schema_registry_cluster.essentials.id}:.:${confluent_schema.purchase.schema_identifier}, ${data.confluent_schema_registry_cluster.essentials.id}:${confluent_kafka_cluster.basic.id}:${confluent_kafka_topic.purchase.topic_name}. Refer to the Examples of qualified names to see the full list of supported values for the entity_name attribute.
EntityType This property is required. string

The entity type, for example, sr_schema.

Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

TagName This property is required. string
The name of the tag to be applied, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.
Credentials GetTagBindingCredentials
RestEndpoint string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster GetTagBindingSchemaRegistryCluster
entityName This property is required. String
The qualified name of the entity, for example, ${data.confluent_schema_registry_cluster.essentials.id}:.:${confluent_schema.purchase.schema_identifier}, ${data.confluent_schema_registry_cluster.essentials.id}:${confluent_kafka_cluster.basic.id}:${confluent_kafka_topic.purchase.topic_name}. Refer to the Examples of qualified names to see the full list of supported values for the entity_name attribute.
entityType This property is required. String

The entity type, for example, sr_schema.

Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

tagName This property is required. String
The name of the tag to be applied, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.
credentials GetTagBindingCredentials
restEndpoint String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster GetTagBindingSchemaRegistryCluster
entityName This property is required. string
The qualified name of the entity, for example, ${data.confluent_schema_registry_cluster.essentials.id}:.:${confluent_schema.purchase.schema_identifier}, ${data.confluent_schema_registry_cluster.essentials.id}:${confluent_kafka_cluster.basic.id}:${confluent_kafka_topic.purchase.topic_name}. Refer to the Examples of qualified names to see the full list of supported values for the entity_name attribute.
entityType This property is required. string

The entity type, for example, sr_schema.

Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

tagName This property is required. string
The name of the tag to be applied, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.
credentials GetTagBindingCredentials
restEndpoint string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster GetTagBindingSchemaRegistryCluster
entity_name This property is required. str
The qualified name of the entity, for example, ${data.confluent_schema_registry_cluster.essentials.id}:.:${confluent_schema.purchase.schema_identifier}, ${data.confluent_schema_registry_cluster.essentials.id}:${confluent_kafka_cluster.basic.id}:${confluent_kafka_topic.purchase.topic_name}. Refer to the Examples of qualified names to see the full list of supported values for the entity_name attribute.
entity_type This property is required. str

The entity type, for example, sr_schema.

Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

tag_name This property is required. str
The name of the tag to be applied, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.
credentials GetTagBindingCredentials
rest_endpoint str
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schema_registry_cluster GetTagBindingSchemaRegistryCluster
entityName This property is required. String
The qualified name of the entity, for example, ${data.confluent_schema_registry_cluster.essentials.id}:.:${confluent_schema.purchase.schema_identifier}, ${data.confluent_schema_registry_cluster.essentials.id}:${confluent_kafka_cluster.basic.id}:${confluent_kafka_topic.purchase.topic_name}. Refer to the Examples of qualified names to see the full list of supported values for the entity_name attribute.
entityType This property is required. String

The entity type, for example, sr_schema.

Note: A Schema Registry API key consists of a key and a secret. Schema Registry API keys are required to interact with Schema Registry clusters in Confluent Cloud. Each Schema Registry API key is valid for one specific Schema Registry cluster.

tagName This property is required. String
The name of the tag to be applied, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.
credentials Property Map
restEndpoint String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Property Map

getTagBinding Result

The following output properties are available:

EntityName string
EntityType string
Id string
(Required String) The ID of the Tag Binding, in the format <Schema Registry Cluster Id>/<Tag Name>/<Entity Name>/<Entity Type>, for example, lsrc-8wrx70/PII/lsrc-8wrx70:.:100001/sr_schema.
TagName string
Credentials Pulumi.ConfluentCloud.Outputs.GetTagBindingCredentials
RestEndpoint string
SchemaRegistryCluster Pulumi.ConfluentCloud.Outputs.GetTagBindingSchemaRegistryCluster
EntityName string
EntityType string
Id string
(Required String) The ID of the Tag Binding, in the format <Schema Registry Cluster Id>/<Tag Name>/<Entity Name>/<Entity Type>, for example, lsrc-8wrx70/PII/lsrc-8wrx70:.:100001/sr_schema.
TagName string
Credentials GetTagBindingCredentials
RestEndpoint string
SchemaRegistryCluster GetTagBindingSchemaRegistryCluster
entityName String
entityType String
id String
(Required String) The ID of the Tag Binding, in the format <Schema Registry Cluster Id>/<Tag Name>/<Entity Name>/<Entity Type>, for example, lsrc-8wrx70/PII/lsrc-8wrx70:.:100001/sr_schema.
tagName String
credentials GetTagBindingCredentials
restEndpoint String
schemaRegistryCluster GetTagBindingSchemaRegistryCluster
entityName string
entityType string
id string
(Required String) The ID of the Tag Binding, in the format <Schema Registry Cluster Id>/<Tag Name>/<Entity Name>/<Entity Type>, for example, lsrc-8wrx70/PII/lsrc-8wrx70:.:100001/sr_schema.
tagName string
credentials GetTagBindingCredentials
restEndpoint string
schemaRegistryCluster GetTagBindingSchemaRegistryCluster
entity_name str
entity_type str
id str
(Required String) The ID of the Tag Binding, in the format <Schema Registry Cluster Id>/<Tag Name>/<Entity Name>/<Entity Type>, for example, lsrc-8wrx70/PII/lsrc-8wrx70:.:100001/sr_schema.
tag_name str
credentials GetTagBindingCredentials
rest_endpoint str
schema_registry_cluster GetTagBindingSchemaRegistryCluster
entityName String
entityType String
id String
(Required String) The ID of the Tag Binding, in the format <Schema Registry Cluster Id>/<Tag Name>/<Entity Name>/<Entity Type>, for example, lsrc-8wrx70/PII/lsrc-8wrx70:.:100001/sr_schema.
tagName String
credentials Property Map
restEndpoint String
schemaRegistryCluster Property Map

Supporting Types

GetTagBindingCredentials

Key This property is required. string
The Schema Registry API Key.
Secret This property is required. string
The Schema Registry API Secret.
Key This property is required. string
The Schema Registry API Key.
Secret This property is required. string
The Schema Registry API Secret.
key This property is required. String
The Schema Registry API Key.
secret This property is required. String
The Schema Registry API Secret.
key This property is required. string
The Schema Registry API Key.
secret This property is required. string
The Schema Registry API Secret.
key This property is required. str
The Schema Registry API Key.
secret This property is required. str
The Schema Registry API Secret.
key This property is required. String
The Schema Registry API Key.
secret This property is required. String
The Schema Registry API Secret.

GetTagBindingSchemaRegistryCluster

Id This property is required. string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
Id This property is required. string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. String
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. str
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id This property is required. String
The ID of the Schema Registry cluster, for example, lsrc-abc123.

Package Details

Repository
Confluent Cloud pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes
This Pulumi package is based on the confluent Terraform Provider.