1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. DlcAttachDataMaskPolicy
tencentcloud 1.82.29 published on Friday, Oct 10, 2025 by tencentcloudstack

tencentcloud.DlcAttachDataMaskPolicy

Deploy with Pulumi
tencentcloud logo
tencentcloud 1.82.29 published on Friday, Oct 10, 2025 by tencentcloudstack

    Provides a resource to create a DLC attach data mask policy

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exampleDlcDataMaskStrategy = new tencentcloud.DlcDataMaskStrategy("exampleDlcDataMaskStrategy", {strategy: {
        strategyName: "tf-example",
        strategyDesc: "description.",
        groups: [{
            workGroupId: 70220,
            strategyType: "MASK",
        }],
    }});
    const exampleDlcAttachDataMaskPolicy = new tencentcloud.DlcAttachDataMaskPolicy("exampleDlcAttachDataMaskPolicy", {dataMaskStrategyPolicySet: {
        policyInfo: {
            database: "tf-example",
            catalog: "DataLakeCatalog",
            table: "tf-example",
            column: "id",
        },
        dataMaskStrategyId: exampleDlcDataMaskStrategy.dlcDataMaskStrategyId,
        columnType: "string",
    }});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example_dlc_data_mask_strategy = tencentcloud.DlcDataMaskStrategy("exampleDlcDataMaskStrategy", strategy={
        "strategy_name": "tf-example",
        "strategy_desc": "description.",
        "groups": [{
            "work_group_id": 70220,
            "strategy_type": "MASK",
        }],
    })
    example_dlc_attach_data_mask_policy = tencentcloud.DlcAttachDataMaskPolicy("exampleDlcAttachDataMaskPolicy", data_mask_strategy_policy_set={
        "policy_info": {
            "database": "tf-example",
            "catalog": "DataLakeCatalog",
            "table": "tf-example",
            "column": "id",
        },
        "data_mask_strategy_id": example_dlc_data_mask_strategy.dlc_data_mask_strategy_id,
        "column_type": "string",
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleDlcDataMaskStrategy, err := tencentcloud.NewDlcDataMaskStrategy(ctx, "exampleDlcDataMaskStrategy", &tencentcloud.DlcDataMaskStrategyArgs{
    			Strategy: &tencentcloud.DlcDataMaskStrategyStrategyArgs{
    				StrategyName: pulumi.String("tf-example"),
    				StrategyDesc: pulumi.String("description."),
    				Groups: tencentcloud.DlcDataMaskStrategyStrategyGroupArray{
    					&tencentcloud.DlcDataMaskStrategyStrategyGroupArgs{
    						WorkGroupId:  pulumi.Float64(70220),
    						StrategyType: pulumi.String("MASK"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewDlcAttachDataMaskPolicy(ctx, "exampleDlcAttachDataMaskPolicy", &tencentcloud.DlcAttachDataMaskPolicyArgs{
    			DataMaskStrategyPolicySet: &tencentcloud.DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs{
    				PolicyInfo: &tencentcloud.DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfoArgs{
    					Database: pulumi.String("tf-example"),
    					Catalog:  pulumi.String("DataLakeCatalog"),
    					Table:    pulumi.String("tf-example"),
    					Column:   pulumi.String("id"),
    				},
    				DataMaskStrategyId: exampleDlcDataMaskStrategy.DlcDataMaskStrategyId,
    				ColumnType:         pulumi.String("string"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleDlcDataMaskStrategy = new Tencentcloud.DlcDataMaskStrategy("exampleDlcDataMaskStrategy", new()
        {
            Strategy = new Tencentcloud.Inputs.DlcDataMaskStrategyStrategyArgs
            {
                StrategyName = "tf-example",
                StrategyDesc = "description.",
                Groups = new[]
                {
                    new Tencentcloud.Inputs.DlcDataMaskStrategyStrategyGroupArgs
                    {
                        WorkGroupId = 70220,
                        StrategyType = "MASK",
                    },
                },
            },
        });
    
        var exampleDlcAttachDataMaskPolicy = new Tencentcloud.DlcAttachDataMaskPolicy("exampleDlcAttachDataMaskPolicy", new()
        {
            DataMaskStrategyPolicySet = new Tencentcloud.Inputs.DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs
            {
                PolicyInfo = new Tencentcloud.Inputs.DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfoArgs
                {
                    Database = "tf-example",
                    Catalog = "DataLakeCatalog",
                    Table = "tf-example",
                    Column = "id",
                },
                DataMaskStrategyId = exampleDlcDataMaskStrategy.DlcDataMaskStrategyId,
                ColumnType = "string",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DlcDataMaskStrategy;
    import com.pulumi.tencentcloud.DlcDataMaskStrategyArgs;
    import com.pulumi.tencentcloud.inputs.DlcDataMaskStrategyStrategyArgs;
    import com.pulumi.tencentcloud.DlcAttachDataMaskPolicy;
    import com.pulumi.tencentcloud.DlcAttachDataMaskPolicyArgs;
    import com.pulumi.tencentcloud.inputs.DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs;
    import com.pulumi.tencentcloud.inputs.DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfoArgs;
    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 exampleDlcDataMaskStrategy = new DlcDataMaskStrategy("exampleDlcDataMaskStrategy", DlcDataMaskStrategyArgs.builder()
                .strategy(DlcDataMaskStrategyStrategyArgs.builder()
                    .strategyName("tf-example")
                    .strategyDesc("description.")
                    .groups(DlcDataMaskStrategyStrategyGroupArgs.builder()
                        .workGroupId(70220)
                        .strategyType("MASK")
                        .build())
                    .build())
                .build());
    
            var exampleDlcAttachDataMaskPolicy = new DlcAttachDataMaskPolicy("exampleDlcAttachDataMaskPolicy", DlcAttachDataMaskPolicyArgs.builder()
                .dataMaskStrategyPolicySet(DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs.builder()
                    .policyInfo(DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfoArgs.builder()
                        .database("tf-example")
                        .catalog("DataLakeCatalog")
                        .table("tf-example")
                        .column("id")
                        .build())
                    .dataMaskStrategyId(exampleDlcDataMaskStrategy.dlcDataMaskStrategyId())
                    .columnType("string")
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleDlcDataMaskStrategy:
        type: tencentcloud:DlcDataMaskStrategy
        properties:
          strategy:
            strategyName: tf-example
            strategyDesc: description.
            groups:
              - workGroupId: 70220
                strategyType: MASK
      exampleDlcAttachDataMaskPolicy:
        type: tencentcloud:DlcAttachDataMaskPolicy
        properties:
          dataMaskStrategyPolicySet:
            policyInfo:
              database: tf-example
              catalog: DataLakeCatalog
              table: tf-example
              column: id
            dataMaskStrategyId: ${exampleDlcDataMaskStrategy.dlcDataMaskStrategyId}
            columnType: string
    

    Create DlcAttachDataMaskPolicy Resource

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

    Constructor syntax

    new DlcAttachDataMaskPolicy(name: string, args?: DlcAttachDataMaskPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def DlcAttachDataMaskPolicy(resource_name: str,
                                args: Optional[DlcAttachDataMaskPolicyArgs] = None,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DlcAttachDataMaskPolicy(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                data_mask_strategy_policy_set: Optional[DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs] = None,
                                dlc_attach_data_mask_policy_id: Optional[str] = None)
    func NewDlcAttachDataMaskPolicy(ctx *Context, name string, args *DlcAttachDataMaskPolicyArgs, opts ...ResourceOption) (*DlcAttachDataMaskPolicy, error)
    public DlcAttachDataMaskPolicy(string name, DlcAttachDataMaskPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public DlcAttachDataMaskPolicy(String name, DlcAttachDataMaskPolicyArgs args)
    public DlcAttachDataMaskPolicy(String name, DlcAttachDataMaskPolicyArgs args, CustomResourceOptions options)
    
    type: tencentcloud:DlcAttachDataMaskPolicy
    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 DlcAttachDataMaskPolicyArgs
    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 DlcAttachDataMaskPolicyArgs
    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 DlcAttachDataMaskPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DlcAttachDataMaskPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DlcAttachDataMaskPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySet
    A collection of data masking policy permission objects to be bound.
    DlcAttachDataMaskPolicyId string
    ID of the resource.
    DataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs
    A collection of data masking policy permission objects to be bound.
    DlcAttachDataMaskPolicyId string
    ID of the resource.
    dataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySet
    A collection of data masking policy permission objects to be bound.
    dlcAttachDataMaskPolicyId String
    ID of the resource.
    dataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySet
    A collection of data masking policy permission objects to be bound.
    dlcAttachDataMaskPolicyId string
    ID of the resource.
    data_mask_strategy_policy_set DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs
    A collection of data masking policy permission objects to be bound.
    dlc_attach_data_mask_policy_id str
    ID of the resource.
    dataMaskStrategyPolicySet Property Map
    A collection of data masking policy permission objects to be bound.
    dlcAttachDataMaskPolicyId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DlcAttachDataMaskPolicy 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 DlcAttachDataMaskPolicy Resource

    Get an existing DlcAttachDataMaskPolicy 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?: DlcAttachDataMaskPolicyState, opts?: CustomResourceOptions): DlcAttachDataMaskPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data_mask_strategy_policy_set: Optional[DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs] = None,
            dlc_attach_data_mask_policy_id: Optional[str] = None) -> DlcAttachDataMaskPolicy
    func GetDlcAttachDataMaskPolicy(ctx *Context, name string, id IDInput, state *DlcAttachDataMaskPolicyState, opts ...ResourceOption) (*DlcAttachDataMaskPolicy, error)
    public static DlcAttachDataMaskPolicy Get(string name, Input<string> id, DlcAttachDataMaskPolicyState? state, CustomResourceOptions? opts = null)
    public static DlcAttachDataMaskPolicy get(String name, Output<String> id, DlcAttachDataMaskPolicyState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DlcAttachDataMaskPolicy    get:      id: ${id}
    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:
    DataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySet
    A collection of data masking policy permission objects to be bound.
    DlcAttachDataMaskPolicyId string
    ID of the resource.
    DataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs
    A collection of data masking policy permission objects to be bound.
    DlcAttachDataMaskPolicyId string
    ID of the resource.
    dataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySet
    A collection of data masking policy permission objects to be bound.
    dlcAttachDataMaskPolicyId String
    ID of the resource.
    dataMaskStrategyPolicySet DlcAttachDataMaskPolicyDataMaskStrategyPolicySet
    A collection of data masking policy permission objects to be bound.
    dlcAttachDataMaskPolicyId string
    ID of the resource.
    data_mask_strategy_policy_set DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs
    A collection of data masking policy permission objects to be bound.
    dlc_attach_data_mask_policy_id str
    ID of the resource.
    dataMaskStrategyPolicySet Property Map
    A collection of data masking policy permission objects to be bound.
    dlcAttachDataMaskPolicyId String
    ID of the resource.

    Supporting Types

    DlcAttachDataMaskPolicyDataMaskStrategyPolicySet, DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs

    ColumnType string
    The type of the bound field.
    DataMaskStrategyId string
    The ID of the data masking strategy.
    PolicyInfo DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfo
    Data masking permission object.
    ColumnType string
    The type of the bound field.
    DataMaskStrategyId string
    The ID of the data masking strategy.
    PolicyInfo DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfo
    Data masking permission object.
    columnType String
    The type of the bound field.
    dataMaskStrategyId String
    The ID of the data masking strategy.
    policyInfo DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfo
    Data masking permission object.
    columnType string
    The type of the bound field.
    dataMaskStrategyId string
    The ID of the data masking strategy.
    policyInfo DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfo
    Data masking permission object.
    column_type str
    The type of the bound field.
    data_mask_strategy_id str
    The ID of the data masking strategy.
    policy_info DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfo
    Data masking permission object.
    columnType String
    The type of the bound field.
    dataMaskStrategyId String
    The ID of the data masking strategy.
    policyInfo Property Map
    Data masking permission object.

    DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfo, DlcAttachDataMaskPolicyDataMaskStrategyPolicySetPolicyInfoArgs

    Catalog string
    The name of the data source to be authorized. For administrator-level authorization, only * is allowed (representing all resources at this level). For data source-level and database-level authorization, only COSDataCatalog or * is allowed. For table-level authorization, custom data sources can be specified. Defaults to DataLakeCatalog if not specified. Note: For custom data sources, DLC can only manage a subset of permissions provided by the user during data source integration.
    Database string
    The name of the database to be authorized. Use * to represent all databases under the current Catalog. For administrator-level authorization, only * is allowed. For data connection-level authorization, leave it empty. For other types, specify the database name.
    Table string
    The name of the table to be authorized. Use * to represent all tables under the current Database. For administrator-level authorization, only * is allowed. For data connection-level and database-level authorization, leave it empty. For other types, specify the table name.
    Column string
    The name of the column to be authorized. Use * to represent all columns. For administrator-level authorization, only * is allowed.
    Catalog string
    The name of the data source to be authorized. For administrator-level authorization, only * is allowed (representing all resources at this level). For data source-level and database-level authorization, only COSDataCatalog or * is allowed. For table-level authorization, custom data sources can be specified. Defaults to DataLakeCatalog if not specified. Note: For custom data sources, DLC can only manage a subset of permissions provided by the user during data source integration.
    Database string
    The name of the database to be authorized. Use * to represent all databases under the current Catalog. For administrator-level authorization, only * is allowed. For data connection-level authorization, leave it empty. For other types, specify the database name.
    Table string
    The name of the table to be authorized. Use * to represent all tables under the current Database. For administrator-level authorization, only * is allowed. For data connection-level and database-level authorization, leave it empty. For other types, specify the table name.
    Column string
    The name of the column to be authorized. Use * to represent all columns. For administrator-level authorization, only * is allowed.
    catalog String
    The name of the data source to be authorized. For administrator-level authorization, only * is allowed (representing all resources at this level). For data source-level and database-level authorization, only COSDataCatalog or * is allowed. For table-level authorization, custom data sources can be specified. Defaults to DataLakeCatalog if not specified. Note: For custom data sources, DLC can only manage a subset of permissions provided by the user during data source integration.
    database String
    The name of the database to be authorized. Use * to represent all databases under the current Catalog. For administrator-level authorization, only * is allowed. For data connection-level authorization, leave it empty. For other types, specify the database name.
    table String
    The name of the table to be authorized. Use * to represent all tables under the current Database. For administrator-level authorization, only * is allowed. For data connection-level and database-level authorization, leave it empty. For other types, specify the table name.
    column String
    The name of the column to be authorized. Use * to represent all columns. For administrator-level authorization, only * is allowed.
    catalog string
    The name of the data source to be authorized. For administrator-level authorization, only * is allowed (representing all resources at this level). For data source-level and database-level authorization, only COSDataCatalog or * is allowed. For table-level authorization, custom data sources can be specified. Defaults to DataLakeCatalog if not specified. Note: For custom data sources, DLC can only manage a subset of permissions provided by the user during data source integration.
    database string
    The name of the database to be authorized. Use * to represent all databases under the current Catalog. For administrator-level authorization, only * is allowed. For data connection-level authorization, leave it empty. For other types, specify the database name.
    table string
    The name of the table to be authorized. Use * to represent all tables under the current Database. For administrator-level authorization, only * is allowed. For data connection-level and database-level authorization, leave it empty. For other types, specify the table name.
    column string
    The name of the column to be authorized. Use * to represent all columns. For administrator-level authorization, only * is allowed.
    catalog str
    The name of the data source to be authorized. For administrator-level authorization, only * is allowed (representing all resources at this level). For data source-level and database-level authorization, only COSDataCatalog or * is allowed. For table-level authorization, custom data sources can be specified. Defaults to DataLakeCatalog if not specified. Note: For custom data sources, DLC can only manage a subset of permissions provided by the user during data source integration.
    database str
    The name of the database to be authorized. Use * to represent all databases under the current Catalog. For administrator-level authorization, only * is allowed. For data connection-level authorization, leave it empty. For other types, specify the database name.
    table str
    The name of the table to be authorized. Use * to represent all tables under the current Database. For administrator-level authorization, only * is allowed. For data connection-level and database-level authorization, leave it empty. For other types, specify the table name.
    column str
    The name of the column to be authorized. Use * to represent all columns. For administrator-level authorization, only * is allowed.
    catalog String
    The name of the data source to be authorized. For administrator-level authorization, only * is allowed (representing all resources at this level). For data source-level and database-level authorization, only COSDataCatalog or * is allowed. For table-level authorization, custom data sources can be specified. Defaults to DataLakeCatalog if not specified. Note: For custom data sources, DLC can only manage a subset of permissions provided by the user during data source integration.
    database String
    The name of the database to be authorized. Use * to represent all databases under the current Catalog. For administrator-level authorization, only * is allowed. For data connection-level authorization, leave it empty. For other types, specify the database name.
    table String
    The name of the table to be authorized. Use * to represent all tables under the current Database. For administrator-level authorization, only * is allowed. For data connection-level and database-level authorization, leave it empty. For other types, specify the table name.
    column String
    The name of the column to be authorized. Use * to represent all columns. For administrator-level authorization, only * is allowed.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.82.29 published on Friday, Oct 10, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate