1. Packages
  2. Confluent Provider
  3. API Docs
  4. getTag
Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

confluentcloud.getTag

Explore with Pulumi AI

confluentcloud logo
Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

    General Availability

    confluentcloud.Tag describes a Tag 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 pii = confluentcloud.getTag({
        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>",
        },
        name: "PII",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    pii = confluentcloud.get_tag(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>",
        },
        name="PII")
    
    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.LookupTag(ctx, &confluentcloud.LookupTagArgs{
    			SchemaRegistryCluster: confluentcloud.GetTagSchemaRegistryCluster{
    				Id: essentials.Id,
    			},
    			RestEndpoint: pulumi.StringRef(essentials.RestEndpoint),
    			Credentials: confluentcloud.GetTagCredentials{
    				Key:    "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
    				Secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
    			},
    			Name: "PII",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var pii = ConfluentCloud.GetTag.Invoke(new()
        {
            SchemaRegistryCluster = new ConfluentCloud.Inputs.GetTagSchemaRegistryClusterInputArgs
            {
                Id = essentials.Id,
            },
            RestEndpoint = essentials.RestEndpoint,
            Credentials = new ConfluentCloud.Inputs.GetTagCredentialsInputArgs
            {
                Key = "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
                Secret = "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
            },
            Name = "PII",
        });
    
    });
    
    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.GetTagArgs;
    import com.pulumi.confluentcloud.inputs.GetTagSchemaRegistryClusterArgs;
    import com.pulumi.confluentcloud.inputs.GetTagCredentialsArgs;
    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 pii = ConfluentcloudFunctions.getTag(GetTagArgs.builder()
                .schemaRegistryCluster(GetTagSchemaRegistryClusterArgs.builder()
                    .id(essentials.id())
                    .build())
                .restEndpoint(essentials.restEndpoint())
                .credentials(GetTagCredentialsArgs.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())
                .name("PII")
                .build());
    
        }
    }
    
    variables:
      pii:
        fn::invoke:
          Function: confluentcloud:getTag
          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>
            name: PII
    

    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 pii = confluentcloud.getTag({
        name: "PII",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    pii = confluentcloud.get_tag(name="PII")
    
    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.LookupTag(ctx, &confluentcloud.LookupTagArgs{
    			Name: "PII",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var pii = ConfluentCloud.GetTag.Invoke(new()
        {
            Name = "PII",
        });
    
    });
    
    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.GetTagArgs;
    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 pii = ConfluentcloudFunctions.getTag(GetTagArgs.builder()
                .name("PII")
                .build());
    
        }
    }
    
    variables:
      pii:
        fn::invoke:
          Function: confluentcloud:getTag
          Arguments:
            name: PII
    

    Using getTag

    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 getTag(args: GetTagArgs, opts?: InvokeOptions): Promise<GetTagResult>
    function getTagOutput(args: GetTagOutputArgs, opts?: InvokeOptions): Output<GetTagResult>
    def get_tag(credentials: Optional[GetTagCredentials] = None,
                name: Optional[str] = None,
                rest_endpoint: Optional[str] = None,
                schema_registry_cluster: Optional[GetTagSchemaRegistryCluster] = None,
                opts: Optional[InvokeOptions] = None) -> GetTagResult
    def get_tag_output(credentials: Optional[pulumi.Input[GetTagCredentialsArgs]] = None,
                name: Optional[pulumi.Input[str]] = None,
                rest_endpoint: Optional[pulumi.Input[str]] = None,
                schema_registry_cluster: Optional[pulumi.Input[GetTagSchemaRegistryClusterArgs]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetTagResult]
    func LookupTag(ctx *Context, args *LookupTagArgs, opts ...InvokeOption) (*LookupTagResult, error)
    func LookupTagOutput(ctx *Context, args *LookupTagOutputArgs, opts ...InvokeOption) LookupTagResultOutput

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

    public static class GetTag 
    {
        public static Task<GetTagResult> InvokeAsync(GetTagArgs args, InvokeOptions? opts = null)
        public static Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: confluentcloud:index/getTag:getTag
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    The name of the tag, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.

    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.

    Credentials Pulumi.ConfluentCloud.Inputs.GetTagCredentials
    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.GetTagSchemaRegistryCluster
    Name string

    The name of the tag, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.

    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.

    Credentials GetTagCredentials
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster GetTagSchemaRegistryCluster
    name String

    The name of the tag, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.

    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.

    credentials GetTagCredentials
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster GetTagSchemaRegistryCluster
    name string

    The name of the tag, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.

    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.

    credentials GetTagCredentials
    restEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster GetTagSchemaRegistryCluster
    name str

    The name of the tag, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.

    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.

    credentials GetTagCredentials
    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 GetTagSchemaRegistryCluster
    name String

    The name of the tag, for example, PII. The name must not be empty and consist of a letter followed by a sequence of letter, number, space, or _ characters.

    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.

    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

    getTag Result

    The following output properties are available:

    Description string
    (Optional String) The description of the tag.
    EntityTypes List<string>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"].
    Id string
    (Required String) The ID of the Tag, in the format <Schema Registry cluster ID>/<Tag name>, for example, lsrc-8wrx70/PII.
    Name string
    Version int
    (Optional Integer) The version, for example, 1.
    Credentials Pulumi.ConfluentCloud.Outputs.GetTagCredentials
    RestEndpoint string
    SchemaRegistryCluster Pulumi.ConfluentCloud.Outputs.GetTagSchemaRegistryCluster
    Description string
    (Optional String) The description of the tag.
    EntityTypes []string
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"].
    Id string
    (Required String) The ID of the Tag, in the format <Schema Registry cluster ID>/<Tag name>, for example, lsrc-8wrx70/PII.
    Name string
    Version int
    (Optional Integer) The version, for example, 1.
    Credentials GetTagCredentials
    RestEndpoint string
    SchemaRegistryCluster GetTagSchemaRegistryCluster
    description String
    (Optional String) The description of the tag.
    entityTypes List<String>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"].
    id String
    (Required String) The ID of the Tag, in the format <Schema Registry cluster ID>/<Tag name>, for example, lsrc-8wrx70/PII.
    name String
    version Integer
    (Optional Integer) The version, for example, 1.
    credentials GetTagCredentials
    restEndpoint String
    schemaRegistryCluster GetTagSchemaRegistryCluster
    description string
    (Optional String) The description of the tag.
    entityTypes string[]
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"].
    id string
    (Required String) The ID of the Tag, in the format <Schema Registry cluster ID>/<Tag name>, for example, lsrc-8wrx70/PII.
    name string
    version number
    (Optional Integer) The version, for example, 1.
    credentials GetTagCredentials
    restEndpoint string
    schemaRegistryCluster GetTagSchemaRegistryCluster
    description str
    (Optional String) The description of the tag.
    entity_types Sequence[str]
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"].
    id str
    (Required String) The ID of the Tag, in the format <Schema Registry cluster ID>/<Tag name>, for example, lsrc-8wrx70/PII.
    name str
    version int
    (Optional Integer) The version, for example, 1.
    credentials GetTagCredentials
    rest_endpoint str
    schema_registry_cluster GetTagSchemaRegistryCluster
    description String
    (Optional String) The description of the tag.
    entityTypes List<String>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"].
    id String
    (Required String) The ID of the Tag, in the format <Schema Registry cluster ID>/<Tag name>, for example, lsrc-8wrx70/PII.
    name String
    version Number
    (Optional Integer) The version, for example, 1.
    credentials Property Map
    restEndpoint String
    schemaRegistryCluster Property Map

    Supporting Types

    GetTagCredentials

    Key string
    The Schema Registry API Key.
    Secret string
    The Schema Registry API Secret.
    Key string
    The Schema Registry API Key.
    Secret string
    The Schema Registry API Secret.
    key String
    The Schema Registry API Key.
    secret String
    The Schema Registry API Secret.
    key string
    The Schema Registry API Key.
    secret string
    The Schema Registry API Secret.
    key str
    The Schema Registry API Key.
    secret str
    The Schema Registry API Secret.
    key String
    The Schema Registry API Key.
    secret String
    The Schema Registry API Secret.

    GetTagSchemaRegistryCluster

    Id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    Id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id String
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id str
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id 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.
    confluentcloud logo
    Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi