snowflake.TagAssociation
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
const database = new snowflake.Database("database", {name: "database"});
const schema = new snowflake.Schema("schema", {
name: "schema",
database: database.name,
});
const tag = new snowflake.Tag("tag", {
name: "cost_center",
database: database.name,
schema: schema.name,
allowedValues: [
"finance",
"engineering",
],
});
const dbAssociation = new snowflake.TagAssociation("db_association", {
objectIdentifiers: [{
name: database.name,
}],
objectType: "DATABASE",
tagId: tag.id,
tagValue: "finance",
});
const test = new snowflake.Table("test", {
database: testSnowflakeDatabase.name,
schema: testSnowflakeSchema.name,
name: "TABLE_NAME",
comment: "Terraform example table",
columns: [
{
name: "column1",
type: "VARIANT",
},
{
name: "column2",
type: "VARCHAR(16)",
},
],
});
const tableAssociation = new snowflake.TagAssociation("table_association", {
objectIdentifiers: [{
name: test.name,
database: testSnowflakeDatabase.name,
schema: testSnowflakeSchema.name,
}],
objectType: "TABLE",
tagId: testSnowflakeTag.id,
tagValue: "engineering",
});
const columnAssociation = new snowflake.TagAssociation("column_association", {
objectIdentifiers: [{
name: pulumi.interpolate`${test.name}.column_name`,
database: testSnowflakeDatabase.name,
schema: testSnowflakeSchema.name,
}],
objectType: "COLUMN",
tagId: testSnowflakeTag.id,
tagValue: "engineering",
});
import pulumi
import pulumi_snowflake as snowflake
database = snowflake.Database("database", name="database")
schema = snowflake.Schema("schema",
name="schema",
database=database.name)
tag = snowflake.Tag("tag",
name="cost_center",
database=database.name,
schema=schema.name,
allowed_values=[
"finance",
"engineering",
])
db_association = snowflake.TagAssociation("db_association",
object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
name=database.name,
)],
object_type="DATABASE",
tag_id=tag.id,
tag_value="finance")
test = snowflake.Table("test",
database=test_snowflake_database["name"],
schema=test_snowflake_schema["name"],
name="TABLE_NAME",
comment="Terraform example table",
columns=[
snowflake.TableColumnArgs(
name="column1",
type="VARIANT",
),
snowflake.TableColumnArgs(
name="column2",
type="VARCHAR(16)",
),
])
table_association = snowflake.TagAssociation("table_association",
object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
name=test.name,
database=test_snowflake_database["name"],
schema=test_snowflake_schema["name"],
)],
object_type="TABLE",
tag_id=test_snowflake_tag["id"],
tag_value="engineering")
column_association = snowflake.TagAssociation("column_association",
object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
name=test.name.apply(lambda name: f"{name}.column_name"),
database=test_snowflake_database["name"],
schema=test_snowflake_schema["name"],
)],
object_type="COLUMN",
tag_id=test_snowflake_tag["id"],
tag_value="engineering")
package main
import (
"fmt"
"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
database, err := snowflake.NewDatabase(ctx, "database", &snowflake.DatabaseArgs{
Name: pulumi.String("database"),
})
if err != nil {
return err
}
schema, err := snowflake.NewSchema(ctx, "schema", &snowflake.SchemaArgs{
Name: pulumi.String("schema"),
Database: database.Name,
})
if err != nil {
return err
}
tag, err := snowflake.NewTag(ctx, "tag", &snowflake.TagArgs{
Name: pulumi.String("cost_center"),
Database: database.Name,
Schema: schema.Name,
AllowedValues: pulumi.StringArray{
pulumi.String("finance"),
pulumi.String("engineering"),
},
})
if err != nil {
return err
}
_, err = snowflake.NewTagAssociation(ctx, "db_association", &snowflake.TagAssociationArgs{
ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
&snowflake.TagAssociationObjectIdentifierArgs{
Name: database.Name,
},
},
ObjectType: pulumi.String("DATABASE"),
TagId: tag.ID(),
TagValue: pulumi.String("finance"),
})
if err != nil {
return err
}
test, err := snowflake.NewTable(ctx, "test", &snowflake.TableArgs{
Database: pulumi.Any(testSnowflakeDatabase.Name),
Schema: pulumi.Any(testSnowflakeSchema.Name),
Name: pulumi.String("TABLE_NAME"),
Comment: pulumi.String("Terraform example table"),
Columns: snowflake.TableColumnArray{
&snowflake.TableColumnArgs{
Name: pulumi.String("column1"),
Type: pulumi.String("VARIANT"),
},
&snowflake.TableColumnArgs{
Name: pulumi.String("column2"),
Type: pulumi.String("VARCHAR(16)"),
},
},
})
if err != nil {
return err
}
_, err = snowflake.NewTagAssociation(ctx, "table_association", &snowflake.TagAssociationArgs{
ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
&snowflake.TagAssociationObjectIdentifierArgs{
Name: test.Name,
Database: pulumi.Any(testSnowflakeDatabase.Name),
Schema: pulumi.Any(testSnowflakeSchema.Name),
},
},
ObjectType: pulumi.String("TABLE"),
TagId: pulumi.Any(testSnowflakeTag.Id),
TagValue: pulumi.String("engineering"),
})
if err != nil {
return err
}
_, err = snowflake.NewTagAssociation(ctx, "column_association", &snowflake.TagAssociationArgs{
ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
&snowflake.TagAssociationObjectIdentifierArgs{
Name: test.Name.ApplyT(func(name string) (string, error) {
return fmt.Sprintf("%v.column_name", name), nil
}).(pulumi.StringOutput),
Database: pulumi.Any(testSnowflakeDatabase.Name),
Schema: pulumi.Any(testSnowflakeSchema.Name),
},
},
ObjectType: pulumi.String("COLUMN"),
TagId: pulumi.Any(testSnowflakeTag.Id),
TagValue: pulumi.String("engineering"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;
return await Deployment.RunAsync(() =>
{
var database = new Snowflake.Database("database", new()
{
Name = "database",
});
var schema = new Snowflake.Schema("schema", new()
{
Name = "schema",
Database = database.Name,
});
var tag = new Snowflake.Tag("tag", new()
{
Name = "cost_center",
Database = database.Name,
Schema = schema.Name,
AllowedValues = new[]
{
"finance",
"engineering",
},
});
var dbAssociation = new Snowflake.TagAssociation("db_association", new()
{
ObjectIdentifiers = new[]
{
new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
{
Name = database.Name,
},
},
ObjectType = "DATABASE",
TagId = tag.Id,
TagValue = "finance",
});
var test = new Snowflake.Table("test", new()
{
Database = testSnowflakeDatabase.Name,
Schema = testSnowflakeSchema.Name,
Name = "TABLE_NAME",
Comment = "Terraform example table",
Columns = new[]
{
new Snowflake.Inputs.TableColumnArgs
{
Name = "column1",
Type = "VARIANT",
},
new Snowflake.Inputs.TableColumnArgs
{
Name = "column2",
Type = "VARCHAR(16)",
},
},
});
var tableAssociation = new Snowflake.TagAssociation("table_association", new()
{
ObjectIdentifiers = new[]
{
new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
{
Name = test.Name,
Database = testSnowflakeDatabase.Name,
Schema = testSnowflakeSchema.Name,
},
},
ObjectType = "TABLE",
TagId = testSnowflakeTag.Id,
TagValue = "engineering",
});
var columnAssociation = new Snowflake.TagAssociation("column_association", new()
{
ObjectIdentifiers = new[]
{
new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
{
Name = test.Name.Apply(name => $"{name}.column_name"),
Database = testSnowflakeDatabase.Name,
Schema = testSnowflakeSchema.Name,
},
},
ObjectType = "COLUMN",
TagId = testSnowflakeTag.Id,
TagValue = "engineering",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.Database;
import com.pulumi.snowflake.DatabaseArgs;
import com.pulumi.snowflake.Schema;
import com.pulumi.snowflake.SchemaArgs;
import com.pulumi.snowflake.Tag;
import com.pulumi.snowflake.TagArgs;
import com.pulumi.snowflake.TagAssociation;
import com.pulumi.snowflake.TagAssociationArgs;
import com.pulumi.snowflake.inputs.TagAssociationObjectIdentifierArgs;
import com.pulumi.snowflake.Table;
import com.pulumi.snowflake.TableArgs;
import com.pulumi.snowflake.inputs.TableColumnArgs;
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 database = new Database("database", DatabaseArgs.builder()
.name("database")
.build());
var schema = new Schema("schema", SchemaArgs.builder()
.name("schema")
.database(database.name())
.build());
var tag = new Tag("tag", TagArgs.builder()
.name("cost_center")
.database(database.name())
.schema(schema.name())
.allowedValues(
"finance",
"engineering")
.build());
var dbAssociation = new TagAssociation("dbAssociation", TagAssociationArgs.builder()
.objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
.name(database.name())
.build())
.objectType("DATABASE")
.tagId(tag.id())
.tagValue("finance")
.build());
var test = new Table("test", TableArgs.builder()
.database(testSnowflakeDatabase.name())
.schema(testSnowflakeSchema.name())
.name("TABLE_NAME")
.comment("Terraform example table")
.columns(
TableColumnArgs.builder()
.name("column1")
.type("VARIANT")
.build(),
TableColumnArgs.builder()
.name("column2")
.type("VARCHAR(16)")
.build())
.build());
var tableAssociation = new TagAssociation("tableAssociation", TagAssociationArgs.builder()
.objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
.name(test.name())
.database(testSnowflakeDatabase.name())
.schema(testSnowflakeSchema.name())
.build())
.objectType("TABLE")
.tagId(testSnowflakeTag.id())
.tagValue("engineering")
.build());
var columnAssociation = new TagAssociation("columnAssociation", TagAssociationArgs.builder()
.objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
.name(test.name().applyValue(name -> String.format("%s.column_name", name)))
.database(testSnowflakeDatabase.name())
.schema(testSnowflakeSchema.name())
.build())
.objectType("COLUMN")
.tagId(testSnowflakeTag.id())
.tagValue("engineering")
.build());
}
}
resources:
database:
type: snowflake:Database
properties:
name: database
schema:
type: snowflake:Schema
properties:
name: schema
database: ${database.name}
tag:
type: snowflake:Tag
properties:
name: cost_center
database: ${database.name}
schema: ${schema.name}
allowedValues:
- finance
- engineering
dbAssociation:
type: snowflake:TagAssociation
name: db_association
properties:
objectIdentifiers:
- name: ${database.name}
objectType: DATABASE
tagId: ${tag.id}
tagValue: finance
test:
type: snowflake:Table
properties:
database: ${testSnowflakeDatabase.name}
schema: ${testSnowflakeSchema.name}
name: TABLE_NAME
comment: Terraform example table
columns:
- name: column1
type: VARIANT
- name: column2
type: VARCHAR(16)
tableAssociation:
type: snowflake:TagAssociation
name: table_association
properties:
objectIdentifiers:
- name: ${test.name}
database: ${testSnowflakeDatabase.name}
schema: ${testSnowflakeSchema.name}
objectType: TABLE
tagId: ${testSnowflakeTag.id}
tagValue: engineering
columnAssociation:
type: snowflake:TagAssociation
name: column_association
properties:
objectIdentifiers:
- name: ${test.name}.column_name
database: ${testSnowflakeDatabase.name}
schema: ${testSnowflakeSchema.name}
objectType: COLUMN
tagId: ${testSnowflakeTag.id}
tagValue: engineering
Create TagAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TagAssociation(name: string, args: TagAssociationArgs, opts?: CustomResourceOptions);
@overload
def TagAssociation(resource_name: str,
args: TagAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TagAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
object_identifiers: Optional[Sequence[TagAssociationObjectIdentifierArgs]] = None,
object_type: Optional[str] = None,
tag_id: Optional[str] = None,
tag_value: Optional[str] = None,
object_name: Optional[str] = None,
skip_validation: Optional[bool] = None)
func NewTagAssociation(ctx *Context, name string, args TagAssociationArgs, opts ...ResourceOption) (*TagAssociation, error)
public TagAssociation(string name, TagAssociationArgs args, CustomResourceOptions? opts = null)
public TagAssociation(String name, TagAssociationArgs args)
public TagAssociation(String name, TagAssociationArgs args, CustomResourceOptions options)
type: snowflake:TagAssociation
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 TagAssociationArgs
- 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 TagAssociationArgs
- 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 TagAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagAssociationArgs
- 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 tagAssociationResource = new Snowflake.TagAssociation("tagAssociationResource", new()
{
ObjectIdentifiers = new[]
{
new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
{
Name = "string",
Database = "string",
Schema = "string",
},
},
ObjectType = "string",
TagId = "string",
TagValue = "string",
SkipValidation = false,
});
example, err := snowflake.NewTagAssociation(ctx, "tagAssociationResource", &snowflake.TagAssociationArgs{
ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
&snowflake.TagAssociationObjectIdentifierArgs{
Name: pulumi.String("string"),
Database: pulumi.String("string"),
Schema: pulumi.String("string"),
},
},
ObjectType: pulumi.String("string"),
TagId: pulumi.String("string"),
TagValue: pulumi.String("string"),
SkipValidation: pulumi.Bool(false),
})
var tagAssociationResource = new TagAssociation("tagAssociationResource", TagAssociationArgs.builder()
.objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
.name("string")
.database("string")
.schema("string")
.build())
.objectType("string")
.tagId("string")
.tagValue("string")
.skipValidation(false)
.build());
tag_association_resource = snowflake.TagAssociation("tagAssociationResource",
object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
name="string",
database="string",
schema="string",
)],
object_type="string",
tag_id="string",
tag_value="string",
skip_validation=False)
const tagAssociationResource = new snowflake.TagAssociation("tagAssociationResource", {
objectIdentifiers: [{
name: "string",
database: "string",
schema: "string",
}],
objectType: "string",
tagId: "string",
tagValue: "string",
skipValidation: false,
});
type: snowflake:TagAssociation
properties:
objectIdentifiers:
- database: string
name: string
schema: string
objectType: string
skipValidation: false
tagId: string
tagValue: string
TagAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TagAssociation resource accepts the following input properties:
- Object
Identifiers List<TagAssociation Object Identifier> - Specifies the object identifier for the tag association.
- Object
Type string - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- Tag
Id string - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- Tag
Value string - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- Object
Name string - Specifies the object identifier for the tag association.
- Skip
Validation bool - If true, skips validation of the tag association.
- Object
Identifiers []TagAssociation Object Identifier Args - Specifies the object identifier for the tag association.
- Object
Type string - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- Tag
Id string - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- Tag
Value string - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- Object
Name string - Specifies the object identifier for the tag association.
- Skip
Validation bool - If true, skips validation of the tag association.
- object
Identifiers List<TagAssociation Object Identifier> - Specifies the object identifier for the tag association.
- object
Type String - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- tag
Id String - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag
Value String - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object
Name String - Specifies the object identifier for the tag association.
- skip
Validation Boolean - If true, skips validation of the tag association.
- object
Identifiers TagAssociation Object Identifier[] - Specifies the object identifier for the tag association.
- object
Type string - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- tag
Id string - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag
Value string - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object
Name string - Specifies the object identifier for the tag association.
- skip
Validation boolean - If true, skips validation of the tag association.
- object_
identifiers Sequence[TagAssociation Object Identifier Args] - Specifies the object identifier for the tag association.
- object_
type str - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- tag_
id str - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag_
value str - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object_
name str - Specifies the object identifier for the tag association.
- skip_
validation bool - If true, skips validation of the tag association.
- object
Identifiers List<Property Map> - Specifies the object identifier for the tag association.
- object
Type String - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- tag
Id String - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag
Value String - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object
Name String - Specifies the object identifier for the tag association.
- skip
Validation Boolean - If true, skips validation of the tag association.
Outputs
All input properties are implicitly available as output properties. Additionally, the TagAssociation 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 TagAssociation Resource
Get an existing TagAssociation 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?: TagAssociationState, opts?: CustomResourceOptions): TagAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
object_identifiers: Optional[Sequence[TagAssociationObjectIdentifierArgs]] = None,
object_name: Optional[str] = None,
object_type: Optional[str] = None,
skip_validation: Optional[bool] = None,
tag_id: Optional[str] = None,
tag_value: Optional[str] = None) -> TagAssociation
func GetTagAssociation(ctx *Context, name string, id IDInput, state *TagAssociationState, opts ...ResourceOption) (*TagAssociation, error)
public static TagAssociation Get(string name, Input<string> id, TagAssociationState? state, CustomResourceOptions? opts = null)
public static TagAssociation get(String name, Output<String> id, TagAssociationState 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.
- Object
Identifiers List<TagAssociation Object Identifier> - Specifies the object identifier for the tag association.
- Object
Name string - Specifies the object identifier for the tag association.
- Object
Type string - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- Skip
Validation bool - If true, skips validation of the tag association.
- Tag
Id string - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- Tag
Value string - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- Object
Identifiers []TagAssociation Object Identifier Args - Specifies the object identifier for the tag association.
- Object
Name string - Specifies the object identifier for the tag association.
- Object
Type string - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- Skip
Validation bool - If true, skips validation of the tag association.
- Tag
Id string - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- Tag
Value string - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object
Identifiers List<TagAssociation Object Identifier> - Specifies the object identifier for the tag association.
- object
Name String - Specifies the object identifier for the tag association.
- object
Type String - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- skip
Validation Boolean - If true, skips validation of the tag association.
- tag
Id String - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag
Value String - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object
Identifiers TagAssociation Object Identifier[] - Specifies the object identifier for the tag association.
- object
Name string - Specifies the object identifier for the tag association.
- object
Type string - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- skip
Validation boolean - If true, skips validation of the tag association.
- tag
Id string - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag
Value string - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object_
identifiers Sequence[TagAssociation Object Identifier Args] - Specifies the object identifier for the tag association.
- object_
name str - Specifies the object identifier for the tag association.
- object_
type str - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- skip_
validation bool - If true, skips validation of the tag association.
- tag_
id str - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag_
value str - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
- object
Identifiers List<Property Map> - Specifies the object identifier for the tag association.
- object
Name String - Specifies the object identifier for the tag association.
- object
Type String - Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
- skip
Validation Boolean - If true, skips validation of the tag association.
- tag
Id String - Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
- tag
Value String - Specifies the value of the tag, (e.g. 'finance' or 'engineering')
Supporting Types
TagAssociationObjectIdentifier, TagAssociationObjectIdentifierArgs
Import
format is dbName.schemaName.tagName or dbName.schemaName.tagName
$ pulumi import snowflake:index/tagAssociation:TagAssociation example 'dbName.schemaName.tagName'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.