1. Packages
  2. AWS
  3. API Docs
  4. lakeformation
  5. LfTag
AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi

aws.lakeformation.LfTag

Explore with Pulumi AI

Creates an LF-Tag with the specified name and values. Each key must have at least one value. The maximum number of values permitted is 1000.

Example Usage

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

const example = new aws.lakeformation.LfTag("example", {
    key: "module",
    values: [
        "Orders",
        "Sales",
        "Customers",
    ],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.lakeformation.LfTag("example",
    key="module",
    values=[
        "Orders",
        "Sales",
        "Customers",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lakeformation.NewLfTag(ctx, "example", &lakeformation.LfTagArgs{
			Key: pulumi.String("module"),
			Values: pulumi.StringArray{
				pulumi.String("Orders"),
				pulumi.String("Sales"),
				pulumi.String("Customers"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.LakeFormation.LfTag("example", new()
    {
        Key = "module",
        Values = new[]
        {
            "Orders",
            "Sales",
            "Customers",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lakeformation.LfTag;
import com.pulumi.aws.lakeformation.LfTagArgs;
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 example = new LfTag("example", LfTagArgs.builder()
            .key("module")
            .values(            
                "Orders",
                "Sales",
                "Customers")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:lakeformation:LfTag
    properties:
      key: module
      values:
        - Orders
        - Sales
        - Customers
Copy

Create LfTag Resource

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

Constructor syntax

new LfTag(name: string, args: LfTagArgs, opts?: CustomResourceOptions);
@overload
def LfTag(resource_name: str,
          args: LfTagArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def LfTag(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          key: Optional[str] = None,
          values: Optional[Sequence[str]] = None,
          catalog_id: Optional[str] = None)
func NewLfTag(ctx *Context, name string, args LfTagArgs, opts ...ResourceOption) (*LfTag, error)
public LfTag(string name, LfTagArgs args, CustomResourceOptions? opts = null)
public LfTag(String name, LfTagArgs args)
public LfTag(String name, LfTagArgs args, CustomResourceOptions options)
type: aws:lakeformation:LfTag
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LfTagArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LfTagArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LfTagArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LfTagArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LfTagArgs
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 lfTagResource = new Aws.LakeFormation.LfTag("lfTagResource", new()
{
    Key = "string",
    Values = new[]
    {
        "string",
    },
    CatalogId = "string",
});
Copy
example, err := lakeformation.NewLfTag(ctx, "lfTagResource", &lakeformation.LfTagArgs{
	Key: pulumi.String("string"),
	Values: pulumi.StringArray{
		pulumi.String("string"),
	},
	CatalogId: pulumi.String("string"),
})
Copy
var lfTagResource = new LfTag("lfTagResource", LfTagArgs.builder()
    .key("string")
    .values("string")
    .catalogId("string")
    .build());
Copy
lf_tag_resource = aws.lakeformation.LfTag("lfTagResource",
    key="string",
    values=["string"],
    catalog_id="string")
Copy
const lfTagResource = new aws.lakeformation.LfTag("lfTagResource", {
    key: "string",
    values: ["string"],
    catalogId: "string",
});
Copy
type: aws:lakeformation:LfTag
properties:
    catalogId: string
    key: string
    values:
        - string
Copy

LfTag 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 LfTag resource accepts the following input properties:

Key
This property is required.
Changes to this property will trigger replacement.
string
Key-name for the tag.
Values This property is required. List<string>
List of possible values an attribute can take.
CatalogId Changes to this property will trigger replacement. string
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
Key
This property is required.
Changes to this property will trigger replacement.
string
Key-name for the tag.
Values This property is required. []string
List of possible values an attribute can take.
CatalogId Changes to this property will trigger replacement. string
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key
This property is required.
Changes to this property will trigger replacement.
String
Key-name for the tag.
values This property is required. List<String>
List of possible values an attribute can take.
catalogId Changes to this property will trigger replacement. String
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key
This property is required.
Changes to this property will trigger replacement.
string
Key-name for the tag.
values This property is required. string[]
List of possible values an attribute can take.
catalogId Changes to this property will trigger replacement. string
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key
This property is required.
Changes to this property will trigger replacement.
str
Key-name for the tag.
values This property is required. Sequence[str]
List of possible values an attribute can take.
catalog_id Changes to this property will trigger replacement. str
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key
This property is required.
Changes to this property will trigger replacement.
String
Key-name for the tag.
values This property is required. List<String>
List of possible values an attribute can take.
catalogId Changes to this property will trigger replacement. String
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing LfTag Resource

Get an existing LfTag 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?: LfTagState, opts?: CustomResourceOptions): LfTag
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        catalog_id: Optional[str] = None,
        key: Optional[str] = None,
        values: Optional[Sequence[str]] = None) -> LfTag
func GetLfTag(ctx *Context, name string, id IDInput, state *LfTagState, opts ...ResourceOption) (*LfTag, error)
public static LfTag Get(string name, Input<string> id, LfTagState? state, CustomResourceOptions? opts = null)
public static LfTag get(String name, Output<String> id, LfTagState state, CustomResourceOptions options)
resources:  _:    type: aws:lakeformation:LfTag    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CatalogId Changes to this property will trigger replacement. string
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
Key Changes to this property will trigger replacement. string
Key-name for the tag.
Values List<string>
List of possible values an attribute can take.
CatalogId Changes to this property will trigger replacement. string
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
Key Changes to this property will trigger replacement. string
Key-name for the tag.
Values []string
List of possible values an attribute can take.
catalogId Changes to this property will trigger replacement. String
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key Changes to this property will trigger replacement. String
Key-name for the tag.
values List<String>
List of possible values an attribute can take.
catalogId Changes to this property will trigger replacement. string
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key Changes to this property will trigger replacement. string
Key-name for the tag.
values string[]
List of possible values an attribute can take.
catalog_id Changes to this property will trigger replacement. str
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key Changes to this property will trigger replacement. str
Key-name for the tag.
values Sequence[str]
List of possible values an attribute can take.
catalogId Changes to this property will trigger replacement. String
ID of the Data Catalog to create the tag in. If omitted, this defaults to the AWS Account ID.
key Changes to this property will trigger replacement. String
Key-name for the tag.
values List<String>
List of possible values an attribute can take.

Import

Using pulumi import, import Lake Formation LF-Tags using the catalog_id:key. If you have not set a Catalog ID specify the AWS Account ID that the database is in. For example:

$ pulumi import aws:lakeformation/lfTag:LfTag example 123456789012:some_key
Copy

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

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.