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

confluentcloud.Tag

Explore with Pulumi AI

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

    General Availability

    confluentcloud.Tag provides a Tag resource that enables creating, editing, and deleting Tags on Confluent Cloud.

    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 = new confluentcloud.Tag("pii", {
        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",
        description: "PII tag",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    pii = confluentcloud.Tag("pii",
        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",
        description="PII tag")
    
    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.NewTag(ctx, "pii", &confluentcloud.TagArgs{
    			SchemaRegistryCluster: &confluentcloud.TagSchemaRegistryClusterArgs{
    				Id: pulumi.Any(essentials.Id),
    			},
    			RestEndpoint: pulumi.Any(essentials.RestEndpoint),
    			Credentials: &confluentcloud.TagCredentialsArgs{
    				Key:    pulumi.String("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>"),
    				Secret: pulumi.String("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>"),
    			},
    			Name:        pulumi.String("PII"),
    			Description: pulumi.String("PII tag"),
    		})
    		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 = new ConfluentCloud.Tag("pii", new()
        {
            SchemaRegistryCluster = new ConfluentCloud.Inputs.TagSchemaRegistryClusterArgs
            {
                Id = essentials.Id,
            },
            RestEndpoint = essentials.RestEndpoint,
            Credentials = new ConfluentCloud.Inputs.TagCredentialsArgs
            {
                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",
            Description = "PII tag",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.Tag;
    import com.pulumi.confluentcloud.TagArgs;
    import com.pulumi.confluentcloud.inputs.TagSchemaRegistryClusterArgs;
    import com.pulumi.confluentcloud.inputs.TagCredentialsArgs;
    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) {
            var pii = new Tag("pii", TagArgs.builder()
                .schemaRegistryCluster(TagSchemaRegistryClusterArgs.builder()
                    .id(essentials.id())
                    .build())
                .restEndpoint(essentials.restEndpoint())
                .credentials(TagCredentialsArgs.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")
                .description("PII tag")
                .build());
    
        }
    }
    
    resources:
      pii:
        type: confluentcloud:Tag
        properties:
          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
          description: PII tag
    

    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 = new confluentcloud.Tag("pii", {
        name: "PII",
        description: "PII tag",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    pii = confluentcloud.Tag("pii",
        name="PII",
        description="PII tag")
    
    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.NewTag(ctx, "pii", &confluentcloud.TagArgs{
    			Name:        pulumi.String("PII"),
    			Description: pulumi.String("PII tag"),
    		})
    		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 = new ConfluentCloud.Tag("pii", new()
        {
            Name = "PII",
            Description = "PII tag",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.Tag;
    import com.pulumi.confluentcloud.TagArgs;
    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) {
            var pii = new Tag("pii", TagArgs.builder()
                .name("PII")
                .description("PII tag")
                .build());
    
        }
    }
    
    resources:
      pii:
        type: confluentcloud:Tag
        properties:
          name: PII
          description: PII tag
    

    Getting Started

    The following end-to-end example might help to get started with Stream Catalog:

    • stream-catalog

    Create Tag Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Tag(name: string, args?: TagArgs, opts?: CustomResourceOptions);
    @overload
    def Tag(resource_name: str,
            args: Optional[TagArgs] = None,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Tag(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            credentials: Optional[TagCredentialsArgs] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            rest_endpoint: Optional[str] = None,
            schema_registry_cluster: Optional[TagSchemaRegistryClusterArgs] = None)
    func NewTag(ctx *Context, name string, args *TagArgs, opts ...ResourceOption) (*Tag, error)
    public Tag(string name, TagArgs? args = null, CustomResourceOptions? opts = null)
    public Tag(String name, TagArgs args)
    public Tag(String name, TagArgs args, CustomResourceOptions options)
    
    type: confluentcloud:Tag
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TagArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TagArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var tagResource = new ConfluentCloud.Tag("tagResource", new()
    {
        Credentials = new ConfluentCloud.Inputs.TagCredentialsArgs
        {
            Key = "string",
            Secret = "string",
        },
        Description = "string",
        Name = "string",
        RestEndpoint = "string",
        SchemaRegistryCluster = new ConfluentCloud.Inputs.TagSchemaRegistryClusterArgs
        {
            Id = "string",
        },
    });
    
    example, err := confluentcloud.NewTag(ctx, "tagResource", &confluentcloud.TagArgs{
    	Credentials: &confluentcloud.TagCredentialsArgs{
    		Key:    pulumi.String("string"),
    		Secret: pulumi.String("string"),
    	},
    	Description:  pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	RestEndpoint: pulumi.String("string"),
    	SchemaRegistryCluster: &confluentcloud.TagSchemaRegistryClusterArgs{
    		Id: pulumi.String("string"),
    	},
    })
    
    var tagResource = new Tag("tagResource", TagArgs.builder()
        .credentials(TagCredentialsArgs.builder()
            .key("string")
            .secret("string")
            .build())
        .description("string")
        .name("string")
        .restEndpoint("string")
        .schemaRegistryCluster(TagSchemaRegistryClusterArgs.builder()
            .id("string")
            .build())
        .build());
    
    tag_resource = confluentcloud.Tag("tagResource",
        credentials={
            "key": "string",
            "secret": "string",
        },
        description="string",
        name="string",
        rest_endpoint="string",
        schema_registry_cluster={
            "id": "string",
        })
    
    const tagResource = new confluentcloud.Tag("tagResource", {
        credentials: {
            key: "string",
            secret: "string",
        },
        description: "string",
        name: "string",
        restEndpoint: "string",
        schemaRegistryCluster: {
            id: "string",
        },
    });
    
    type: confluentcloud:Tag
    properties:
        credentials:
            key: string
            secret: string
        description: string
        name: string
        restEndpoint: string
        schemaRegistryCluster:
            id: string
    

    Tag Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Tag resource accepts the following input properties:

    Credentials Pulumi.ConfluentCloud.Inputs.TagCredentials
    The Cluster API Credentials.
    Description string
    The description of the tag to be created.
    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.
    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.TagSchemaRegistryCluster
    Credentials TagCredentialsArgs
    The Cluster API Credentials.
    Description string
    The description of the tag to be created.
    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.
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster TagSchemaRegistryClusterArgs
    credentials TagCredentials
    The Cluster API Credentials.
    description String
    The description of the tag to be created.
    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.
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster TagSchemaRegistryCluster
    credentials TagCredentials
    The Cluster API Credentials.
    description string
    The description of the tag to be created.
    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.
    restEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster TagSchemaRegistryCluster
    credentials TagCredentialsArgs
    The Cluster API Credentials.
    description str
    The description of the tag to be created.
    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.
    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 TagSchemaRegistryClusterArgs
    credentials Property Map
    The Cluster API Credentials.
    description String
    The description of the tag to be created.
    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.
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Tag resource produces the following output properties:

    EntityTypes List<string>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    (Optional Integer) The version, for example, 1.
    EntityTypes []string
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    (Optional Integer) The version, for example, 1.
    entityTypes List<String>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    id String
    The provider-assigned unique ID for this managed resource.
    version Integer
    (Optional Integer) The version, for example, 1.
    entityTypes string[]
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    (Optional Integer) The version, for example, 1.
    entity_types Sequence[str]
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    id str
    The provider-assigned unique ID for this managed resource.
    version int
    (Optional Integer) The version, for example, 1.
    entityTypes List<String>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    (Optional Integer) The version, for example, 1.

    Look up Existing Tag Resource

    Get an existing Tag resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TagState, opts?: CustomResourceOptions): Tag
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            credentials: Optional[TagCredentialsArgs] = None,
            description: Optional[str] = None,
            entity_types: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            rest_endpoint: Optional[str] = None,
            schema_registry_cluster: Optional[TagSchemaRegistryClusterArgs] = None,
            version: Optional[int] = None) -> Tag
    func GetTag(ctx *Context, name string, id IDInput, state *TagState, opts ...ResourceOption) (*Tag, error)
    public static Tag Get(string name, Input<string> id, TagState? state, CustomResourceOptions? opts = null)
    public static Tag get(String name, Output<String> id, TagState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Credentials Pulumi.ConfluentCloud.Inputs.TagCredentials
    The Cluster API Credentials.
    Description string
    The description of the tag to be created.
    EntityTypes List<string>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    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.
    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.TagSchemaRegistryCluster
    Version int
    (Optional Integer) The version, for example, 1.
    Credentials TagCredentialsArgs
    The Cluster API Credentials.
    Description string
    The description of the tag to be created.
    EntityTypes []string
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    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.
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster TagSchemaRegistryClusterArgs
    Version int
    (Optional Integer) The version, for example, 1.
    credentials TagCredentials
    The Cluster API Credentials.
    description String
    The description of the tag to be created.
    entityTypes List<String>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    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.
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster TagSchemaRegistryCluster
    version Integer
    (Optional Integer) The version, for example, 1.
    credentials TagCredentials
    The Cluster API Credentials.
    description string
    The description of the tag to be created.
    entityTypes string[]
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    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.
    restEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster TagSchemaRegistryCluster
    version number
    (Optional Integer) The version, for example, 1.
    credentials TagCredentialsArgs
    The Cluster API Credentials.
    description str
    The description of the tag to be created.
    entity_types Sequence[str]
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    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.
    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 TagSchemaRegistryClusterArgs
    version int
    (Optional Integer) The version, for example, 1.
    credentials Property Map
    The Cluster API Credentials.
    description String
    The description of the tag to be created.
    entityTypes List<String>
    (Optional List of String) The entity types of the tag, this always returns ["cf_entity"]. Refer to the Entity types to learn more about entity types.
    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.
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster Property Map
    version Number
    (Optional Integer) The version, for example, 1.

    Supporting Types

    TagCredentials, TagCredentialsArgs

    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.

    TagSchemaRegistryCluster, TagSchemaRegistryClusterArgs

    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.

    Import

    You can import a Tag by using the Schema Registry cluster ID, Tag name in the format <Schema Registry cluster ID>/<Tag name>, for example:

    $ export IMPORT_SCHEMA_REGISTRY_API_KEY="<schema_registry_api_key>"

    $ export IMPORT_SCHEMA_REGISTRY_API_SECRET="<schema_registry_api_secret>"

    $ export IMPORT_SCHEMA_REGISTRY_REST_ENDPOINT="<schema_registry_rest_endpoint>"

    $ pulumi import confluentcloud:index/tag:Tag pii lsrc-8wrx70/PII
    

    !> Warning: Do not forget to delete terminal command history afterwards for security purposes.

    To learn more about importing existing cloud resources, see Importing resources.

    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