DataPolicy |
A BigQuery Data Policy
To get more information about DataPolicy, see:
* [API documentation](https://cloud.google.com/bigquery/docs/reference/bigquerydatapolicy/rest/v1beta1/projects.locations.dataPolicies/create)
* How-to Guides
* [Official Documentation](https://cloud.google.com/bigquery/docs/column-data-masking-intro)
## Example Usage
### Bigquery Datapolicy Data Policy Basic
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.datacatalog.Taxonomy;
import com.pulumi.gcp.datacatalog.TaxonomyArgs;
import com.pulumi.gcp.datacatalog.PolicyTag;
import com.pulumi.gcp.datacatalog.PolicyTagArgs;
import com.pulumi.gcp.bigquerydatapolicy.DataPolicy;
import com.pulumi.gcp.bigquerydatapolicy.DataPolicyArgs;
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 taxonomy = new Taxonomy("taxonomy", TaxonomyArgs.builder()
.region("us-central1")
.displayName("taxonomy")
.description("A collection of policy tags")
.activatedPolicyTypes("FINE_GRAINED_ACCESS_CONTROL")
.build());
var policyTag = new PolicyTag("policyTag", PolicyTagArgs.builder()
.taxonomy(taxonomy.id())
.displayName("Low security")
.description("A policy tag normally associated with low security items")
.build());
var dataPolicy = new DataPolicy("dataPolicy", DataPolicyArgs.builder()
.location("us-central1")
.dataPolicyId("data_policy")
.policyTag(policyTag.name())
.dataPolicyType("COLUMN_LEVEL_SECURITY_POLICY")
.build());
}
}
```
## Import
DataPolicy can be imported using any of these accepted formats
```sh
$ pulumi import gcp:bigquerydatapolicy/dataPolicy:DataPolicy default projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}}
```
```sh
$ pulumi import gcp:bigquerydatapolicy/dataPolicy:DataPolicy default {{project}}/{{location}}/{{data_policy_id}}
```
```sh
$ pulumi import gcp:bigquerydatapolicy/dataPolicy:DataPolicy default {{location}}/{{data_policy_id}}
```
|