1. Registry
  2. Packages
  3. Linode Provider
  4. API Docs
  5. getTag
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi
linode logo linode logo
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi

    Provides information about a Linode Tag, including the objects associated with it.

    For more information, see the Linode APIv4 documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const example = linode.getTag({
        label: "my-tag",
    });
    
    import pulumi
    import pulumi_linode as linode
    
    example = linode.get_tag(label="my-tag")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.GetTag(ctx, &linode.GetTagArgs{
    			Label: "my-tag",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Linode.GetTag.Invoke(new()
        {
            Label = "my-tag",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetTagArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = LinodeFunctions.getTag(GetTagArgs.builder()
                .label("my-tag")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: linode:getTag
          arguments:
            label: my-tag
    
    pulumi {
      required_providers {
        linode = {
          source = "pulumi/linode"
        }
      }
    }
    
    data "linode_gettag" "example" {
      label = "my-tag"
    }
    

    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?: InvokeOutputOptions): Output<GetTagResult>
    def get_tag(label: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetTagResult
    def get_tag_output(label: pulumi.Input[Optional[str]] = None,
                opts: Optional[InvokeOutputOptions] = None) -> Output[GetTagResult]
    func GetTag(ctx *Context, args *GetTagArgs, opts ...InvokeOption) (*GetTagResult, error)
    func GetTagOutput(ctx *Context, args *GetTagOutputArgs, opts ...InvokeOption) GetTagResultOutput

    > Note: This function is named GetTag 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 Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: linode:index/getTag:getTag
      arguments:
        # arguments dictionary
    data "linode_get_tag" "name" {
        # arguments
    }

    The following arguments are supported:

    Label string
    The label of the tag to look up.
    Label string
    The label of the tag to look up.
    label string
    The label of the tag to look up.
    label String
    The label of the tag to look up.
    label string
    The label of the tag to look up.
    label str
    The label of the tag to look up.
    label String
    The label of the tag to look up.

    getTag Result

    The following output properties are available:

    Id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    Label string
    Objects List<GetTagObject>
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:
    Id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    Label string
    Objects []GetTagObject
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:
    id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    label string
    objects list(object)
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:
    id String
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    label String
    objects List<GetTagObject>
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:
    id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    label string
    objects GetTagObject[]
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:
    id str
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    label str
    objects Sequence[GetTagObject]
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:
    id String
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    label String
    objects List<Property Map>
    (Nested Attribute List) A list of objects associated with this tag. Each object has the following attributes:

    Supporting Types

    GetTagObject

    Id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    Type string
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).
    Id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    Type string
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).
    id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    type string
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).
    id String
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    type String
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).
    id string
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    type string
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).
    id str
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    type str
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).
    id String
    The ID of the tagged object. For reservedIpv4Address objects, this is the IP address string.
    type String
    The type of the tagged object (e.g. linode, domain, volume, nodebalancer, reservedIpv4Address).

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo linode logo
    Viewing docs for Linode v6.6.0
    published on Tuesday, Sep 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial