tencentcloud.DlcAttachDataMaskPolicy
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:
- Data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set - A collection of data masking policy permission objects to be bound.
- Dlc
Attach stringData Mask Policy Id - ID of the resource.
- Data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set Args - A collection of data masking policy permission objects to be bound.
- Dlc
Attach stringData Mask Policy Id - ID of the resource.
- data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set - A collection of data masking policy permission objects to be bound.
- dlc
Attach StringData Mask Policy Id - ID of the resource.
- data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set - A collection of data masking policy permission objects to be bound.
- dlc
Attach stringData Mask Policy Id - ID of the resource.
- data_
mask_ Dlcstrategy_ policy_ set Attach Data Mask Policy Data Mask Strategy Policy Set Args - A collection of data masking policy permission objects to be bound.
- dlc_
attach_ strdata_ mask_ policy_ id - ID of the resource.
- data
Mask Property MapStrategy Policy Set - A collection of data masking policy permission objects to be bound.
- dlc
Attach StringData Mask Policy Id - 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.
- Data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set - A collection of data masking policy permission objects to be bound.
- Dlc
Attach stringData Mask Policy Id - ID of the resource.
- Data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set Args - A collection of data masking policy permission objects to be bound.
- Dlc
Attach stringData Mask Policy Id - ID of the resource.
- data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set - A collection of data masking policy permission objects to be bound.
- dlc
Attach StringData Mask Policy Id - ID of the resource.
- data
Mask DlcStrategy Policy Set Attach Data Mask Policy Data Mask Strategy Policy Set - A collection of data masking policy permission objects to be bound.
- dlc
Attach stringData Mask Policy Id - ID of the resource.
- data_
mask_ Dlcstrategy_ policy_ set Attach Data Mask Policy Data Mask Strategy Policy Set Args - A collection of data masking policy permission objects to be bound.
- dlc_
attach_ strdata_ mask_ policy_ id - ID of the resource.
- data
Mask Property MapStrategy Policy Set - A collection of data masking policy permission objects to be bound.
- dlc
Attach StringData Mask Policy Id - ID of the resource.
Supporting Types
DlcAttachDataMaskPolicyDataMaskStrategyPolicySet, DlcAttachDataMaskPolicyDataMaskStrategyPolicySetArgs
- Column
Type string - The type of the bound field.
- Data
Mask stringStrategy Id - The ID of the data masking strategy.
- Policy
Info DlcAttach Data Mask Policy Data Mask Strategy Policy Set Policy Info - Data masking permission object.
- Column
Type string - The type of the bound field.
- Data
Mask stringStrategy Id - The ID of the data masking strategy.
- Policy
Info DlcAttach Data Mask Policy Data Mask Strategy Policy Set Policy Info - Data masking permission object.
- column
Type String - The type of the bound field.
- data
Mask StringStrategy Id - The ID of the data masking strategy.
- policy
Info DlcAttach Data Mask Policy Data Mask Strategy Policy Set Policy Info - Data masking permission object.
- column
Type string - The type of the bound field.
- data
Mask stringStrategy Id - The ID of the data masking strategy.
- policy
Info DlcAttach Data Mask Policy Data Mask Strategy Policy Set Policy Info - Data masking permission object.
- column_
type str - The type of the bound field.
- data_
mask_ strstrategy_ id - The ID of the data masking strategy.
- policy_
info DlcAttach Data Mask Policy Data Mask Strategy Policy Set Policy Info - Data masking permission object.
- column
Type String - The type of the bound field.
- data
Mask StringStrategy Id - The ID of the data masking strategy.
- policy
Info 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.